Back to portfolio GitHub

Multi-hop reasoning over complex dependencies

SupplyGraph: Graph-RAG for Supply Chain Risk

A hybrid agent that combines Neo4j graph traversal with semantic search to trace how supplier disruptions propagate across tiers and affect finished products.

90% overall hybrid-agent accuracy
LangGraphNeo4jGraph-RAGText-to-CypherVector SearchPython

Why this problem needed a different architecture

Vector search can retrieve narrative incident details, but it cannot reliably walk multi-tier relationships such as Event → Facility → Supplier → Component → Product.

How I approached it

I built a router that selects graph traversal, semantic retrieval, or both. The graph path uses Text-to-Cypher with schema validation and a self-correction retry for empty results.

  1. Router selects graph, vector, or hybrid retrieval
  2. Neo4j traverses supplier tiers and product dependencies
  3. Neo4j vector index retrieves incident-report details
  4. Hybrid synthesis combines structural impact with narrative context
  5. Evaluation compares graph-only, vector-only, and hybrid strategies
  • Hybrid agent reached 90% overall accuracy
  • Graph-only baseline: 65%; vector-only baseline: 40%
  • Identified and fixed a reproducible third-party Cypher validator failure