Evaluating Retrieval-Augmented Generation Variants for Natural Language-Based SQL and API Call Generation
Michael Marketsm\"uller, Simon Martin, Tim Schlippe

TL;DR
This paper evaluates retrieval-augmented generation variants for translating natural language into SQL and API calls in enterprise systems, highlighting the importance of retrieval strategies for accurate code generation.
Contribution
It provides a comprehensive comparison of RAG, Self-RAG, and CoRAG in enterprise contexts, demonstrating the effectiveness of retrieval policies in hybrid documentation scenarios.
Findings
Retrieval significantly improves code accuracy, with up to 79.30% execution accuracy.
CoRAG outperforms other variants in hybrid documentation settings.
Iterative query decomposition enhances retrieval effectiveness over other methods.
Abstract
Enterprise systems increasingly require natural language interfaces that can translate user requests into structured operations such as SQL queries and REST API calls. While large language models (LLMs) show promise for code generation [Chen et al., 2021; Huynh and Lin, 2025], their effectiveness in domain-specific enterprise contexts remains underexplored, particularly when both retrieval and modification tasks must be handled jointly. This paper presents a comprehensive evaluation of three retrieval-augmented generation (RAG) variants [Lewis et al., 2021] -- standard RAG, Self-RAG [Asai et al., 2024], and CoRAG [Wang et al., 2025] -- across SQL query generation, REST API call generation, and a combined task requiring dynamic task classification. Using SAP Transactional Banking as a realistic enterprise use case, we construct a novel test dataset covering both modalities and evaluate…
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
TopicsSoftware Engineering Research · Web Data Mining and Analysis · Natural Language Processing Techniques
