Building Kepler: An AI Data Analyst Agent for Internal Data Exploration

Bonnie Xu2026

Problem

OpenAI has 70k datasets, and 80% of employees use its data platform. Finding the right table is slow: many tables sound alike and differ in hidden ways: some adjust for fraud, some are pre-filtered, some hold unencrypted IDs. Missing one nuance can make a number wrong by an order of magnitude, and long SQL is hard to check by eye. Table descriptions in the catalog go stale, and updating them by hand for 70k tables is, in the speaker's words, incredibly tedious.

Example from the article: a business lead asks how many ChatGPT Pro users there are in Italy. After three code deep dives, two meetings and five Slack threads, the answer finally arrives.

Solution in brief

Kepler is an agent that calls tools through MCP and keeps iterating on queries and results. It works because of three layers: table context generated daily by Codex from the code that builds the tables, company knowledge retrieved from chats and documents, and a saved-corrections memory. Golden question and SQL pairs, graded by a model, guard against regressions.

Questions this case answers
  • How to make an LLM agent pick the right table and join keys in a warehouse with tens of thousands of near-duplicate tables and outdated descriptions
  • How to keep an analytics agent improving from user corrections while limiting bad or conflicting saved corrections
  • How to regression-test generated SQL when many different queries are equally correct
  • How to help employees find the right table among tens of thousands of similar ones?

Tools and methods

  • Codex jobs — crawl the code base daily and write table descriptions
  • Embeddings and retrieval — fetch table, knowledge and memory entries at runtime
  • MCP tools — warehouse, Spark, Airflow and knowledge-search calls
  • Scoped memory — user, channel and global corrections
  • AST-normalized evals with a model grader — regression checks
Continue reading — it's free

Google or a one-time email code. No password.