<?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: Raj Devnath</title>
    <description>The latest articles on DEV Community by Raj Devnath (@raj_devnath_e4afa48802d98).</description>
    <link>https://dev.to/raj_devnath_e4afa48802d98</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%2F4254497%2Fcfb1890f-8edb-4e22-b45b-b67695289423.png</url>
      <title>DEV Community: Raj Devnath</title>
      <link>https://dev.to/raj_devnath_e4afa48802d98</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raj_devnath_e4afa48802d98"/>
    <language>en</language>
    <item>
      <title>You can now build your semantic layer for your agent AI in a browser tab, no installs needed.</title>
      <dc:creator>Raj Devnath</dc:creator>
      <pubDate>Wed, 18 Nov 2026 07:26:42 +0000</pubDate>
      <link>https://dev.to/raj_devnath_e4afa48802d98/you-can-now-build-your-semantic-layer-for-your-agent-ai-in-a-browser-tab-no-installs-needed-4i2k</link>
      <guid>https://dev.to/raj_devnath_e4afa48802d98/you-can-now-build-your-semantic-layer-for-your-agent-ai-in-a-browser-tab-no-installs-needed-4i2k</guid>
      <description>&lt;p&gt;&lt;strong&gt;semlayer&lt;/strong&gt; reads your data warehouse and works out what an AI needs to know to answer business questions correctly. It shipped as a command-line tool, and people asked to see it work first. Now you can watch it map a warehouse, explore what it found, and compare right answers with wrong ones, in a browser tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkhrynt8mch9qwebi9jx6.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkhrynt8mch9qwebi9jx6.gif" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;semlayer&lt;/strong&gt; is a tool that reads a data warehouse and writes down what the data means, so that an AI asked a business question gets the number right. We shipped it as a command-line tool. The first thing people asked was some version of the same question: &lt;em&gt;can I see it in action before I install anything?&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What it costs to try a data tool
&lt;/h3&gt;

&lt;p&gt;Before a tool like ours shows you anything, it asks for three things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An install.&lt;/strong&gt; A Python environment on your machine, and at many companies, permission to put software on it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A warehouse login.&lt;/strong&gt; A read-only account and its credentials. That is a request to somebody else, and it waits in their queue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An AI key.&lt;/strong&gt; An account with a model provider, a budget behind it, and approval to send anything to it.&lt;/p&gt;

&lt;p&gt;None of these is unreasonable. Together they turn “I’ll take a look” into a small project, and a small project waits for a free afternoon that does not come. If you are an analyst or a manager and not an engineer, it may not be something you can do at all.&lt;/p&gt;

&lt;p&gt;There is a fourth cost, and it is the one people were really pointing at. When a command-line tool finishes, what you have is a text file. Everything it worked out about your warehouse is in there, but you find out by reading it. You cannot watch it think, click on a table, or ask it why.&lt;/p&gt;

&lt;p&gt;People did not ask to read the output. They asked to &lt;em&gt;see it in action&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So we removed the first three costs, and built the fourth thing: a page where you can see it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://try.semlayer.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;https://try.semlayer.dev&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  First, why semlayer exists
&lt;/h3&gt;

&lt;p&gt;The short version, for anyone arriving here first.&lt;/p&gt;

&lt;p&gt;Companies are pointing AI at their data warehouses and asking it business questions. The AI writes a query, the query runs without an error, and the number that comes back is wrong. Not because the AI is weak, but because the rules that make a number right are in people’s heads. Cancelled orders never count. One of the two order tables stopped being updated years ago. Nothing in the database says so.&lt;/p&gt;

&lt;p&gt;The fix is to write those rules down in one place the AI can read. That place is called a semantic layer, and until now a person had to write it by hand, which takes months. semlayer works the rules out from the data itself, in minutes.&lt;/p&gt;

&lt;p&gt;The longer version, with the measurements, is here: &lt;a href="https://medium.com/@rajdevnath/we-measured-what-a-semantic-layer-is-actually-worth-to-an-ai-agent-b5d7e62d9376" rel="noopener noreferrer"&gt;https://medium.com/@rajdevnath/we-measured-what-a-semantic-layer-is-actually-worth-to-an-ai-agent-b5d7e62d9376&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What you can see now
&lt;/h3&gt;

&lt;p&gt;Open the page. There is nothing to sign up for.&lt;/p&gt;

&lt;p&gt;To give you something to look at straight away, the page comes with a sample warehouse we call Messy Mart: a made-up retailer with 36 tables, built to be as untidy as a real warehouse that has been running for years. Each step below works the same way on your own data. The Messy Mart figures are there to show you what to expect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch the map of your warehouse draw itself.&lt;/strong&gt; A warehouse is a set of tables that relate to each other, and those relationships are almost never written down. semlayer finds them by reading the data. On the page you watch this happen: tables appear as they are read, and lines appear between them as each connection is found. On Messy Mart that is 36 tables and 37 connections, none of them declared anywhere, in about a minute.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Click any table to see what it connects to.&lt;/strong&gt; Knowing a table exists is not the same as knowing how to use it. Click one and you see what it holds, which tables it joins to, and through which columns. On Messy Mart, clicking the orders table shows it leading to the order lines, the customers, the shops and the sales reps, among others.&lt;/p&gt;

&lt;p&gt;The orders table, with the nine tables it joins to and the rule it requires.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ilcpioerbc7aofkijgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2ilcpioerbc7aofkijgb.png" width="800" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the metrics it proposed.&lt;/strong&gt; A metric is a number your business reports, such as revenue or average order value. Teams usually build these up painstakingly, one definition at a time. semlayer gives you a starting list by surfacing the metrics that are already visible in your data: the amounts and counts in your detail tables, and the totals somebody has already built into your summary tables. They are proposals, each marked as inferred until a person confirms it. On Messy Mart it proposed 19 metrics from the 36 tables, among them total revenue, revenue from completed orders only, returns, and average order value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Slice and dice any metric.&lt;/strong&gt; A total on its own rarely answers the question. You want it by quarter, by shop, by channel. For each metric, the page shows the time periods and the dimensions you can break it down by, and you pick. Each combination you run gives you the answer and the query that produced it, so you can try one after another. On Messy Mart, revenue can be broken down by 65 different columns, and revenue by quarter comes back as twelve quarters.&lt;/p&gt;

&lt;p&gt;Picking a metric from the list, grouping it by sales channel, and getting revenue for each of the four channels.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv8cr1i6g9s09waifzto.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjv8cr1i6g9s09waifzto.gif" width="800" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See what it used, and what it turned down.&lt;/strong&gt; An answer you cannot inspect is an answer you cannot trust. So every answer shows its working: which tables it used, which rules it applied, and which tables it refused and why. On Messy Mart there are two orders tables. It refuses the one with the friendlier column names, because that table stopped being updated at the end of 2022.&lt;/p&gt;

&lt;p&gt;An answer, with the table it used, the table it refused and the rule it applied on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccwolzk6lcf8khicqb3u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fccwolzk6lcf8khicqb3u.png" width="799" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;See the wrong answer next to the right one.&lt;/strong&gt; The claim behind all of this is that a query can run perfectly and still be wrong. The page lets you test that. It shows queries an AI would plausibly write, beside the query semlayer would have it write, and you run both. On Messy Mart the plain revenue query returns $16.3M. The right figure is $14.6M. The gap is 818 cancelled orders, and the page shows the evidence it used to work out that they do not count.&lt;/p&gt;

&lt;p&gt;Both queries run without an error. One is $1.7M too high.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0tsr8y8a6tibnqpvdfal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0tsr8y8a6tibnqpvdfal.png" width="799" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Then turn to your own data.&lt;/strong&gt; Drop in CSV, Parquet or JSON files, or a DuckDB file. You get the same map, the same proposed metrics and the same working, for your tables. When semlayer is unsure about something it asks you. When you are finished, download the result as one file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which AI it uses, including a free one
&lt;/h3&gt;

&lt;p&gt;This was the third cost, so it is worth being specific. You have three choices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;None.&lt;/strong&gt; Everything on Messy Mart works with no AI connected, including the metrics and the right-against-wrong queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A free one.&lt;/strong&gt; To type questions in your own words, sign in with OpenRouter. It offers free models alongside paid ones, and the page lets you pick. The free ones cost nothing. OpenRouter limits how many requests they take, and one is sometimes busy; if so, pick another.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your company’s.&lt;/strong&gt; If your company runs its own approved AI service, the page can use that. It also takes your own Anthropic, OpenAI or Gemini key.&lt;/p&gt;

&lt;p&gt;You can use one model to build and a different one to answer questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  What stays in the tab
&lt;/h3&gt;

&lt;p&gt;Your files are opened inside the browser tab and are not uploaded to us. There is no server of ours for them to go to.&lt;/p&gt;

&lt;p&gt;If you connect an AI, the page talks to that provider directly from your browser. By default the AI sees column names and a few example values so it can describe them. One switch in the settings stops the example values.&lt;/p&gt;

&lt;h3&gt;
  
  
  When you are ready for the real warehouse
&lt;/h3&gt;

&lt;p&gt;The tab works for small and medium warehouses, brought in as files.&lt;/p&gt;

&lt;p&gt;For large ones we recommend running semlayer on your own machine, where it can connect to Snowflake, BigQuery and the rest directly and use all the power the machine has. We built a VS Code extension for exactly that, and it also works in Cursor. The file you downloaded from the tab opens there, so nothing you did is thrown away.&lt;/p&gt;

&lt;p&gt;We will follow this with a longer article on the extension.&lt;/p&gt;

&lt;p&gt;Until then: open the page, press the button, and see whether what it finds looks like your warehouse.&lt;/p&gt;

&lt;p&gt;Try it: &lt;a href="https://try.semlayer.dev" rel="noopener noreferrer"&gt;https://try.semlayer.dev&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The VS Code extension: &lt;a href="https://marketplace.visualstudio.com/items?itemName=semlayer.semlayer" rel="noopener noreferrer"&gt;https://marketplace.visualstudio.com/items?itemName=semlayer.semlayer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What semlayer is: &lt;a href="https://semlayer.dev" rel="noopener noreferrer"&gt;https://semlayer.dev&lt;/a&gt;&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>semanticlayer</category>
      <category>dataengineering</category>
      <category>generativeaitools</category>
    </item>
    <item>
      <title>semlayer: build your semantic layer in minutes, so your AI can tap your warehouse’s hidden…</title>
      <dc:creator>Raj Devnath</dc:creator>
      <pubDate>Thu, 08 Oct 2026 02:19:41 +0000</pubDate>
      <link>https://dev.to/raj_devnath_e4afa48802d98/semlayer-build-your-semantic-layer-in-minutes-so-your-ai-can-tap-your-warehouses-hidden-1203</link>
      <guid>https://dev.to/raj_devnath_e4afa48802d98/semlayer-build-your-semantic-layer-in-minutes-so-your-ai-can-tap-your-warehouses-hidden-1203</guid>
      <description>&lt;h3&gt;
  
  
  semlayer: build your semantic layer in minutes, so your AI can tap your warehouse’s hidden knowledge
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Subtitle:&lt;/strong&gt; Your company connected AI to its data — and nobody can tell if the numbers are right. The missing piece is not a better model. It is a thing most companies have heard of, almost none have, and nobody can afford to write by hand — which is why we built semlayer to work it out instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=FvQd4ZRzK14" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=FvQd4ZRzK14&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Somebody in your company has pointed an AI at the data warehouse. Maybe it was sanctioned, maybe it arrived with a Copilot licence. Either way, people are asking it questions now.&lt;/p&gt;

&lt;p&gt;This is a good thing. The queue of “can you pull me a number” requests that used to sit with three overworked analysts is suddenly answerable by the person who wants the answer. That is a real unlock, and it is why every company is trying it.&lt;/p&gt;

&lt;p&gt;Then somebody asks for total revenue.&lt;/p&gt;

&lt;p&gt;The AI writes a query. The query is valid. It runs in two seconds. It returns a number, confidently, with no error and no warning of any kind.&lt;/p&gt;

&lt;p&gt;And it does not match what finance reports.&lt;/p&gt;

&lt;h3&gt;
  
  
  Nobody in the room can tell who is right
&lt;/h3&gt;

&lt;p&gt;This is the moment that matters, and it is worth being precise about why it is so corrosive.&lt;/p&gt;

&lt;p&gt;It is not that the AI made an obvious mistake. If it had crashed, or returned something absurd, you would laugh and move on. It returned a plausible number. Everything about the interaction said &lt;em&gt;success&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So now you have two numbers and no way to adjudicate. The analyst who could have settled it is the person you were trying to stop interrupting. And the next time someone brings a number from the AI into a meeting, everyone discounts it a little — including when it is right.&lt;/p&gt;

&lt;p&gt;That is how a tool dies inside a company. Not refused. Just quietly distrusted until nobody bothers.&lt;/p&gt;

&lt;h3&gt;
  
  
  It is not the model’s fault
&lt;/h3&gt;

&lt;p&gt;The instinct is to blame the AI, or to wait for a smarter one.&lt;/p&gt;

&lt;p&gt;We tested that. On a warehouse built to look like a real one, a small model got 58% of ordinary business questions wrong. A frontier model — a much more capable and more expensive one — got 45% wrong. Better, still unusable.&lt;/p&gt;

&lt;p&gt;The reason is that the question was never really about intelligence.&lt;/p&gt;

&lt;p&gt;Ask your best analyst why their revenue number is right and they will tell you something like: &lt;em&gt;cancelled orders never count, and they are the ones with status code X&lt;/em&gt;. Ask where that is written down and they will say it isn’t. It is in their head, and in the heads of four other people, and in the fact that a summary table somebody built in 2019 only balances if you exclude those rows.&lt;/p&gt;

&lt;p&gt;An AI reading your database can see the tables, the columns, and the data types. It cannot see the rule. There is nothing to see. The table definitions do not contain it.&lt;/p&gt;

&lt;p&gt;So it does the reasonable thing: it adds up the column it was asked about, and it is confidently wrong by the exact amount of the rule it could not know.&lt;/p&gt;

&lt;h3&gt;
  
  
  The thing that would fix this has a name
&lt;/h3&gt;

&lt;p&gt;What is missing is a layer between the raw tables and the person asking the question — one that records what the data &lt;em&gt;means&lt;/em&gt;. Which rows never count. Which of the four order tables is the current one. What “a customer” is, given that the customer table keeps a new row every time somebody moves house.&lt;/p&gt;

&lt;p&gt;This is not a new idea. It is called a semantic layer, and your data team has almost certainly brought it up.&lt;/p&gt;

&lt;p&gt;Here is the part that does not get said out loud in the meeting where it gets brought up: &lt;strong&gt;every tool that offers one expects a human being to write it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By hand. Table by table, rule by rule. On a warehouse of any real size that is a quarter of somebody’s life, and the somebody has to be one of the few people who actually knows the answers — the same people you cannot spare.&lt;/p&gt;

&lt;p&gt;And then it has to be maintained forever, because the warehouse keeps moving. Someone renames a column on a Tuesday and a rule that was right is now silently wrong, which is worse than not having it.&lt;/p&gt;

&lt;p&gt;So the project gets scoped, and costed, and deferred. Most companies never build one. This is not an indictment of anyone. It is a rational response to a job that costs a quarter up front and never finishes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuc3ww3vyvhmoire8ipjq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuc3ww3vyvhmoire8ipjq.png" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  So build it the other way round
&lt;/h3&gt;

&lt;p&gt;We built semlayer on a simple premise: most of that knowledge is recoverable from the data itself, without anyone writing it down.&lt;/p&gt;

&lt;p&gt;Not all of it. But far more than people expect.&lt;/p&gt;

&lt;p&gt;Point semlayer at a warehouse and it reads the data — not just the table definitions, the actual contents — and works out what the tables are, how they connect, and which rules the numbers obey. On the test warehouse in our short intro video that was 36 tables and 36 relationships, none of which had ever been declared anywhere.&lt;/p&gt;

&lt;p&gt;And it found the cancelled-orders rule. Nobody told it. It noticed that a daily summary table only reconciles with the orders table when those rows are left out, then checked that this held in every store, every day, for three years before believing it.&lt;/p&gt;

&lt;p&gt;That last part matters more than it sounds. The output is not a guess with a confident tone. Every rule it writes down comes with the evidence for it, so the person reviewing it can disagree.&lt;/p&gt;

&lt;p&gt;Then the same revenue question returns the number finance reports.&lt;/p&gt;

&lt;p&gt;Across those 38 business questions: &lt;strong&gt;42% right from the raw warehouse, 87% with the layer.&lt;/strong&gt; Same model. Same questions. The difference is entirely what the AI was allowed to know.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa9r0shwjrocf57xdrzvf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fa9r0shwjrocf57xdrzvf.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It takes minutes, not a quarter. And because it is inferred rather than hand-written, it can be re-inferred — so when somebody renames that column on a Tuesday, the layer moves with it instead of rotting behind it.&lt;/p&gt;

&lt;h3&gt;
  
  
  And then there is what the words mean
&lt;/h3&gt;

&lt;p&gt;Suppose the AI now knows which rows never count. There is a second problem sitting underneath that one, and in most companies it causes more arguments.&lt;/p&gt;

&lt;p&gt;Ask for “average order value”. Reasonable request. Your warehouse has a column of money, a table of orders, and a table of the individual lines inside those orders. Divide the money by the orders and you get one number. Divide it by the lines and you get another. On our test warehouse those two answers are $2,035 and $677 — three times apart, and both of them are defensible readings of what you asked for.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7ckz528bu1pd343zffb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7ckz528bu1pd343zffb.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Neither is in your database. “Average order value” is not a column anywhere. It is a decision somebody at your company made, probably years ago, probably in a meeting, and almost certainly never wrote down.&lt;/p&gt;

&lt;p&gt;This is why two people pull the same metric and arrive at the same meeting with different numbers. Nobody made a mistake. They used different definitions, and nothing in the system says which one is yours.&lt;/p&gt;

&lt;p&gt;So semlayer records the definitions too — not just which rows count, but what the number is divided by and which filter belongs to it. Written down once, with the reasoning attached, so the next person to ask gets the same answer as the last one.&lt;/p&gt;

&lt;p&gt;Which is the part worth taking away. Trust is not only about getting a correct number. It is about the same question returning the same number, to everyone, every time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where this does not help
&lt;/h3&gt;

&lt;p&gt;One number we publish that most vendors would bury: on a clean, well-documented warehouse with sensible table names, our layer made things &lt;strong&gt;worse&lt;/strong&gt;  — 67% from the raw tables against 58% with us.&lt;/p&gt;

&lt;p&gt;If your warehouse is genuinely tidy, you do not need this, and we will tell you so. The value is concentrated exactly where the mess is, which is to say in almost every warehouse that has been running for more than a few years and has had more than one team touch it.&lt;/p&gt;

&lt;h3&gt;
  
  
  What to do with this
&lt;/h3&gt;

&lt;p&gt;If your company is already trying AI on its data, the question is not whether the model is good enough. It is whether anything in your stack holds what your team knows.&lt;/p&gt;

&lt;p&gt;If the answer is “it’s in people’s heads”, your AI is guessing, and the confidence of its answers is telling you nothing about whether they are right.&lt;/p&gt;

&lt;p&gt;semlayer is free and open source. It runs inside your own environment, against your own warehouse, on your own keys — nothing leaves, and we never see your data. Your data team can have an answer about your actual warehouse this afternoon rather than after a procurement cycle.&lt;/p&gt;

&lt;p&gt;The 90-second version of this argument, and the rest of the series: &lt;a href="https://www.youtube.com/playlist?list=PLCrM1PMq6vVg" rel="noopener noreferrer"&gt;https://www.youtube.com/playlist?list=PLCrM1PMq6vVg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The code, the benchmark, and the numbers above including the one that looks bad: &lt;a href="https://github.com/semlayer-dev/semlayer" rel="noopener noreferrer"&gt;https://github.com/semlayer-dev/semlayer&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>analytics</category>
      <category>artificialintelligen</category>
      <category>businessintelligence</category>
    </item>
    <item>
      <title>We measured what a semantic layer is actually worth to an AI agent</title>
      <dc:creator>Raj Devnath</dc:creator>
      <pubDate>Wed, 09 Sep 2026 01:14:27 +0000</pubDate>
      <link>https://dev.to/raj_devnath_e4afa48802d98/we-measured-what-a-semantic-layer-is-actually-worth-to-an-ai-agent-254c</link>
      <guid>https://dev.to/raj_devnath_e4afa48802d98/we-measured-what-a-semantic-layer-is-actually-worth-to-an-ai-agent-254c</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnhus37g6xstsapjzaeg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffnhus37g6xstsapjzaeg.png" width="799" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built an open-source engine that infers a semantic layer from the warehouse itself — then benchmarked it honestly, including the case where it doesn’t help.&lt;/p&gt;

&lt;p&gt;Everyone in data has watched an LLM confidently write SQL that sums revenue across cancelled orders. The model isn’t bad at SQL — it’s missing what your team knows. Nothing in information_schema says that sts_cd = 'X' means cancelled, that finance excludes those rows from revenue, or that the join to the customer table has to hit the current row of a slowly-changing dimension. That knowledge lives in your team’s heads, a stale wiki, and three YAML files somebody wrote a year ago.&lt;/p&gt;

&lt;p&gt;The numbers on this are stark. On Spider 2.0 — the benchmark built from &lt;em&gt;real&lt;/em&gt; enterprise warehouses rather than tidy academic ones — frontier models solved just 21.3% of tasks at publication (the best agentic scaffolds reach about 30% today). The same models score around 91% on the older, cleaner Spider 1.0. The gap isn’t intelligence. It’s context.&lt;/p&gt;

&lt;p&gt;The industry’s answer is the semantic layer, and the industry’s problem is that every one of them — dbt, LookML, Cube, Snowflake semantic views — is written by hand, takes a quarter to write, and goes stale on the next ALTER TABLE.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://github.com/neocatalystlabs/semlayer" rel="noopener noreferrer"&gt;semlayer&lt;/a&gt;, an open-source engine that infers the semantic layer from the warehouse itself. This post is about what I measured when I benchmarked it — including the case where it &lt;em&gt;doesn’t&lt;/em&gt; work, because that result shaped the product more than the wins did.&lt;/p&gt;

&lt;h3&gt;
  
  
  The experiment
&lt;/h3&gt;

&lt;p&gt;Two synthetic warehouses, same harness:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;messy_mart&lt;/strong&gt;  — 36 tables built the way real enterprise marts actually look: ord_hdr, sts_cd, dly_sls_agg; zero declared constraints; business rules encoded nowhere except in whether the numbers reconcile; deprecated legacy tables still lying around.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tpcds_clean&lt;/strong&gt;  — TPC-DS-style: descriptive names, conventional keys, textbook modeling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent answers business questions (“total revenue by month”, “return rate by store”) two ways: from the &lt;strong&gt;raw schema&lt;/strong&gt; , and from the &lt;strong&gt;inferred semantic layer&lt;/strong&gt;. Scoring is execution-result equality against hand-written gold SQL — the answer is either right or it isn’t.&lt;/p&gt;

&lt;h3&gt;
  
  
  The results
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l5qu8trn0bqp3lgdygm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4l5qu8trn0bqp3lgdygm.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pass rate, raw schema → inferred semantic layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;messy_mart&lt;/strong&gt; (38 questions): &lt;strong&gt;0.34 → 0.53&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;tpcds_clean&lt;/strong&gt; (12 questions): &lt;strong&gt;0.75 → 0.50&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Three findings, in increasing order of comfort:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. On the messy warehouse, the inferred layer lifts agent accuracy +54% relative (0.34 → 0.53), and the lift replicates with a stronger model (0.40 → 0.50).&lt;/strong&gt; The flagship class of fixed error is the silent kind: raw-schema “total revenue” returns $16.3M where the correct answer is $14.6M, because nothing told the agent that the aggregate tables exclude cancelled orders. The inferred layer carries that rule — discovered automatically, by hypothesis-testing filters until the aggregate tables reconcile with the fact tables, group by group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. On the clean schema, the semantic layer &lt;em&gt;hurt&lt;/em&gt; (0.75 → 0.50).&lt;/strong&gt; Good names already carry the semantics, and full raw DDL beats partial-detail disclosure. I publish this number, and I tell people with tidy warehouses not to use the tool. If a vendor won’t tell you when &lt;em&gt;not&lt;/em&gt; to buy, their benchmark is marketing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. I also built an ontology enrichment layer — and it added nothing.&lt;/strong&gt; I gated it on this same benchmark, it failed (0.53 → 0.50), and I demoted it to internal plumbing. It doesn’t ship until it earns its way back.&lt;/p&gt;

&lt;h3&gt;
  
  
  What “inferred” means mechanically
&lt;/h3&gt;

&lt;p&gt;Four stages, statistics first, LLM only where statistics are insufficient:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Profile&lt;/strong&gt; : per-column statistics and semantic typing. 0.81 accuracy with &lt;em&gt;zero&lt;/em&gt; LLM calls; 0.90 with escalation — and only low-confidence columns ever reach the model, batched per table. Total inference cost: about &lt;strong&gt;$0.70 per 100 tables&lt;/strong&gt; on the cheap model tier, with your own API key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Link&lt;/strong&gt; : foreign-key discovery without declared constraints. The rule that keeps it honest: statistical evidence alone &lt;strong&gt;never&lt;/strong&gt; auto-accepts a foreign key — naming and an independent model check must corroborate, or it goes to a human review queue. The test fixtures seed statistically-perfect-but-absurd FK traps (shoe_size ⊆ dept_id passes every inclusion test); the count of accepted traps, enforced in CI, is zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Describe&lt;/strong&gt; : descriptions generated from profiled evidence via context propagation through the join graph — a table is described knowing what its neighbors are.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enrich&lt;/strong&gt; : enum decodes joined from decode dimensions the engine itself discovered; metrics; deprecation (“use ord_hdr, not ord_hdr_legacy”); and the reconciliation-discovered business rules. Reconciliation is per-group, and the evidence rides in the output — provenance entries literally read &lt;em&gt;“reconciles per-group with ord_hdr.tot_amt excluding sts_cd &amp;lt;&amp;gt; ‘X’ (40/40 store groups; 1,095/1,095 date groups within 0.2%).”&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every claim lands with confidence, provenance, and a lifecycle (inferred → reviewed → certified), governed by a consumer contract that makes the silent failure modes — summing across a fan-out join, filtering on a guessed decode — &lt;em&gt;non-conforming&lt;/em&gt;, not merely unwise. A human reviews a queue for about thirty minutes instead of writing YAML for a quarter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Then an agent actually uses it
&lt;/h3&gt;

&lt;p&gt;The layer is served over MCP, so Claude, Cursor, or your in-house agents consume it directly. Beyond lookup tools, there’s a compile_metric tool that emits correct SQL — joins, business-rule filters, time bucketing — and it &lt;em&gt;refuses constructively&lt;/em&gt; when the request is unsafe: group-bys across fan-out joins, ambiguous join paths (two routes to the same date dimension), time bucketing when the warehouse runs a fiscal calendar and the caller didn’t say which calendar they meant. Every refusal names the reason and enumerates the legal alternatives. A wrong number that looks right is the enemy; a refusal that explains itself is a feature.&lt;/p&gt;

&lt;p&gt;And if you already have documentation — a data dictionary, a wiki export, the CLAUDE.md from your ETL repo — the engine reads it as &lt;em&gt;priors&lt;/em&gt;: doc-supported claims gain confidence, and doc-vs-data contradictions surface in the review queue (“your wiki says X means Refunded; your decode table says Cancelled”) instead of being silently believed. On the messy fixture, that contradiction list is where the stale-documentation errors get caught.&lt;/p&gt;

&lt;h3&gt;
  
  
  The part where you check my work
&lt;/h3&gt;

&lt;p&gt;Every number above is reproducible from the repo: the fixture generators, gold layers, 82 competency questions, and the benchmark runner all ship. All LLM calls are cassette-recorded, so the entire eval suite runs in CI at $0&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python fixtures/build.py &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; pytest tests/ -q
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;replays everything on a laptop. There are also --no-llm (fully deterministic, zero API calls) and --no-sample-egress (cell values never leave your machine) modes, with their accuracy costs measured and published rather than hand-waved.&lt;/p&gt;

&lt;p&gt;The CLI is Apache-2.0, complete, and free — no table caps, no signup; it runs in your environment with your warehouse credentials and your LLM key. A paid hosted control plane (continuous re-inference on schema change, team review, dashboards) may come later; the CLI stays fully functional on its own.&lt;/p&gt;

&lt;h3&gt;
  
  
  If your warehouse is messy, I want to hear from you
&lt;/h3&gt;

&lt;p&gt;This is an early beta. The numbers above come from synthetic fixtures built to simulate real enterprise marts — the next step is proving them on actual warehouses. I’m recruiting about ten design partners with genuinely messy schemas — cryptic names, tribal rules, undeclared keys — before public launch. The ask is roughly two hours across two weeks, and you get a working semantic layer plus an MCP endpoint for your agents out of it. If your warehouse is clean, you probably don’t need this — and now you have my own benchmark to prove it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://semlayer.dev" rel="noopener noreferrer"&gt;&lt;strong&gt;semlayer.dev&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;·&lt;/strong&gt; &lt;a href="https://github.com/semlayer-dev/semlayer" rel="noopener noreferrer"&gt;&lt;strong&gt;github.com/semlayer-dev/semlayer&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;· &lt;a href="mailto:hello@semlayer.dev"&gt;hello@semlayer.dev&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>semanticlayer</category>
      <category>sql</category>
      <category>analytics</category>
      <category>python</category>
    </item>
  </channel>
</rss>
