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
The challenge
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.
The solution
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.
Architecture
- Router selects graph, vector, or hybrid retrieval
- Neo4j traverses supplier tiers and product dependencies
- Neo4j vector index retrieves incident-report details
- Hybrid synthesis combines structural impact with narrative context
- Evaluation compares graph-only, vector-only, and hybrid strategies
Results
- Hybrid agent reached 90% overall accuracy
- Graph-only baseline: 65%; vector-only baseline: 40%
- Identified and fixed a reproducible third-party Cypher validator failure