GitHunt
NI

nimaboubanian/llm-text-to-query

A Docker-based microservices project converts natural language questions to SQL queries using local LLMs.

LLM Text-to-Query

Convert natural language to SQL queries using local LLMs.

Interactive Shell

# Start all services
docker compose up -d

# Enter interactive REPL
docker compose exec app uv run text2query

Benchmark

# Start benchmark
docker compose --profile benchmark up --build orchestrator

The automated TPC-H benchmark runs in three phases:

Phase 1 — Setup & Validation

  1. Generates/Validates TPC-H test data using tpchgen-cli
  2. Loads database schema, data, and indexes
  3. Generates ground truth answer CSVs from reference queries

Phase 2 — LLM Query Generation & Execution

  1. Prompts natural language questions to the LLM with the database schema
  2. Executes LLM-generated SQL against the database

Phase 3 — Analysis & Archiving

  1. Evaluates each query using similarity criteria
  2. Generates the reports to benchmark/results/YYYY-MM-DD_HH-MM-SS/

Languages

Python97.2%Dockerfile1.8%Shell1.0%

Contributors

Apache License 2.0
Created November 21, 2025
Updated February 25, 2026
nimaboubanian/llm-text-to-query | GitHunt