Exécution de notre outil de synthèse sur un nouvel article
Vérifiez l’article ci-dessous, puis lancez sa synthèse.
Revealing the powerful ability of large language model prompts in Text-to-SQL tasks
Zhihua Duan (China Telecom (China), China Telecom), Jialin Wang (Stanford University)
Résumé : Text-to-SQL is an important research direction in the field of artificial intelligence. This paper introduces a novel Text-to-SQL application framework based on large language models (LLMs), aiming to achieve more accurate Text-to-SQL generation. We propose three methods to effectively leverage the synergy between LLMs and Text-to-SQL prompts. Firstly, we employ prompt words in JSON format that include database query examples. Through interaction with LLMs, accurate SQL statements can be generated. Secondly, we utilize the Chain of Thought (CoT) prompt word method, prompting the model with query tables, fields, and conditions to generate SQL statements that comply with grammar rules. Finally, we enhance Text-to-SQL inference accuracy by querying an SQL knowledge base. We conduct experiments on the Spider benchmark, which consists of 20 databases and 1034 query statements. The experimental results demonstrate that, under the single-domain database condition, the CreateTable+SelectCol+Normalized method achieves a Text- to-SQL accuracy of 77.9 with a 16-shot setting. This represents a 1.4% improvement compared to the Codex baseline.