Enhancing Text-to-SQL with In-Context Learning: A Multi-Agent Approach Based on CHESS - Miyaji, Renato O.; Fernandes, Rafael M.; Martins, Krysthian F.; Melegati, Jorge; Corrêa, Pedro L. P. (Anais do Simpósio Brasileiro de Banco de Dados (SBBD); 2025: Anais do XL Simpósio Brasileiro de Bancos de Dados, 2025)
Text-to-SQL has gained increasing attention with Large Language Models (LLMs). While existing architectures have demonstrated the potential of multi-agent systems there remains significant room for improvement. In this work, we extend the CHESS framework by integrating In-Context Learning (ICL) techniques into the Candidate Generator module, evaluating three strategies: Zero-Shot, Few-Shot Learning, and Retrieval-Augmented Generation (RAG). We implement the system using GPT-4o, and perform experiments on the financial dataset from BIRD-SQL. Results show that Few-Shot Learning and RAG significantly outperform the standard approach. Compared to Zero-Shot (59.31% Execution Accuracy (EX), 0.412 ROUGE-1), RAG significantly boosted performance, increasing EX to 69.48% and ROUGE-1 to 0.652.