SQL-to-Schema Enhances Schema Linking in Text-to-SQL


연구 분야: Databases



학회: International Conference on Database and Expert Systems Applications


초록

Sophisticated Text-to-SQL methods often face errors, such as schema-linking errors, join errors, nested errors, and group-by errors. To mitigate these, it’s crucial to filter out unnecessary tables and columns, focusing the language model on relevant ones. Previous methods have attempted to sort tables and columns based on relevance or directly identify necessary elements, but these approaches suffer from long training times, high costs with GPT-4 tokens, or poor schema linking performance. We propose a two-step schema linking method: first, generate an initial SQL query using the full database schema; then, extract the relevant tables and columns to form a concise schema. This method, tested with Code Llama and GPT-4, shows optimal performance compared to mainstream methods on the Spider dataset, reducing errors and improving efficiency in SQL generation.


Author Profile
Sun Yang

Peking University Beijing China

China
Author Profile
Qiong Su

SenseTime Research Shanghai China

China
Author Profile
Zhishuai Li

Guizhou University Guizhou China

China

📄 논문 정보

발행 연도 2024년
인용수 0
출판 국가 Singapore, China
사이트 Springer
좋아요 수 0

연관 논문 목록 (340건)