The 9-Layer Semantic Engine
Most NL-to-SQL tools send your question straight to an LLM. Echo builds a deep understanding of your schema first – then writes SQL that actually works.
The Pipeline
Nine layers of semantic intelligence, applied before a single token of SQL is generated.
Schema Linking
Maps 1,056+ column names to human-readable business terms. BELNR_CONCAT becomes “Document Number”, NETWR becomes “Net Value”.
Entity Resolution
Resolves business entities to database values. “Hyderabad” maps to plant code “1200”, “Q3” maps to fiscal period range.
Synonym Expansion
Understands that “PO” means “Purchase Order”, “GRN” means “Goods Receipt Note”, “AP” means “Accounts Payable”.
Type Awareness
Detects mismatched types. When amounts are stored as TEXT, Echo applies CAST operations automatically.
Relationship Context
Builds a TableRelationshipGraph and uses BFS to find optimal JOIN paths across 500+ table schemas.
Business Metric Templates
82 pre-defined metrics with SQL templates. DSO, revenue, margin, aging — computed correctly every time.
PowerBI DAX Integration
Reverse-engineers 274 DAX measures from your existing PowerBI reports to ensure dashboard consistency.
Computed Patterns
Encodes fiscal year logic, regional tax calculations, currency conversions, and business-specific formulas.
Few-Shot Selection
Uses RAG over a Gold Dataset of verified queries to find the most relevant examples for each new question.
25-Loop Self-Correction
Echo doesn’t just generate SQL — it verifies it. Every query goes through up to 25 iterative refinement loops.
Generate
LLM produces SQL using the full semantic context from all 9 layers.
Execute
Query runs against your database in read-only mode. Results are validated.
Validate & Correct
If the query fails, Echo diagnoses the error and regenerates with corrections.
Circuit Breaker
After repeated failures, the loop stops. No infinite retries or runaway costs.
Why 95%+ accuracy matters
| Tool | Accuracy | Schema Intelligence | Self-Correction | Zero Data Movement | ERP Native |
|---|---|---|---|---|---|
| AX Echo | 95%+ | 1,056+ fields | 25 loops | ✔ | ✔ |
| Generic NL2SQL | ~65% | None | ✖ | ✔ | ✖ |