Inspiration

In today’s hyper-connected world, global crises do not occur in a vacuum. A severe flood in Southeast Asia isn't just an environmental disaster; it triggers supply chain collapses, exacerbates healthcare shortages, and often leads to localized economic instability. Traditional dashboards force analysts to look at these metrics in separate silos. We realized that to proactively anticipate the fallout of global events, we needed a system that understands the semantic relationship between seemingly unrelated incidents. This inspired us to build CrisisLens—a unified, AI-driven command center that synthesizes environmental, geopolitical, and infrastructural data into coherent, multi-dimensional risk intelligence.

What it does

CrisisLens is an advanced risk intelligence platform that acts as a copilot for analysts. It features two primary components:

The Analyst Command Center (Analytics): An interactive dashboard tracking 23 unique risk factors segmented into Environment, Health, Society, and Infrastructure. It renders comprehensive charts (Radar, Scatter, Area trends) mapping real-time multidimensional risk scores. The Intel Agent (Agentic RAG): An interactive AI chat model that allows users to query historic and active global threats in natural language. Instead of basic keyword searches, it orchestrates a pipeline that maps queries against thousands of vectorized incident reports.

How we built it

We engineered a full-stack, modular architecture optimized for rapid inference and deep analytics:

Frontend: Built with Next.js, React, and heavily styled using Tailwind CSS and Framer Motion for a sleek, glassmorphic UI. The data visualizations are uniquely handled via fully responsive Recharts implementations. Vector Database: We utilized Supabase PostgreSQL extended with pgvector to store and query highly dimensional vector embeddings of historic and current geopolitical incidents. ML & Inference Backend: A standalone Python backend (ml-service) powered by PyTorch handles our custom risk-scoring inferences. We process incoming alerts through BERT embeddings to place them accurately in our semantic space. LLM Synthesis: We run an implementation of Agentic RAG expedited by the ridiculously fast Groq API. When a user types a query, CrisisLens embeds the question rapidly, executes a similarity search against the Supabase pgvector index, applies PyTorch risk scoring, and synthesizes the final brief. Mathematical Risk Modeling Our underlying risk equation measures multidimensional threat impact by taking the dot product of an incident's embedding vector E and our continuous category risk weights W, factoring in geographic probability P(g)

Challenges we ran into

Handling Dense Vector Searches at Scale: Passing massive context windows back to the frontend Agent UI without timeouts required us to optimize our RAG pipeline. We initially faced repeated "0 overlapping correlations" errors, which forced us to rethink and re-tune our pgvector querying logic. Complex UI State & Visual Constraints: Building the Analyst Command Center brought heavy frontend challenges. We fought extensive layout battles with Recharts clipping outside Flexbox boundaries and responsive horizontal scrolling issues. Creating a frictionless UI where elements auto-scaled cleanly required meticulous CSS architectural restructuring. Chat Box Ergonomics: Perfecting the Intel Agent chat to scroll fluidly without constantly burying the user's prompt (simulating GitHub Copilot's UX) required novel DOM awareness via Tailwind's flex-col-reverse mappings.

Accomplishments that we're proud of

Seamlessly integrating a complex Python/PyTorch machine-learning microservice with a Next.js App Router frontend. Creating a visually stunning, professional-grade UI. The data visualizations smoothly scale and dynamically update with clean Framer Motion animations. Establishing a highly deterministic and low-latency Agentic RAG pipeline.

What we learned

We vastly deepened our understanding of the mathematics and infrastructure behind semantic Search and RAG. We learned that the secret to good agentic AI isn't just about throwing data at an LLM; it's about meticulously organizing the vector data mathematically so that only high signal-to-noise ratio context is retrieved. On the frontend, we leveled up significantly regarding advanced React lifecycle management, complex Recharts layout tuning, and implementing real-world Tailwind typography formatting constraints.

What's next for CrisisLens

Our immediate roadmap involves stepping away from static, historic datasets and connecting live API pipelines:

Live Feeds: Tapping directly into ACLED (Armed Conflict data), OpenWeatherMap, and ReliefWeb APIs to autonomously track breaking global incidents. Notification Webhooks: Allowing businesses or reporters to set up custom SMS/Email alerting when the PyTorch engine detects a highly correlated supply-chain threat to their operating region. Enhanced Predictive Analytics: Fine-tuning a time-series model to forecast potential conflict escalations weeks before they appear in headline news.

Built With

Share this project:

Updates