AI Agents to Make Sense of Data at OpenAI

Open original

OpenAI’s data productivity team built Kepler, an AI agent that understands their data platform context and writes iterative SQL to answer complex data questions. It handles table discovery, query refinement, follow-up prompts and even visualizations, cutting analysis time and reducing errors.

  • OpenAI built Kepler, an internal AI agent that writes iterative SQL to answer data questions across 70,000 datasets and 600 petabytes daily, deployed via Slack, IDEs, or web UI
  • It doesn't just query once—it discovers tables, refines CTEs, verifies numbers against dashboards/Notion, and proposes hypotheses (e.g., duplicate logging) for anomalies like a WAU spike
  • Memory for self-learning plus rigorous evals let it improve over time without regressing
  • Rolled out to 80% of the company, turning multi-engineer, multi-hour investigations into minutes

OpenAI’s data productivity team faced a common pain point: answering simple business questions like “How many ChatGPT Pro users do we have in Italy?” required multiple engineers, code deep dives and Slack threads. They manage 70,000 datasets across 600 petabytes daily, and figuring out which tables to query—some with encrypted IDs, some pre-filtered for fraud—can derail any quick answer. Writing performant SQL across Trino’s one-indexed arrays only adds frustration. To solve this, they built Kepler, an AI-powered data analyst that plugs into Slack, IDEs or web UIs. You type your question, Kepler searches its internal knowledge, inspects table schemas, then iteratively writes and runs SQL queries. It adjusts thresholds, buckets by percentiles, refines CTEs and even formats the output. In a New York taxi-trip example, it pinpointed ZIP-pair reliability by comparing p95 to p50 durations, generated a chart on request and linked raw results—all without a human writing a line of SQL. Kepler also handles more complex investigations, like diagnosing a spike in ChatGPT weekly active users in late March. It identifies the right growth table, verifies numbers against dashboards and Notion docs, slices data by region and plan, then suggests hypotheses—duplicate logging or a regional rollout. Throughout, Kepler records its chain of thought, runs dimension-based queries and surfaces links to dashboards for human validation. Behind the scenes, OpenAI emphasizes two features: memory for self-learning—so Kepler refines its behavior over time—and rigorous evals to prevent regressions. They’ve rolled Kepler out internally across 80% of the company, cutting hours of manual analysis down to minutes and letting teams focus on insights instead of hunting data.

Ask about this article