Two-Layer RAG for Value Grounding and Schema Linking in LLM-Based Text-to-SQL Systems
Large Language Models translate natural language into SQL. In environments with dynamic schemas, models hallucinate column names and filter values absent from the target database. We present a two-layer Retrieval-Augmented Generation architecture that addresses schema linking and value grounding within an orchestration...