ODIN: A NL2SQL Recommender to Handle Schema Ambiguity

Kapil Vaidya, Abishek Sankararaman, Jialin Ding, Chuan Lei, Xiao Qin +2 more
5/25/2025
cs.DBcs.CL

No confident code implementation found for this paper.

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 future SQL query recommendations. Our evaluation shows that ODIN improves the likelihood of generating the correct SQL query by 1.5-2$\times$ compared to baselines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{vaidya2025odin,
  title  = {ODIN: A NL2SQL Recommender to Handle Schema Ambiguity},
  author = {Kapil Vaidya and Abishek Sankararaman and Jialin Ding and Chuan Lei and Xiao Qin and Balakrishnan Narayanaswamy and Tim Kraska},
  year   = {2025},
  eprint = {2505.19302},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.19302v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.19302.svg)](https://codeofpaper.com/paper/2505.19302)

Discussion