{"slug": "schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation", "title": "Schema-Aware Localisation (SAL): Live Schema Grounding and Hallucination Validation for Oracle NL2SQL", "summary": "A new middleware layer called Schema-Aware Localisation (SAL) achieves 62.6% execution-grounded truth (EGT) on 500 TPC-H natural language questions against Oracle Autonomous Database 23c using GPT-4o-mini, up from 2.2% without schema grounding, while reducing execution failures from 97.6% to 2.6%. SAL queries Oracle's USER_TAB_COLUMNS catalog to build a live schema map and validates SQL references via the Hallucination Index (Hidx), requiring no model retraining.", "body_md": "arXiv:2607.22572v1 Announce Type: new\nAbstract: Large language models can generate fluent SQL from natural language, but on real enterprise Oracle databases they frequently fail at execution time: columns and aliases are hallucinated and dialect-specific syntax is missed, leading to ORA-00904 invalid-identifier errors. In this setting, failures are primarily due to missing schema grounding: the model cannot know which tables and columns actually exist. This paper introduces Schema-Aware Localisation (SAL), a lightweight middleware layer for Oracle NL2SQL that requires no model retraining. SAL queries Oracle's USER_TAB_COLUMNS catalog to build a live schema map, selects a relevant table subset for each question (falling back to the full schema for multi-table queries), and injects this ground-truth context into the LLM prompt. Generated SQL is then checked by the Hallucination Index (Hidx), which validates every alias.column reference against the live catalog, automatically rewrites predictable prefix errors, and otherwise triggers a structured retry with itemised corrections. We evaluate SAL on 500 TPC-H natural language questions executed against a live Oracle Autonomous Database 23c instance using GPT-4o-mini. Without any schema grounding, execution-grounded truth (EGT; executes and matches the reference result set) is 2.2% (12/500). A hand-written static schema hint brings EGT to 62.0%. SAL, with no manual schema curation, achieves 62.6% EGT (96% simple, 95% medium, 40.7% complex) while reducing execution failures from 97.6% to 2.6%.", "url": "https://wpnews.pro/news/schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation", "canonical_source": "https://arxiv.org/abs/2607.22572", "published_at": "2026-07-28 04:00:00+00:00", "updated_at": "2026-07-28 04:29:52.093789+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "natural-language-processing", "ai-tools", "ai-research"], "entities": ["Schema-Aware Localisation (SAL)", "Oracle", "GPT-4o-mini", "Oracle Autonomous Database 23c", "TPC-H", "Hallucination Index (Hidx)", "USER_TAB_COLUMNS"], "alternates": {"html": "https://wpnews.pro/news/schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation", "markdown": "https://wpnews.pro/news/schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation.md", "text": "https://wpnews.pro/news/schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation.txt", "jsonld": "https://wpnews.pro/news/schema-aware-localisation-sal-live-schema-grounding-and-hallucination-validation.jsonld"}}