Dodge AI — Order to Cash
An interactive Order-to-Cash (O2C) graph explorer with an AI-powered natural language query interface for SAP business data.
21K+ records
Dataset
11 Types
Entities
16 Types
Relationships
Problem
SAP Order-to-Cash data is fragmented across tables, making it difficult to visualize document flows and query relationships in plain English.
Architecture
React + Vite frontend for graph viz and chat; FastAPI backend orchestrating Gemini LLM calls, PostgreSQL for relational storage, and NetworkX for in-memory graph building.
Challenges
- — Mapping relational foreign keys to graph edges efficiently
- — Ensuring LLM generates correct SQL without hallucinating
- — Preventing expensive or unbounded database queries
Engineering Decisions
- — Chose PostgreSQL over Neo4j to leverage LLM SQL proficiency
- — Injected schema and used CoT prompting for accurate SQL generation
- — Implemented read-only SQL execution and statement timeouts
Tradeoffs
- — LLM inference latency vs accuracy
- — Relational database vs native graph DB for graph-like traversal
Future Work
- — Support for more complex graph algorithms
- — Real-time sync with SAP systems