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

CardsList
  1. AgenticRAG: Agentic Retrieval for Enterprise Knowledge Bases

    May 7, 2026Susheel Suresh, Hazel Mak, Shangpo Chou +2Knowledge-Intensive QAAgentic Search

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

    Mar 6, 2026Koki Itai, Shunichi Hasegawa, Yuta Yamamoto +2RAG EvaluationLLM Evaluation

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

    Jul 26, 2026Ange Maiztegi, Jon Ayerdi, Miren Illarramendi +1RAG EvaluationAutomated Test Generation