paper-with-me

홈 › Papers

Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain

2023-07-11 · Chunxi Guo, Zhiliang Tian, Jintao Tang, Shasha Li, Zhihua Wen, Kaixuan Wang, Ting Wang

Text-to-SQL aims at generating SQL queries for the given natural language questions and thus helping users to query databases. Prompt learning with large language models (LLMs) has emerged as a recent approach, which designs prompts to lead LLMs to understand the input question and generate the corresponding SQL. However, it faces challenges with strict SQL syntax requirements. Existing work prompts the LLMs with a list of demonstration examples (i.e. question-SQL pairs) to generate SQL, but the fixed prompts can hardly handle the scenario where the semantic gap between the retrieved demonstration and the input question is large. In this paper, we propose a retrieval-augmented prompting method for a LLM-based Text-to-SQL framework, involving sample-aware prompting and a dynamic revision chain. Our approach incorporates sample-aware demonstrations, which include the composition of SQL operators and fine-grained information related to the given question. To retrieve questions sharing similar intents with input questions, we propose two strategies for assisting retrieval. Firstly, we leverage LLMs to simplify the original questions, unifying the syntax and thereby clarifying the users' intentions. To generate executable and accurate SQLs without human intervention, we design a dynamic revision chain which iteratively adapts fine-grained feedback from the previously generated SQL. Experimental results on three Text-to-SQL benchmarks demonstrate the superiority of our method over strong baseline models.

📄 PDF Abstract BibTeX arXiv:2307.05074

Code (0)

등록된 구현이 없습니다.

Tasks

Prompt LearningRetrievalText to SQLText-To-SQL

Similar Papers 제목 키워드 기반

RAG-Verus: Repository-Level Program Verification with LLMs using Retrieval Augmented Generation

2025-02-07 · Sicheng Zhong, Jiading Zhu, Yifang Tian, Xujie Si

Scaling automated formal verification to real-world projects requires resolving cross-module dependencies and global contexts, which are challenges overlooked by existing function-centric methods. We introduce RagVerus, …

Language ModelingLanguage ModellingRAGRetrieval+1

Retrieval-aligned Tabular Foundation Models Enable Robust Clinical Risk Prediction in Electronic Health Records Under Real-world Constraints

2026-04-02 · Minh-Khoi Pham, Thang-Long Nguyen Ho, Thao Thi Phuong Dao, Tai Tan Mai 외 arxiv

Clinical prediction from structured electronic health records (EHRs) is challenging due to high dimensionality, heterogeneity, class imbalance, and distribution shift. While tabular in-context learning (TICL) and retriev…

Mindscape-Aware Retrieval Augmented Generation for Improved Long Context Understanding

2025-12-19 · Yuqing Li, Jiangnan Li, Zheng Lin, Ziyan Zhou 외 arxiv

Humans understand long and complex texts by relying on a holistic semantic representation of the content. This global view helps organize prior knowledge, interpret new information, and integrate evidence dispersed acros…

Retrieval-Augmented Large Language Models for Evidence-Informed Guidance on Cannabidiol Use in Older Adults

2026-01-16 · Ali Abedi, Charlene H. Chu, Shehroz S. Khan arxiv

Older adults commonly experience chronic conditions such as pain and sleep disturbances and may consider cannabidiol for symptom management. Safe use requires appropriate dosing, careful titration, and awareness of drug …

Prompt Engineering

Augmenting Textual Generation via Topology Aware Retrieval

2024-05-27 · Yu Wang, Nedim Lipka, Ruiyi Zhang, Alexa Siu 외

Despite the impressive advancements of Large Language Models (LLMs) in generating text, they are often limited by the knowledge contained in the input and prone to producing inaccurate or hallucinated content. To tackle …

RAGRetrievalRetrieval-augmented GenerationText Generation