ODIN: A NL2SQL Recommender to Handle Schema Ambiguity
Kapil Vaidya, Abishek Sankararaman, Jialin Ding, Chuan Lei, Xiao Qin, Balakrishnan Narayanaswamy, Tim Kraska

TL;DR
ODIN is a NL2SQL recommendation system that generates multiple SQL query suggestions to resolve schema ambiguity, learns from user feedback, and significantly improves query accuracy in complex enterprise database schemas.
Contribution
Introduces ODIN, a novel NL2SQL recommender that handles schema ambiguity by suggesting multiple queries and personalizes recommendations through user feedback.
Findings
ODIN increases correct SQL generation likelihood by 1.5-2x.
ODIN effectively manages schema ambiguity in complex schemas.
User feedback improves ODIN's future query suggestions.
Abstract
NL2SQL (natural language to SQL) systems translate natural language into SQL queries, allowing users with no technical background to interact with databases and create tools like reports or visualizations. While recent advancements in large language models (LLMs) have significantly improved NL2SQL accuracy, schema ambiguity remains a major challenge in enterprise environments with complex schemas, where multiple tables and columns with semantically similar names often co-exist. To address schema ambiguity, we introduce ODIN, a NL2SQL recommendation engine. Instead of producing a single SQL query given a natural language question, ODIN generates a set of potential SQL queries by accounting for different interpretations of ambiguous schema components. ODIN dynamically adjusts the number of suggestions based on the level of ambiguity, and ODIN learns from user feedback to personalize…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
MethodsSparse Evolutionary Training
