Build a natural language database query system in Go using LLMs. The tutorial demonstrates a two-step architecture: first prompting an LLM to generate SQL from plain English questions, then querying the database and having the LLM format results into natural language answers. Uses Kronk model server (OpenAI-compatible) with the Ministral model, DuckDB for data storage, and includes complete working code with prompt engineering examples for converting user questions into SQL queries and formatting database results.

8m read timeFrom ardanlabs.com
Post cover image
Table of contents
IntroductionSetting UpArchitecture OverviewInitializationUser loopQuerying LLMsQuerying the LLMRunning The codeSummary

Sort: