How much should a data agent learn upfront, and what should it look up as it goes?
retained text
We're building an agent that helps teams investigate questions about their business data. Before it starts, we prepare a catalog of the available tables, their columns, and possible joins. We call that step discovery. The agent uses this catalog to choose where to look, then checks the live source as it investigates. Our first version used an agent to inspect schemas and write the catalog. The query agent can inspect schemas and look up values as it goes, so it has ways to fill gaps. That adds tool calls and can mean revising a query after reading more metadata. We wanted discovery to give it a more useful starting point and reduce that extra work. We moved schema collection into code for the sources on our new path. Code reads table names, columns, types, and available key constraints from metadata. It also groups shard tables and partitions, and finds matching schema layouts. The model then decides which tables matter, whether matching layouts are copies, and what the tables mean. For table selection, it returns numbers from a supplied list, which code resolves back to names. When it writes column descriptions, code rejects names absent from the source catalog. We describe up to 20 tables per call, fewer for wide schemas. We're still deciding how much belongs in that initial map. Discovery doesn't sample row values on this path, so the query agent looks up filter values when it needs them. It still reads the live schema before writing SQL. Descriptions and suggested joins also need checking against what the investigation finds. Some sources still use an agent to explore what's available and write the catalog. What would you include upfront to save the agent work later? Would you sample categorical values during discovery, or keep those checks inside each investigation?
document fetched 2026-10-20 00:19 · canonical https://reddit.com/r/AI_Agents/comments/1x9wmgm/how_much_should_a_data_agent_learn_upfront_and