{"slug": "ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog", "title": "AI Agent Doesn't Need a Bigger Prompt. It Needs a Data Catalog", "summary": "A developer building an AI agent that generates and executes SQL found the agent returned a valid query with a wrong answer to a monthly recurring revenue question because a database schema alone cannot convey business definitions such as whether revenue includes refunds or test accounts. The developer turned to Google's Dataplex Universal Catalog, renamed Knowledge Catalog, adding business descriptions, ownership, freshness, and verified queries so the catalog functions as a context layer rather than a table inventory. The account argues that richer system prompts are not the fix; metadata tells an agent what something is, while business context tells it what something means.", "body_md": "# Your AI Agent Doesn't Need a Bigger Prompt. It Needs a Data Catalog.\n\nI was building an AI agent that could answer questions about company data.\n\nIt looked impressive.\n\nIt could call tools, generate SQL, execute queries, summarize results, and explain its reasoning.\n\nThen I asked it a simple question:\n\nWhat was our monthly recurring revenue from new customers last quarter?\n\nThe SQL was valid.\n\nThe query ran successfully.\n\nThe answer was wrong.\n\nThat was the real problem.\n\n**An AI agent can know how to query a database without understanding what the data means.**\n\n## A database schema isn't enough\n\nA database can tell an agent that a table contains:\n\n```\ncustomers\norders\nsubscriptions\nrevenue\nrefunds\n```\n\nIt can tell the model that `revenue` is a numeric column.\n\nIt cannot reliably tell the model what the company means by \"revenue.\"\n\nDoes it include refunds?\n\nDoes it include test accounts?\n\nIs recurring revenue calculated from invoices, subscriptions, or successful payments?\n\nDoes \"new customer\" mean the first purchase, first subscription, or first day the account was created?\n\nThese aren't SQL problems.\n\nThey're **context problems**.\n\nAnd stuffing more instructions into the system prompt isn't a good solution.\n\n## The catalog needs to become a context layer\n\nI started with Dataplex Universal Catalog. By the time I was working with it, Google had renamed it **Knowledge Catalog**.\n\nThe name change actually captured what I needed.\n\nI didn't just want an inventory of tables.\n\nI wanted a place where the agent could discover:\n\n- what data exists\n- what it means\n- who owns it\n- how fresh it is\n- how it should be queried\n- which definitions are trusted\n- who is allowed to access it\n\nThat turns the catalog from a directory into a **context layer**.\n\n## Start with discovery\n\nThe first step was building a reliable inventory.\n\nKnowledge Catalog can harvest metadata from sources such as BigQuery, Cloud Storage, AlloyDB, Spanner, and Cloud SQL.\n\nThat gives the agent useful technical information:\n\n```\nDataset\n ├── tables\n ├── columns\n ├── types\n ├── locations\n ├── ownership\n ├── relationships\n └── update information\n```\n\nThis solves the discovery problem.\n\nBut it doesn't solve the meaning problem.\n\nA column called:\n\n```\nrev\n```\n\ncould mean:\n\n```\nrevenue\nrevision\nreverse\n```\n\nThe schema alone doesn't know.\n\n## Add meaning where the data lives\n\nI started adding descriptions to the assets that mattered most.\n\nNot generic descriptions.\n\nBusiness meaning.\n\nFor example:\n\n```\ndataset: customer_revenue\n\ndescription: >\n  Revenue generated from paying customers.\n  Excludes refunds and internal test accounts.\n\nowner: finance\n\nfreshness: daily\n\nbusiness_terms:\n  recurring_revenue: >\n    Subscription revenue expected to repeat\n    on an ongoing basis.\n\n  new_customer: >\n    Customer whose first successful payment\n    occurred during the measurement period.\n```\n\nNow the meaning isn't trapped inside someone's head, a Slack message, or a document nobody opens.\n\nIt becomes part of the data context the agent can retrieve.\n\nThat distinction matters.\n\n**Metadata tells the agent what something is. Business context tells it what something means.**\n\n## The query problem\n\nFinding the right table was only half the problem.\n\nThe agent still had to write the right query.\n\nThis is where **verified queries** became useful.\n\nA verified query is a known-good example of how a business question should be answered.\n\nFor example:\n\nWhat was monthly recurring revenue from new customers last quarter?\n\nThere can be several SQL queries that:\n\n- compile\n- execute\n- return numbers\n- look completely reasonable\n\nOnly one may match the company's definition of recurring revenue.\n\nSo instead of asking the model to invent the logic every time, I gave it examples.\n\nConceptually:\n\n```\nquestion: >\n  What was monthly recurring revenue\n  from new customers last quarter?\n\ndataset: customer_revenue\n\nverified_query: |\n  SELECT\n    DATE_TRUNC(month, month) AS month,\n    SUM(recurring_revenue) AS mrr\n  FROM customer_revenue\n  WHERE customer_type = 'new'\n  GROUP BY month\n  ORDER BY month;\n```\n\nThe important part isn't the SQL itself.\n\nThe query captures **intent**.\n\nIt shows the agent how this organization answers this particular class of question.\n\nThe catalog now contains both:\n\n```\n\"What data exists?\"\n```\n\nand:\n\n```\n\"How do we normally use this data?\"\n```\n\nThat is a much stronger form of context.\n\n## Permissions are part of the context\n\nThere is another problem with giving an AI agent access to company data.\n\nThe easiest way to make an agent useful is to give it access to everything.\n\nThe easiest way to make that agent dangerous is also to give it access to everything.\n\nPermissions therefore can't be an afterthought.\n\nThe catalog needs to respect the access controls of the underlying data.\n\nA user shouldn't receive metadata or query context for data they aren't authorized to access simply because an LLM knows how to ask for it.\n\nThis leads to a principle I found more useful than adding another instruction to the prompt:\n\n**Permissions are stronger than reminders.**\n\nDon't tell the model:\n\n```\nDon't access sensitive data.\n```\n\nEnforce what it can actually discover and retrieve.\n\n## The architecture\n\nThe resulting architecture became much simpler to reason about:\n\n```\n                    USER\n                      |\n                      v\n                  AI AGENT\n                      |\n                      v\n              KNOWLEDGE CATALOG\n                      |\n        +-------------+-------------+\n        |             |             |\n        v             v             v\n     Metadata    Business       Verified\n                  Meaning        Queries\n        |             |             |\n        +-------------+-------------+\n                      |\n                      v\n                 Access Control\n                      |\n                      v\n                  DATA SOURCES\n```\n\nThe agent still generates SQL.\n\nThe difference is that it no longer has to reconstruct the organization's understanding of the data from a raw schema every time.\n\nIt has a map.\n\n## The model didn't become smarter\n\nThis was the most interesting part.\n\nThe model didn't suddenly become better at SQL.\n\nI didn't replace it with a larger model.\n\nI didn't write an enormous system prompt containing every possible business rule.\n\nI gave it better context.\n\nBefore:\n\n```\nUser\n  ↓\nLLM\n  ↓\nDatabase\n```\n\nAfter:\n\n```\nUser\n  ↓\nLLM\n  ↓\nRelevant data context\n  ↓\nBusiness definitions\n  ↓\nVerified examples\n  ↓\nDatabase\n```\n\nThe second architecture gives the model something much more valuable than additional instructions:\n\n**a source of truth.**\n\n## What I would build differently from the start\n\nIf I were starting the agent again, I wouldn't begin with SQL generation.\n\nI'd begin with the knowledge layer.\n\nI'd define:\n\n1. **What datasets exist?**\n2. **What does each dataset mean?**\n3. **Who owns it?**\n4. **How fresh is it?**\n5. **Which business terms map to which data?**\n6. **Which queries have already been verified?**\n7. **What can the current user access?**\n\nOnly after answering those questions would I ask the agent to generate SQL.\n\nThe SQL is the final step.\n\nThe difficult part is making sure the agent has enough information to generate the **right** SQL.\n\n## The bigger lesson\n\nAI agents are often described as if the main challenge is intelligence.\n\nIn production, the harder problem is frequently **context**.\n\nA model can be excellent at reasoning and still produce a confidently wrong answer if the information it is reasoning over is incomplete or ambiguous.\n\nThat's why I think the future of AI data systems isn't just:\n\n```\nLLM + tools\n```\n\nIt's:\n\n```\nLLM\n+\ntools\n+\nstructured knowledge\n+\nbusiness semantics\n+\nverified examples\n+\ngovernance\n```\n\nKnowledge Catalog is now the name Google uses for what used to be Dataplex Universal Catalog.\n\nFor me, the rename describes the more important shift:\n\n**from cataloging data to making data understandable to machines.**\n\nMy agent didn't need another giant system prompt.\n\nIt needed a shared source of truth.", "url": "https://wpnews.pro/news/ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog", "canonical_source": "https://aeroscissorz.github.io/aeroscissorz/posts/knowledge-catalog/", "published_at": "2026-09-13 18:40:48+00:00", "updated_at": "2026-09-13 18:51:25.121026+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-products", "natural-language-processing", "ai-infrastructure"], "entities": ["Google", "Dataplex Universal Catalog", "Knowledge Catalog", "BigQuery", "Cloud Storage", "AlloyDB", "Spanner", "Cloud SQL"], "alternates": {"html": "https://wpnews.pro/news/ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog", "markdown": "https://wpnews.pro/news/ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog.md", "text": "https://wpnews.pro/news/ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog.txt", "jsonld": "https://wpnews.pro/news/ai-agent-doesn-t-need-a-bigger-prompt-it-needs-a-data-catalog.jsonld"}}