cs.SEFeb 6, 2026

RAG Strategies for Natural Language-Based SQL Query and REST API Call Generation

Authors: Tim Schlippe, Simon Martin, Michael Marketsmüller

Organizations: IU International University of Applied Sciences, Germany

Abstract

Enterprise software systems commonly expose functionality through relational databases and REST APIs, requiring users to understand schemas, endpoints, and parameters. Retrieval-augmented generation (RAG) can support natural language interfaces by grounding large language models (LLMs) in enterprise-specific documentation. We evaluate three training-free RAG configurations - Standard RAG, Relevance Filtering RAG, and Iterative Retrieval RAG - for SQL query generation, REST API call generation, and a combined task requiring routing between both operation types. Using SAP Transactional Banking, we constructed an expert-reviewed dataset with mock execution screening and compared the configurations under database-only, API-only, and mixed-documentation settings. Without retrieval, exact match accuracy is 0% across all tasks, whereas retrieval achieves mock execution success of up to 79.30% and component match accuracy of up to 78.86%. In the combined task, Iterative Retrieval RAG achieves higher exact match accuracy than Standard RAG (10.29% vs. 7.45%), with similar mock execution success (68.93% vs. 67.10%). However, for REST API call generation under mixed documentation, Iterative Retrieval RAG achieves lower mock execution success than Standard RAG (50.53% vs. 75.79%). Overall, retrieval-control strategies show task- and metric-dependent behavior under mixed-documentation settings.

Figures & tables

Explore similar work

May 7, 2026

AgenticRAG: Agentic Retrieval for Enterprise Knowledge Bases

We present AgenticRAG, a practical agentic harness for retrieval and analysis over enterprise knowledge bases. Standard RAG pipelines place significant burden of grounding on the search stack, constraining the language model to a fixed candidate set chosen deep in the retrieval process. Our approach reduces this overdependence by layering a lightweight harness on top of existing enterprise search infrastructure, equipping a reasoning LLM with search, find, open, and summarize tools enabling the model to iteratively retrieve information, navigate within documents, and analyze evidence autonomously. On three open benchmarks we observe substantial gains: 49.6%49.6\% recall@1 on BRIGHT (+21.8 pp over the best embedding baseline), 0.96 factuality on WixQA (+13%+13\% relative improvement), and 92%92\% answer correctness on FinanceBench--within 2 pp of oracle access to true evidence. Ablation studies show that the most significant factor is the shift from single-shot retrieval to agentic tool use (5.9×5.9\times improvement), while multi-query search and in-document navigation contribute to both quality and efficiency. We present various design choices in our agentic harness that were informed by pre-production deployments. Our results demonstrate its suitability for real-world enterprise production environments.
Mar 6, 2026

LIT-RAGBench: Benchmarking Generator Capabilities of Large Language Models in Retrieval-Augmented Generation

Retrieval-Augmented Generation (RAG) is a framework in which a Generator, such as a Large Language Model (LLM), produces answers by retrieving documents from an external collection using a Retriever. In practice, Generators must integrate evidence from long contexts, perform multi-step reasoning, interpret tables, and abstain when evidence is missing. However, existing benchmarks for Generators provide limited coverage, with none enabling simultaneous evaluation of multiple capabilities under unified conditions. To bridge the gap between existing evaluations and practical use, we introduce LIT-RAGBench (the Logic, Integration, Table, Reasoning, and Abstention RAG Generator Benchmark), which defines five categories: Integration, Reasoning, Logic, Table, and Abstention, each further divided into practical evaluation aspects. LIT-RAGBench systematically covers patterns combining multiple aspects across categories. By using fictional entities and scenarios, LIT-RAGBench evaluates answers grounded in the provided external documents. The dataset consists of 114 human-constructed Japanese questions and an English version generated by machine translation with human curation. We use LLM-as-a-Judge for scoring and report category-wise and overall accuracy. Across API-based and open-weight models, no model exceeds 90% overall accuracy. By making strengths and weaknesses measurable within each category, LIT-RAGBench serves as a valuable metric for model selection in practical RAG deployments and for building RAG-specialized models. We release LIT-RAGBench, including the dataset and evaluation code, at https://github.com/Koki-Itai/LIT-RAGBench.
Jul 26, 2026

RAG-TESTER: Automated End-to-End Testing of Retrieval-Augmented Large Language Models

Retrieval-Augmented Generation (RAG) enables Large Language Models (LLMs) to use external and domain-specific knowledge, but its reliability depends on the interaction between the generative model, embedding model, retrieval mechanism, and prompt construction strategy. We present RagTester, an automated end-to-end testing approach for RAG systems. RagTester generates retrieval documents, test inputs, and expected outputs; executes the tests; and evaluates the resulting answers using an LLM as a judge. Its test-generation strategy targets complex passages, unsupported queries, and document-coverage criteria. We evaluate RagTester using eight LLMs and six embedding models, yielding 24 compatible configurations, and compare it with a baseline test-input generator. Across 72,000 test executions, RagTester detected 21,633 failures, 6.6% more than the baseline, and outperformed it in 20 of the 24 configurations. The detected failures include inaccurate retrieval, unsupported answers, incomplete use of retrieved context, and difficulties interpreting complex passages. These results show that coverage-oriented test generation can effectively expose failures caused by the interaction between retrieval and generation components and support the assessment of RAG configurations before deployment.