Inspiration
We’ve all stared at a package tracking screen that suddenly updates to "Delayed" with zero explanation. For a consumer, it’s annoying. For an enterprise, it’s millions of dollars bleeding out through breached SLAs and lost customers (up to 72% churn after a single late delivery). We realized that modern logistics dashboards are essentially autopsies, they just tell you why a shipment failed after the fact. We wanted to build a radar, not a rear-view mirror. The goal was to predict the bottleneck and automate the recovery before the deadline was ever missed.
What it does
Project Pravah is a proactive logistics intercept terminal. Instead of just passively tracking active orders, it evaluates them for latent risk. The system ingests live transaction nodes and runs them through a dual-target machine learning pipeline to predict two distinct metrics: the exact probability that a shipment will be late, and the specific number of days it will deviate from its schedule.
But raw numbers don't solve supply chain crises. Pravah takes those ML metrics and feeds them into "Amber", our custom generative AI reasoning core. Amber instantly translates the mathematical risk into a structured, region-specific mitigation playbook (like authorizing a priority freight upgrade or triggering a proactive client-retention email) to save the shipment.
How we built it ?
We split the architecture into three distinct, decoupled layers:
The Ingestion Layer (Frontend): We built a dark, terminal-style dashboard using Next.js and Tailwind CSS. We wanted it to feel like a high-end, data-dense enterprise command center, using monospaced typography and a strict CLI aesthetic.
The Predictive Engine (Backend): We cleaned and processed over 180,000 corporate transaction rows. We built a custom preprocessor to map raw categorical strings into a 34-dimension feature matrix, which feeds into two serialized Scikit-Learn models (a Random Forest Regressor and Classifier) hosted on a local Python Flask API.
The Cognitive Core (GenAI): We integrated the google-genai SDK and engineered a strict system prompt to force the Gemini model into the "Amber" persona. It parses the Flask telemetry and streams markdown-formatted operational directives directly back to the Next.js frontend.
Challenges we ran into
Our biggest hurdle hit during the integration of the generative reasoning layer. We were initially relying on gemini-3.5-flash, but during peak testing, we started hitting 503 Service Unavailable errors due to high network demand. In a live demo, a crashed API is a death sentence. To fix this, we engineered an automatic fallback mechanism in our Flask route. If the primary model times out, the server gracefully intercepts the exception and downgrades to gemini-3.1-flash-lite, which proved incredibly fast and stable.
Additionally, wrangling 180k rows of messy logistics data into a clean matrix that our Scikit-learn pipelines could digest without overfitting required a lot of late-night tuning and dimension reduction.
Accomplishments that we're proud of
We are incredibly proud of the UI/UX. Nailing the "Operations Terminal" aesthetic, with the color-coded telemetry, real-time matrix rendering, and markdown streaming, made the tool feel like a finished enterprise product rather than a weekend hack. On the backend, hitting 83% precision on our late-risk classifier and a Mean Absolute Error (MAE) of just 0.9839 days on our regressor proved that our predictive logic is grounded in reality, not just guessing.
What we learned
We learned that the real magic happens when you bridge hard data science with Generative AI. Traditional ML is amazing at finding hidden numbers (like a 40% failure probability), but project managers don't always know what to do with raw percentages. Using an LLM as a translation layer to turn statistical probabilities into plain-English business strategies completely shifted how we view AI development. Also, we learned a hard lesson in DevOps: never trust a single API endpoint without a fallback plan!
What's next for Project Pravah
The natural next step is moving from a mock state to live ERP synchronization. We want to connect Pravah directly to databases like SAP or Oracle to ingest active queues automatically. Finally, we want to upgrade Amber from an advisory core to an execution core, building secure webhooks so that when Amber suggests a "Priority Freight Upgrade," an operator can just click a button in the terminal to execute that change directly with the carrier via their API.
Built With
- classifier
- flask
- next.js
- random-forest
- regressor
Log in or sign up for Devpost to join the conversation.