{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T18:46:54Z","timestamp":1791917214667,"version":"4.3.4"},"reference-count":21,"publisher":"Sociedade Brasileira de Computa\u00e7\u00e3o - SBC","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"abstract":"<jats:p>Text-to-SQL agents often rely on monolithic prompts that combine instructions and examples into a single block, making them difficult to maintain, less interpretable, and more prone to structural errors. To address these limitations, this work proposes a Composable Prompt Modularization approach that decomposes prompts into semantic components for question classification and Text-to-SQL generation, leveraging large language models within a modular prompting pipeline. We conduct a case study involving an intelligent assistant for the public sector. The results show that the modular architecture is a competitive alternative to monolithic prompting, achieving up to 95.39% execution accuracy and strong structural alignment, with average component-matching scores of 0.954. The findings reveal a trade-off between prompting strategies: while the monolithic prompt is slightly more efficient when fewer examples are available (Top-k = 3), the modular approach makes better use of additional context, improving execution accuracy by 0.66 percentage points at Top-k = 5 (94.74% vs. 94.08%). In the context of public transparency, where the availability of information enables citizens to interpret, validate, and audit data, the modular approach appears particularly well-suited.<\/jats:p>","DOI":"10.5753\/sbbd.2026.249296","type":"proceedings-article","created":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T18:04:16Z","timestamp":1791914656000},"page":"673-686","source":"Crossref","is-referenced-by-count":0,"title":["Composable Prompt Modularization in Text-to-SQL Agents: A Practical Approach"],"prefix":"10.5753","author":[{"given":"Daniele Carna\u00faba","family":"Gon\u00e7alves","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"B\u00e1rbara S.","family":"Neves","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Paulina Irene Velasquez","family":"Ferrufino","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Davi Uchoa Cavalcante","family":"Costa","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Amanda","family":"Venceslau","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Wellington","family":"Franco","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Jos\u00e9 Ant\u00f4nio","family":"Mac\u00eado","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-5754-1372","authenticated-orcid":false,"given":"Raimir","family":"Holanda","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"3742","published-online":{"date-parts":[[2026,9,8]]},"reference":[{"key":"1","unstructured":"Chen, Z., Wang, C., Sun, W., Yang, G., Liu, X., Zhang, J. M., and Liu, Y. (2025). Promptware engineering: Software engineering for llm prompt development. arXiv preprint arXiv:2503.02400."},{"key":"2","doi-asserted-by":"crossref","unstructured":"Gao, D., Wang, H., Li, Y., Sun, X., Qian, Y., Ding, B., and Zhou, J. (2024). Text-to-sql empowered by large language models: A benchmark evaluation. Proceedings of the Very Large Data Bases Endowment (PVLDB), 17(5):1132\u20131145.","DOI":"10.14778\/3641204.3641221"},{"key":"3","unstructured":"Lan, W., Wang, Z., Chauhan, A., Zhu, H., Li, A., Guo, J., Zhang, S., Hang, C.-W., Lilien, J., Hu, Y., Pan, L., Dong, M., Wang, J., Jiang, J., Ash, S., Castelli, V., Ng, P., and Xiang, B. (2023). UNITE: A Unified Benchmark for Text-to-SQL Evaluation. <a href=\"https:\/\/arxiv.org\/abs\/2305.16265\"target=\"_blank\">[link]<\/a>. arXiv:2305.16265."},{"key":"4","doi-asserted-by":"crossref","unstructured":"Liang, J. T., Lin, M., Rao, N., and Myers, B. A. (2025). Prompts are programs too! understanding how developers build software containing prompts. Proceedings of the ACM on Software Engineering, 2(FSE):1591\u20131614.","DOI":"10.1145\/3729342"},{"key":"5","doi-asserted-by":"crossref","unstructured":"Liu, M., Wang, X., Xu, J., Yi, W., and Wolfson, O. (2026). A systematic review of natural language interfaces for databases. Frontiers of Computer Science, 20.","DOI":"10.1007\/s11704-025-50592-w"},{"key":"6","unstructured":"Liu, Y., Xu, J., Zhang, L. L., Chen, Q., Feng, X., Chen, Y., Guo, Z., Yang, Y., and Cheng, P. (2025). Beyond prompt content: Enhancing llm performance via content-format integrated prompt optimization. arXiv preprint arXiv:2502.04295."},{"key":"7","doi-asserted-by":"crossref","unstructured":"Luo, Y., Zhang, Z., Zhang, Y., Xie, Z., Wang, J., Jatowt, A., and Yang, Z. (2024). Data-scarce event argument extraction: A dynamic modular prompt tuning model based on slot transfer. In 2024 7th International Conference on Machine Learning and Natural Language Processing (MLNLP), pages 1\u20136. IEEE.","DOI":"10.1109\/MLNLP63328.2024.10800109"},{"key":"8","doi-asserted-by":"crossref","unstructured":"Mao, Y., He, J., and Chen, C. (2025). From prompts to templates: A systematic prompt template analysis for real-world llmapps. arXiv preprint arXiv:2504.02052.","DOI":"10.1145\/3696630.3728533"},{"key":"9","doi-asserted-by":"crossref","unstructured":"Nahid, M. M. H., Rafiei, D., Zhang, W., and Zhang, Y. (2026). Rethinking schema linking: A context-aware bidirectional retrieval approach for text-to-SQL. In Findings of the Association for Computational Linguistics: EACL 2026, pages 4516\u20134546, Rabat, Morocco. Association for Computational Linguistics.","DOI":"10.18653\/v1\/2026.findings-eacl.236"},{"key":"10","doi-asserted-by":"crossref","unstructured":"Petrola, L., Brayner, A., and Franco, W. (2025). Heuristic-guided text-to-sql translation with llms: Optimizing natural language interfaces for relational databases. In Simp\u00f3sio Brasileiro de Banco de Dados (SBBD), pages 126\u2013139. SBC.","DOI":"10.5753\/sbbd.2025.247037"},{"key":"11","doi-asserted-by":"crossref","unstructured":"Piao, S., Lee, J., and Park, S. (2026). LitE-SQL: A lightweight and efficient text-to-SQL framework with vector-based schema linking and execution-guided self-correction. In Findings of the Association for Computational Linguistics: EACL 2026, pages 3593\u20133608, Rabat, Morocco. Association for Computational Linguistics.","DOI":"10.18653\/v1\/2026.findings-eacl.186"},{"key":"12","doi-asserted-by":"crossref","unstructured":"Pourreza, M. and Rafiei, D. (2023). DIN-SQL: Decomposed in-context learning of text-to-SQL with self-correction. In Advances in Neural Information Processing Systems, volume 36, pages 36339\u201336348. Curran Associates, Inc.","DOI":"10.52202\/075280-1577"},{"key":"13","unstructured":"Santos, W. F., Santos, P. V. d., Martins, M. S. R., Lekakis, L. F., Rosa, F. L., Costa, B. M., Filho, M. A. P., and Montalv\u00e3o, I. A. (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) \u2013 Vol. 1, pages 988\u2013993, Salvador, Brazil. Association for Computational Linguistics."},{"key":"14","doi-asserted-by":"crossref","unstructured":"Schnabel, T. and Neville, J. (2024). Symbolic prompt program search: A structure-aware approach to efficient compile-time prompt optimization. arXiv preprint arXiv:2404.02319.","DOI":"10.18653\/v1\/2024.findings-emnlp.37"},{"key":"15","doi-asserted-by":"crossref","unstructured":"Shi, L., Tang, Z., Zhang, N., Zhang, X., and Yang, Z. (2025). A survey on employing large language models for text-to-SQL tasks. ACM Computing Surveys, 58(2):1\u201337.","DOI":"10.1145\/3737873"},{"key":"16","unstructured":"Shinn, N., Cassano, F., Labash, B., Gopinath, A., Narasimhan, K., and Yao, S. (2023). Reflexion: Language agents with verbal reinforcement learning, 2023. URL <a href=\"https:\/\/arxiv.org\/abs\/2303.11366\"target=\"_blank\">[link]<\/a>, 1."},{"key":"17","doi-asserted-by":"crossref","unstructured":"Tan, Z., Liu, X., Shu, Q., Li, X., Wan, C., Liu, D., Wan, Q., and Liao, G. (2024). Enhancing text-to-sql capabilities of large language models through tailored promptings. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 6091\u20136109.","DOI":"10.63317\/3e8xmkzdqsjc"},{"key":"18","unstructured":"Wang, B., Ren, C., Yang, J., Liang, X., Bai, J., Chai, L., Yan, Z., Zhang, Q.-W., Yin, D., Sun, X., and Li, Z. (2025). MAC-SQL: A multi-agent collaborative framework for text-to-SQL. In Proceedings of the 31st International Conference on Computational Linguistics, pages 540\u2013557, Abu Dhabi, UAE. Association for Computational Linguistics."},{"key":"19","unstructured":"Wang, M., Liu, Y., Liang, X., Li, S., Huang, Y., Zhang, X., Shen, S., Guan, C., Wang, D., Feng, S., et al. (2024). Langgpt: Rethinking structured reusable prompt design framework for llms from the programming language. arXiv preprint arXiv:2402.16929."},{"key":"20","doi-asserted-by":"crossref","unstructured":"Yavuz, S., Gur, I., Su, Y., and Yan, X. (2021). Text-to-sql in the wild: A naturally-occurring dataset based on stack exchange data. In Proceedings of the 3rd Workshop on Natural Language Processing for Programming (NLP4Prog), pages 77\u201387, Online. Association for Computational Linguistics.","DOI":"10.18653\/v1\/2021.nlp4prog-1.9"},{"key":"21","doi-asserted-by":"crossref","unstructured":"Zhuo, J., Zhang, S., Fang, X., Duan, H., Lin, D., and Chen, K. (2024). Prosa: Assessing and understanding the prompt sensitivity of llms. arXiv preprint arXiv:2410.12405.","DOI":"10.18653\/v1\/2024.findings-emnlp.108"}],"event":{"name":"Simp\u00f3sio Brasileiro de Banco de Dados","location":"Brasil","acronym":"SBBD 2026","number":"41"},"container-title":["Anais do XLI Simp\u00f3sio Brasileiro de Banco de Dados (SBBD 2026)"],"original-title":[],"link":[{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/download\/44006\/43769","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/download\/44006\/43769","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,10,13]],"date-time":"2026-10-13T18:06:54Z","timestamp":1791914814000},"score":1,"resource":{"primary":{"URL":"https:\/\/sol.sbc.org.br\/index.php\/sbbd\/article\/view\/44006"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,9,8]]},"references-count":21,"URL":"https:\/\/doi.org\/10.5753\/sbbd.2026.249296","relation":{},"subject":[],"published":{"date-parts":[[2026,9,8]]}}}