← All work

Data

Preparing a database so an AI agent can query it

The agent writes SQL from plain-English questions. I prepared the database so its queries are correct and fast: column descriptions it can read, clean views, a pre-computed table and search indexes.

The problem

Raw operational tables are wide, inconsistently named and full of exceptions. An LLM querying them directly gives slow and wrong answers.

The approach

What I learned