TubeSum ← Transcribe a video

How OpenAI Built Its Data Agent

0h 06m video Published Jul 22, 2026 Transcribed Aug 6, 2026 B ByteByteGo
Intermediate 4 min read For: Data engineers, AI practitioners, and technical leaders interested in building practical AI agents.
AI Trust Score 75/100
⚠️ Average / Some Fluff

"Delivers exactly what the title promises with concrete insights, though some sections feel padded."

AI Summary

OpenAI's internal data agent, built on GPT-5.5, serves thousands of employees daily by answering data questions in Slack. The agent's simplicity—one model, 13 tools, and a runtime loop—contrasts with complex multi-agent systems, with the real engineering concentrated in a context assembly layer that pre-processes table descriptions, company knowledge, and memory. The video also highlights five engineering lessons from OpenAI's experience, including the importance of data foundation, fewer tools, and high-level guidance.

[00:03]
Simplicity over complexity

OpenAI's internal data agent is described as 'pretty simple' despite industry trends toward multi-agent pipelines and fine-tuned models. It uses one model (GPT-5.5) for every request, 13 tools, and a runtime loop.

[00:33]
Agent architecture

Every agent is an LLM plus a harness. The LLM reasons, while the harness supplies context and tools, running the model in a loop. OpenAI's agent skips routers and fine-tuning, focusing on a context assembly layer.

[01:35]
Context assembly challenge

The warehouse has over 70,000 tables, so the agent must find relevant ones. Schemas alone are insufficient because tables can look identical but differ in important ways (e.g., logged-out users).

[02:17]
Table descriptions from three sources

Table descriptions are built from usage metadata, human annotations, and Codex enrichment (a nightly job reading code behind each table). These are merged daily for search.

[02:45]
Additional context sources

Company knowledge from Slack, Docs, and Notion, plus corrections from past conversations, enrich the context. The context assembly step retrieves relevant descriptions, knowledge, and memory.

[03:24]
Simple runtime loop

After context assembly, the agent writes SQL, runs it, checks results, and refines until the answer holds up. The hard work happens before the question arrives.

[03:40]
Codex internal use cases

Codex is used for data migration (90,000 tables, 600 PB in 2 months), patch releasing for open-source forks (unattended for months), and support (100 fixes per day per engineer).

[04:33]
Lesson 1: Foundation matters

Every table comes from one mono repo with enforced conventions and annotations. A vanilla agent is reliable only if the data foundation is solid.

[05:00]
Lesson 2: Fewer tools beat more

Starting with 40 tools led to wrong picks and conflicting answers. Capping at 13 with no overlap fixed the issue.

[05:14]
Lesson 3: Not all queries are worth learning

Embedding every SQL query as examples failed because most are one-off experiments. Ranking by trust (dashboard queries top) improved performance.

[05:30]
Lesson 4: Guide the goal, not the steps

Detailed step-by-step prompts made answers worse; high-level goals worked better.

[05:46]
Lesson 5: Be more ambitious

The migration was estimated to take much longer than two months, but OpenAI pushed for two and hit it. Timeline estimates from before AI are outdated.

OpenAI's data agent demonstrates that simplicity, backed by a strong data foundation and smart context assembly, can outperform complex multi-agent systems. The five engineering lessons emphasize the importance of data quality, tool minimalism, selective learning, high-level guidance, and ambitious timelines in the AI era.

Mentioned in this Video

Study Flashcards (8)

What is the core architecture of OpenAI's data agent?

easy Click to reveal answer

One LLM (GPT-5.5) plus a harness with 13 tools, a runtime loop, and a context assembly layer.

00:49

Why are table schemas alone insufficient for the agent to choose the right table?

medium Click to reveal answer

Two tables can look identical in schema but differ in important ways, such as including logged-out users or not.

02:02

What are the three sources used to create table descriptions?

medium Click to reveal answer

Table usage metadata, human annotations, and Codex enrichment (nightly job reading code).

02:17

How many tables are in OpenAI's warehouse?

easy Click to reveal answer

Over 70,000 tables.

01:35

What was the result of starting with 40 tools?

medium Click to reveal answer

The agent picked wrong tools or got conflicting answers; capping at 13 with no overlap fixed it.

05:00

Why did embedding every SQL query as examples fail?

medium Click to reveal answer

Most queries are one-off experiments, not good examples of table usage.

05:14

What is the recommended approach for prompts according to OpenAI's lesson?

easy Click to reveal answer

Guide the goal, not the steps; high-level goals work better than detailed step-by-step prompts.

05:30

How long did the data migration take, and what was the scale?

medium Click to reveal answer

About 2 months, migrating 90,000 tables and 600 petabytes.

03:52

💡 Key Takeaways

💡

Simplicity over complexity

Challenges the industry trend toward complex multi-agent systems, showing that a simple agent can be effective.

00:03
🔧

Three-source table descriptions

Provides a concrete method for enriching schema with context, crucial for agent accuracy.

02:17
⚖️

Foundation matters more than the agent

Emphasizes that data quality and conventions are prerequisites for reliable AI agents.

04:33
💡

Be more ambitious

Highlights that AI changes what's possible, urging teams to set aggressive timelines.

05:46

[00:03] Multi-agent pipelines, routers, fine-tuned models. But inside the top labs, the trend runs the other way. OpenAI's internal data agent serves thousands of employees every day, and the team describes it as pretty simple.

[00:18] We met with Emma Tong, data platform lead at OpenAI, to learn how the agent is built, how the team uses Codex internally, and five important internally, and five important engineering lessons from OpenAI.

[00:33] engineer types into Slack, "How many active users did we have over the last few weeks?" Seconds later, the agent replies with the answer, the SQL it ran, and the tables it used. Under the hood, every agent is an LLM plus a harness.

[00:49] The LLM reasons. The harness supplies context and tools, and runs the model in a loop so it can act on what it reasons. This is where the systems usually get complex. A router for easy versus hard questions, multiple models, fine-tuning

[01:04] on internal data, a separate retrieval pipeline per content type. Each piece can help, and each adds cost, latency, and new ways to fail. OpenAI's agent skips all of it. One model, which is GPT 5.5 on every

[01:21] model, which is GPT 5.5 on every request, 13 tools, a runtime loop, and a context assembly layer, which is where the real engineering lives. So, what's in that context layer? Start with the problem it solves. A user asks a

[01:35] question in plain English, and to answer it, the agent has to write SQL against the right tables. But OpenAI's warehouse has over 70,000 of them. So, the first challenge is just finding the ones that matter. This is where the context

[01:49] assembler comes in. It gathers what the model needs to make that choice. To help the model understand the tables, the most obvious approach is to include the schema of each table in the model's context.

[02:02] Two tables can both have a user ID column and look nearly identical, yet one includes logged out users and the other doesn't. Nothing in the schema tells the model which one to pick. Since schemas alone aren't enough to

[02:17] describe a table, the team created table descriptions from three sources. The first is table usage metadata, which captures how people have queried the table in the past. The second is human annotations, the

[02:30] notes written by the table's owners. And the third is Codex enrichment, a nightly Codex job that reads the code behind each table and records what it really contains and when to use it. Once a day, these three are merged into

[02:45] for search. Table descriptions in the context give the LLM a lot to work with. But in addition to them, two more sources enrich the context. Company knowledge from Slack, Docs, and Notion, and

[02:59] corrections the agent remembers from past conversations. When a question arrives, the context assembly step retrieves the relevant table descriptions and knowledge, then fetches relevant memory to build the

[03:11] context. Once the context is assembled, the rest is simple. The agent writes SQL, runs it, checks the result, and refines until the answer holds up. That's the design. The agent stays

[03:24] simple because the hard work happens before any question arrives in the before any question arrives in the context assembly layer. descriptions earlier, but that's not the only place OpenAI uses it internally.

[03:40] The team relies on Codex for several tasks that keep the platform running. Here are the three main ones. Data migration. When the platform ran out of capacity on one cloud, Codex generated the pull

[03:52] one cloud, Codex generated the pull request to migrate 90,000 tables and 600 petabytes, finished in about 2 months. Patch releaser. The platform maintains more than a dozen open-source forks. A Codex release agent

[04:06] now tests and ships patches for all of them, running unattended for months without an incident. Support bot. And on support, the on-call engineer hands tickets to Codex, which

[04:18] investigates and applies fixes for review. Around 100 fixes per day per review. Around 100 fixes per day per engineer. apply to every engineer. One.

[04:33] The foundation matters more than the agent. Every table at OpenAI comes from one mono repo with enforced conventions and required annotations. That's what makes a vanilla agent reliable. If your data is scattered, the agent isn't the

[04:48] first investment. The foundation is. Number two. Fewer tools beat more tools. The team started with around 40 tools, and the agent kept picking wrong ones or

[05:00] getting conflicting answers from tools doing similar jobs. Capping at 13 with doing similar jobs. Capping at 13 with no overlap fixed it. Number three. Not every past query is worth learning from. The team first embedded every SQL query

[05:14] ever written as examples for the agent. That failed. Most queries are one-off experiments, not good examples of how a table should be used. The fix was ranking them by trust. Queries behind heavily used dashboards at the top,

[05:30] one-offs at the bottom. The agent then relies on the top queries. Number four. Guide the goal, not the Detailed step-by-step prompts made answers worse. High-level goals, good

[05:46] better. Number five, and finally, be more The migration was estimated to take much longer than two months. OpenAI pushed

[05:58] for two, and the team hit it. Timeline estimates from before AI no And the bigger risk now is playing it safe.

More from ByteByteGo

View all

⚡ Saved you 0h 06m reading this? Transcribe any YouTube video for free — no signup needed.