Experience Report: Hey LLM, Generate SQL!

Florian Heinz, Johannes Schildgen · Datenbank-Spektrum · 2025

Abstract Large Language Models have advanced to a resourceful tool with many applications. One particularly interesting use case is the LLM-aided generation of ad-hoc database queries and the possibility of subsequent processing of the results in a way suiting the users intents. In this article, practical ways and experiences are described on how to effectively use LLMs to map a natural-language user query to an SQL query conforming to a specific database schema and post-processing the results of this query in order to, for example, create an appealing visualization. Best results are achieved under favorable circumstances, as, for example, a clean and meaningful named database schema.

Read the paper · More papers on PaperTik