Skip to content
Aabhi.ai
PROJECT 10Agentic AIProduction

NL2SQL ERP Insights Assistant

Schema-Grounded SQL Query Generation

Schema-grounded natural language SQL assistant enabling non-technical staff to self-serve ERP reporting.

2 Days → InstantAnalyst Backlog Cleared
100%Read-Only Sandbox

The Engineering Challenge

Context & Domain

Business analysts at Techlene were overwhelmed with repetitive ad-hoc SQL query requests.

Core Problem

Non-technical managers could not inspect sales, inventory, and ledger databases without engineering intervention.

Architectural Constraints
  • Strict read-only execution guardrails
  • Complex 60+ table normalized relational schema

System Architecture

End-to-end data pipelines and component isolation boundaries.

Interactive Component SVG

LangChain + LangGraph agent that maps natural queries to schema subgraphs, validates SQL syntax, and runs read-only sandbox queries.

Key Engineering Decisions

DECISION 01

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

LangChainLangGraphPostgreSQLFastAPIPython

Want to build something similar?

I specialize in taking complex agentic workflows, duplex voice architectures, and high-throughput computer vision models into production.