<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nafiz ALTAY</title>
    <description>The latest articles on DEV Community by Nafiz ALTAY (@nafo).</description>
    <link>https://dev.to/nafo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F813524%2Fc3f65f9f-cb10-4151-ace0-eda199347fc6.png</url>
      <title>DEV Community: Nafiz ALTAY</title>
      <link>https://dev.to/nafo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nafo"/>
    <language>en</language>
    <item>
      <title>Your dbt descriptions are your AI agent’s real prompt</title>
      <dc:creator>Nafiz ALTAY</dc:creator>
      <pubDate>Fri, 09 Oct 2026 11:25:52 +0000</pubDate>
      <link>https://dev.to/nafo/your-dbt-descriptions-are-your-ai-agents-real-prompt-3f1b</link>
      <guid>https://dev.to/nafo/your-dbt-descriptions-are-your-ai-agents-real-prompt-3f1b</guid>
      <description>&lt;p&gt;I built an MCP server so AI agents can find and query our company data. Most of my time did not go into the server. It went into one question: why does the agent pick the wrong table?&lt;/p&gt;

&lt;p&gt;The answer is almost always the dbt docs. Here is what I learned.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The agent only sees the start of your description
&lt;/h3&gt;

&lt;p&gt;When I indexed our dbt models for search, I could not embed everything. Long text gets cut. So only the first line of a model description and the first two sentences of each column count.&lt;/p&gt;

&lt;p&gt;Everything after that never reaches the search. Put the point in sentence one: what this table is, at what grain, and what it is not. Same for NULLs. If a column is null for a special reason, say it in the first sentence.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Never let AI write your YAML from the model
&lt;/h3&gt;

&lt;p&gt;This is the biggest trap. You have 300 models, no time, so you ask an AI to write the descriptions from the SQL.&lt;/p&gt;

&lt;p&gt;You get things like user_id: Identifier of user.&lt;/p&gt;

&lt;p&gt;That says nothing. The agent can already see the column is called user_id. What it needs to know is how to use it: which table to join it to, whether it can be null, whether it is the player or the account, and which other user_id columns it must not be mixed with.&lt;/p&gt;

&lt;p&gt;An AI that reads the model can only repeat the model. Then the agent reads that text and learns nothing new. You are in a loop: the code explains itself to itself. Descriptions have to come from someone who knows how the data is used.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Not every table belongs in the index
&lt;/h3&gt;

&lt;p&gt;You can answer the same question from five different tables. Raw events, a staging view, a cleaned model, a mart, a dashboard table. If all five are searchable, the agent will pick any of them, and some give a different number.&lt;/p&gt;

&lt;p&gt;I keep raw, monitoring and technical schemas out of the index on purpose. The agent should only find the layer I want people to query: the core and mart models, where the logic is already decided. The cleaned, shared layer in the middle of a medallion setup matters most here, because that is where the business definitions live.&lt;/p&gt;

&lt;p&gt;Less in the index means fewer wrong answers.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. More chunks is not more recall
&lt;/h3&gt;

&lt;p&gt;I used to split wide tables into several chunks, one per group of columns. On a set of 224 real questions, those chunks took 33% of the top-5 results and produced only 6.6% of the correct answers. They carried column names and no context, so they matched everything.&lt;/p&gt;

&lt;p&gt;One chunk per table, with the description first, fixed it. Hit rate went from 0.879 to 0.893 and noise from unrelated tables dropped a lot (30 → 9 on one group of questions).&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Test what your users really send
&lt;/h3&gt;

&lt;p&gt;My Turkish test scored 0.52 against 0.91 in English. Then I checked the logs: the agent translates the question to English before it calls the tool, every time. The Turkish test measured something nobody does.&lt;/p&gt;

&lt;p&gt;This is the first post in a short series on running a data platform that AI agents can use, so a whole product team can make data-driven decisions at any hour without waiting for an analyst.&lt;/p&gt;

&lt;h4&gt;
  
  
  Coming up:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;The key building blocks of an AI-centered data platform, and how to get a whole product team using it day to day&lt;/li&gt;
&lt;li&gt;Tricks that improve the quality of what the agent gives back&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>data</category>
      <category>product</category>
    </item>
  </channel>
</rss>
