NL2SQL ERP Insights Assistant
Schema-Grounded SQL Query Generation
Schema-grounded natural language SQL assistant enabling non-technical staff to self-serve ERP reporting.
The Engineering Challenge
Business analysts at Techlene were overwhelmed with repetitive ad-hoc SQL query requests.
Core ProblemNon-technical managers could not inspect sales, inventory, and ledger databases without engineering intervention.
- Strict read-only execution guardrails
- Complex 60+ table normalized relational schema
System Architecture
End-to-end data pipelines and component isolation boundaries.
LangChain + LangGraph agent that maps natural queries to schema subgraphs, validates SQL syntax, and runs read-only sandbox queries.
Key Engineering Decisions
Schema Subgraph Retrieval
Passed only relevant table schemas into the LLM prompt to avoid context overflow and hallucinated column names.
Production Verification & Results
- Completely eliminated a 2-day analyst reporting backlog
- Self-served over 1,500 executive business queries in production
Production Stack & Tooling
Want to build something similar?
I specialize in taking complex agentic workflows, duplex voice architectures, and high-throughput computer vision models into production.