@inproceedings{santos-etal-2026-multi,
title = "Multi-Agent Architecture with {RAG} and Dynamic Context Windows for Text-to-{SQL} Optimization",
author = "Santos, Willgnner Ferreira and
Santos, Paulo Victor dos and
Martins, Marcella Scoczynski Ribeiro and
Lekakis, Larissa Freire and
Rosa, Frederico Lemes and
Costa, Bruno Matheus and
Filho, Miguel Alves Pereira and
Montalv{\~a}o, Isabella Alves",
editor = "Souza, Marlo and
de-Dios-Flores, Iria and
Santos, Diana and
Freitas, Larissa and
Souza, Jackson Wilke da Cruz and
Ribeiro, Eug{\'e}nio",
booktitle = "Proceedings of the 17th International Conference on Computational Processing of {P}ortuguese ({PROPOR} 2026) - Vol. 1",
month = apr,
year = "2026",
address = "Salvador, Brazil",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.propor-1.100/",
pages = "988--993",
ISBN = "979-8-89176-387-6",
abstract = "Natural language interfaces supported by LLMs have been used to translate user questions into SQL queries, but sending the complete database schema in each prompt entails high token consumption and computational cost, especially in corporate databases with hundreds of tables. This work presents a multi-agent Text-to-SQL architecture with dynamic context windows, which combines RAG and metadata dictionaries to select, at query time, only the relevant tables and columns. In a case study with Firebird enterprise databases, the approach reduces by an average of 84.4{\%} the number of processed tokens, resulting in more efficient queries without loss of quality, thereby contributing to the democratization of access to corporate databases."
}<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3">
<mods ID="santos-etal-2026-multi">
<titleInfo>
<title>Multi-Agent Architecture with RAG and Dynamic Context Windows for Text-to-SQL Optimization</title>
</titleInfo>
<name type="personal">
<namePart type="given">Willgnner</namePart>
<namePart type="given">Ferreira</namePart>
<namePart type="family">Santos</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Paulo</namePart>
<namePart type="given">Victor</namePart>
<namePart type="given">dos</namePart>
<namePart type="family">Santos</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Marcella</namePart>
<namePart type="given">Scoczynski</namePart>
<namePart type="given">Ribeiro</namePart>
<namePart type="family">Martins</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Larissa</namePart>
<namePart type="given">Freire</namePart>
<namePart type="family">Lekakis</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Frederico</namePart>
<namePart type="given">Lemes</namePart>
<namePart type="family">Rosa</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Bruno</namePart>
<namePart type="given">Matheus</namePart>
<namePart type="family">Costa</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Miguel</namePart>
<namePart type="given">Alves</namePart>
<namePart type="given">Pereira</namePart>
<namePart type="family">Filho</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Isabella</namePart>
<namePart type="given">Alves</namePart>
<namePart type="family">Montalvão</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<originInfo>
<dateIssued>2026-04</dateIssued>
</originInfo>
<typeOfResource>text</typeOfResource>
<relatedItem type="host">
<titleInfo>
<title>Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1</title>
</titleInfo>
<name type="personal">
<namePart type="given">Marlo</namePart>
<namePart type="family">Souza</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Iria</namePart>
<namePart type="family">de-Dios-Flores</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Diana</namePart>
<namePart type="family">Santos</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Larissa</namePart>
<namePart type="family">Freitas</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Jackson</namePart>
<namePart type="given">Wilke</namePart>
<namePart type="given">da</namePart>
<namePart type="given">Cruz</namePart>
<namePart type="family">Souza</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Eugénio</namePart>
<namePart type="family">Ribeiro</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<originInfo>
<publisher>Association for Computational Linguistics</publisher>
<place>
<placeTerm type="text">Salvador, Brazil</placeTerm>
</place>
</originInfo>
<genre authority="marcgt">conference publication</genre>
<identifier type="isbn">979-8-89176-387-6</identifier>
</relatedItem>
<abstract>Natural language interfaces supported by LLMs have been used to translate user questions into SQL queries, but sending the complete database schema in each prompt entails high token consumption and computational cost, especially in corporate databases with hundreds of tables. This work presents a multi-agent Text-to-SQL architecture with dynamic context windows, which combines RAG and metadata dictionaries to select, at query time, only the relevant tables and columns. In a case study with Firebird enterprise databases, the approach reduces by an average of 84.4% the number of processed tokens, resulting in more efficient queries without loss of quality, thereby contributing to the democratization of access to corporate databases.</abstract>
<identifier type="citekey">santos-etal-2026-multi</identifier>
<location>
<url>https://aclanthology.org/2026.propor-1.100/</url>
</location>
<part>
<date>2026-04</date>
<extent unit="page">
<start>988</start>
<end>993</end>
</extent>
</part>
</mods>
</modsCollection>
%0 Conference Proceedings
%T Multi-Agent Architecture with RAG and Dynamic Context Windows for Text-to-SQL Optimization
%A Santos, Willgnner Ferreira
%A Santos, Paulo Victor dos
%A Martins, Marcella Scoczynski Ribeiro
%A Lekakis, Larissa Freire
%A Rosa, Frederico Lemes
%A Costa, Bruno Matheus
%A Filho, Miguel Alves Pereira
%A Montalvão, Isabella Alves
%Y Souza, Marlo
%Y de-Dios-Flores, Iria
%Y Santos, Diana
%Y Freitas, Larissa
%Y Souza, Jackson Wilke da Cruz
%Y Ribeiro, Eugénio
%S Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1
%D 2026
%8 April
%I Association for Computational Linguistics
%C Salvador, Brazil
%@ 979-8-89176-387-6
%F santos-etal-2026-multi
%X Natural language interfaces supported by LLMs have been used to translate user questions into SQL queries, but sending the complete database schema in each prompt entails high token consumption and computational cost, especially in corporate databases with hundreds of tables. This work presents a multi-agent Text-to-SQL architecture with dynamic context windows, which combines RAG and metadata dictionaries to select, at query time, only the relevant tables and columns. In a case study with Firebird enterprise databases, the approach reduces by an average of 84.4% the number of processed tokens, resulting in more efficient queries without loss of quality, thereby contributing to the democratization of access to corporate databases.
%U https://aclanthology.org/2026.propor-1.100/
%P 988-993
Markdown (Informal)
[Multi-Agent Architecture with RAG and Dynamic Context Windows for Text-to-SQL Optimization](https://aclanthology.org/2026.propor-1.100/) (Santos et al., PROPOR 2026)
ACL
- Willgnner Ferreira Santos, Paulo Victor dos Santos, Marcella Scoczynski Ribeiro Martins, Larissa Freire Lekakis, Frederico Lemes Rosa, Bruno Matheus Costa, Miguel Alves Pereira Filho, and Isabella Alves Montalvão. 2026. Multi-Agent Architecture with RAG and Dynamic Context Windows for Text-to-SQL Optimization. In Proceedings of the 17th International Conference on Computational Processing of Portuguese (PROPOR 2026) - Vol. 1, pages 988–993, Salvador, Brazil. Association for Computational Linguistics.