Auto prompt sql: a resource-efficient architecture for text-to-sql translation in constrained environments
Zetong Tang, Qian Ma, Di Wu

TL;DR
Auto Prompt SQL (AP-SQL) introduces a resource-efficient architecture that combines schema filtering, retrieval, and prompt engineering to improve text-to-SQL translation in constrained environments, achieving high accuracy on benchmarks.
Contribution
The paper presents a novel architecture that effectively leverages small open-source models with prompt engineering and fine-tuning to match large model performance in resource-limited settings.
Findings
Achieves competitive accuracy on Spider benchmark
Enhances reasoning with Chain-of-Thought and Graph-of-Thought prompts
Demonstrates resource efficiency in text-to-SQL tasks
Abstract
Using the best Text-to-SQL methods in resource-constrained environments is challenging due to their reliance on resource-intensive open-source models. This paper introduces Auto Prompt SQL(AP-SQL), a novel architecture designed to bridge the gap between resource-efficient small open-source models and the powerful capabilities of large closed-source models for Text-to-SQL translation. Our method decomposes the task into schema filtering, retrieval-augmented text-to-SQL generation based on in-context examples, and prompt-driven schema linking and SQL generation. To improve schema selection accuracy, we fine-tune large language models. Crucially, we also explore the impact of prompt engineering throughout the process, leveraging Chain-of-Thought(CoT) and Graph-of-Thought(GoT) templates to significantly enhance the model's reasoning for accurate SQL generation. Comprehensive evaluations on…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Semantic Web and Ontologies · Digital Humanities and Scholarship
