Inspiration

A delayed battery shipment can become a missed production slot, a late dealership delivery, and a customer left without a car.

We were inspired by how quickly a small operational disruption can spread—and how difficult it is to coordinate a response when the relevant information lives in separate systems.

For Hitachi’s Hack the Highway challenge, we built Ripple Control: an AI-assisted control tower that connects those consequences, executes targeted recovery actions, and explains its decisions.

One disruption. Thousands of connections. A coordinated response.

What it does

Ripple Control reads messages about supplier delays, plant outages, and defective parts. It follows a knowledge graph to identify affected production orders, vehicles, dealerships, and customers.

Depending on the incident, it can:

  • Reschedule production or transfer builds to compatible plants.
  • Notify affected dealerships and allocate eligible loaners.
  • Hold defective lots, stop sales of affected vehicles, and contact owners.
  • Escalate uncertain reports and ignore irrelevant messages.

Our Streamlit dashboard displays the recorded incident interpretation, impact paths, actions, and policy evidence. Reviewers can inspect the completed response without recreating a live disruption.

How we built it

Our Python coordinator routes incidents among three specialist agents: Supply Chain Planner, Dealer Network, and Customer Care & Quality.

A NetworkX knowledge graph connects 17,029 entities through 28,201 relationships. Each relationship retains its supporting source information. Deterministic code handles scheduling, eligibility, policy validation, and execution through the organizer’s enterprise API.

Gemini API: understanding messages and generating embeddings

We integrated Gemini 3.1 Flash-Lite through generateContent with JSON-schema output. It separates compound messages into incidents and extracts entity and date phrases. Code resolves those phrases against company records before any operational action.

The submitted run processed all 15 events using 15 Gemini calls and 6,628 tokens. A rule-based extractor cross-checks interpretations and provides a fallback.

We also built an efficiency-focused cascade that calls Gemini when rule-based extraction is uncertain. In a separate 30-event benchmark, it handled 30/30 events using five LLM calls, reducing token usage by approximately 84%.

Gemini also powers our retrieval integration: Gemini Embedding 2 generates 768-dimensional embeddings for structured incident descriptions.

MongoDB Atlas: semantic incident retrieval

We use MongoDB Atlas Vector Search to help reviewers discover similar incidents and inspect their outcomes.

Through PyMongo, we upsert documents containing incident facts, decisions, outcomes, policy references, and Gemini embeddings. Stable run-and-incident identifiers prevent duplicate documents during repeated uploads.

Our $vectorSearch pipeline uses cosine similarity, filters to the selected run, excludes the current event, and prioritizes matching incident types. Explanations such as “same supplier” or “same part” are generated from shared facts in code.

We stored 16 incidents in Atlas and checked retrieval against local cosine calculations. Results matched for 14 incidents; two differed only in the ordering of tied noise events.

The dashboard reads the exported results, making the feature reviewable without database credentials.

View the recorded MongoDB search results.

Snowflake integration: operational audit analytics

Using Snowflake’s Python connector, we publish sanitized execution records into event, incident, and action tables.

The loader deduplicates input, loads staging tables, and uses SQL MERGE operations for repeatable publication. Reporting views expose run summaries, failed calls, escalations, and the policies supporting individual actions.

Our documented cloud publish produced 15 events, 16 incidents, and 900 actions. Publishing twice preserved 900 distinct action keys. Customer and vehicle identifiers are pseudonymized, while raw messages and tool arguments are excluded.

Explore the Snowflake loader and SQL schema.

Databricks: graph preparation and validation

Our PySpark workflow on Databricks Free Edition serverless compute rebuilds the graph from company extracts, checks identifiers and relationships, and reconstructs derived lot-to-production-order links.

It compares the resulting graph and provenance against the local NetworkX export, then publishes versioned Delta tables using MERGE.

The cloud run matched 17,029 nodes and 28,201 edges with zero differences.

View the Databricks cloud validation report.

These analytics and retrieval integrations process completed-run data. Operational changes execute through the organizer’s enterprise tools.

Challenges we ran into

Messy language required precise resolution. Nicknames, relative dates, ambiguous entities, and compound messages had to become specific IDs and date ranges.

Shared resources required coordination. Multiple incidents could compete for production slots and loaners. We used an event-scoped ledger to keep those allocations consistent.

Tool failures required careful recovery. A rejection indicates failure, while a timeout can leave the outcome unknown. We added reconciliation reads before further action.

Integration results needed to be independently inspectable. We preserved logs, graph exports, search results, and validation reports so reviewers can evaluate the system asynchronously.

Accomplishments that we're proud of

  • 900 operational tool calls with zero failed calls.
  • 15/15 provided events consistent with handbook rules in independent replay.
  • Working Gemini, MongoDB Atlas, Snowflake, and Databricks integrations with documented results.
  • A trace connecting each operational action to its policy and supporting records.

Review the verification results and event summaries.

What we learned

We learned to separate language understanding from decisions that require exact rules. Gemini interprets the message; code validates scope, capacity, eligibility, and permissions.

We also learned that integration depth comes from giving each service a concrete responsibility: Gemini understands, MongoDB retrieves, Snowflake reports, and Databricks validates.

Finally, we learned that restraint matters. Escalating an unresolved report can be the correct response.

What's next for Ripple Control

We plan to expand multilingual and adversarial testing, evaluate a small local language model, persist human-review decisions, and extend similarity retrieval across historical runs with time filtering.

Longer term, we want operators to compare recovery plans by delivery impact, customer consequences, and resource constraints before execution.

Built With

Share this project:

Updates

Submission history