Enhancing Text-to-SQL Capabilities of Large Language Models by intermediate representations and Chain of Thought

Authors

  • Tingxuan Fu, Yu Fu, Haoran Li, Sijia Hao, Qiming Chen

Abstract

While large language models with in-context learning have dramatically improved the performance of text-to-SQL tasks, the semantic gay between natural language and SQL queries has not yet been bridged. Although some intermediate representations are designed to reduce the difficulty of SQL query generation, the dilemma of problem decomposition is not effectively alleviated in complex scenarios. Our proposed solution is intended to address both of these issues. First of all, we use NatSQL as the intermediate representation to implement the task of Text-to-NatSQL. Secondly, we use samples with Chain-of-Thought information to fine-tune small and medium-scale LLMs to enhance their task decomposition and reasoning capabilities in complex scenarios. Experiment results demonstrate that our model achieves performance similar to or better than several competitive baselines on public datasets Spider.

Published

2024-11-16

How to Cite

Tingxuan Fu, Yu Fu, Haoran Li, Sijia Hao, Qiming Chen. (2024). Enhancing Text-to-SQL Capabilities of Large Language Models by intermediate representations and Chain of Thought. The International Journal of Multiphysics, 18(4), 345 - 357. Retrieved from https://themultiphysicsjournal.com/index.php/ijm/article/view/1570

Issue

Section

Articles