# GenDB: An LLM-Powered Generative Query Engine

A research query engine that uses a pipeline of LLM agents to generate instance-optimized, standalone executable code for SQL queries, tailored to a specific dataset, workload and hardware.

GenDB is a generative query engine that generates instance-optimized query execution code tailored to specific data, workloads and hardware, rather than executing queries through a fixed general-purpose engine. Given a database schema, SQL queries, data files, hardware specifications and optimization targets, a pipeline of five specialized LLM agents, a Workload Analyzer, a Storage/Index Designer, a Query Planner, a Code Generator and a Query Optimizer, collaborates through structured JSON, each equipped with tools for file I/O, terminal access and web search.

The output is a set of optimized storage structures, indexes, and one standalone executable per query. The project reports being 2.8 times faster than DuckDB and Umbra on TPC-H and 5.0 times faster than DuckDB on real-world financial data, and includes an interactive demo showing the pipeline's steps on TPC-H queries.

It is under active development, with a stable snapshot used for its accompanying research paper kept on a separate branch.

Website: https://solidlao.github.io/GenDB/
