Return
CM-SQL: A cross-model consistency framework for text-to-SQL
DOI:10.1016/j.neucom.2025.131708.png)
Abstract
En 中文
• This paper proposes a method for assessing the accuracy of SQL queries using cross-model consistency. The method leverages the reasoning capabilities of multiple large language models (LLMs) and the stability of models fine-tuned with instructions to evaluate the accuracy of SQL queries. This approach effectively mitigates the issue of “overconfidence” exhibited by LLMs when faced with syntactically correct but semantically incorrect SQL queries, a problem often caused by hallucinations and other issues. • This study proposes a localized SQL modification strategy to correct problematic SQL queries. Unlike existing methods, this approach utilizes the output of the SQL Check Module to modify only the erroneous parts of the SQL query, rather than performing a complete regeneration. This effectively reduces the risk of inadvertently introducing errors into originally correct parts of the SQL query due to an excessive number of modifications. • We introduce the V-Schema database schema organization structure. Compared to traditional Database Definition Languages (DDL) and their simplified versions, this architecture not only retains the advantage of DDL schemas in fully representing the relationships and relevant information between different parts of the database but also effectively reduces the impact of unnecessary input on model performance. • This study uses the linked schema (Simplify-Schema) and the unlinked schema (Full-Schema) as inputs to obtain SQL queries from different perspectives. Compared to traditional methods, which provide only a single database schema and rely on altering parameters like temperature or the order of schemas to generate diverse SQL queries, our approach avoids exacerbating hallucination issues that can arise with high temperature settings. Moreover, it fully leverages the advantages of both schemas to generate more robust SQL outputs.
Journal
IF:
6.5
Papers:
2.5W
Citations:
6.5W

