Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarHabr AI→ original

A Correct Agent Revenue Figure Can Still Leak: Why You Need a Separate Publication Gateway

A BI dashboard and an AI agent pull revenue from the same database with no SQL errors, but the dashboard subtracts returns and the agent does not. Even when the calculation is agreed on, a correct regional breakdown cannot go to a shared channel where some employees lack access. The team building the agent controller split the problem into the meaning of concepts, the calculation rules, and the right to send. That is why the recipient check should belong to a separate publication gateway, not the semantic layer.

AI-processed from Habr AI; edited by Hamidun News
A Correct Agent Revenue Figure Can Still Leak: Why You Need a Separate Publication Gateway
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
A 30 return after a 100 sale70 and 0, or 100 and −30, by month
Key metric #2The model loaded without errors, but October diverged from the reference
Key metric #3The OSI format carries metric descriptions, but not the right to publish

Imagine a BI dashboard and an AI agent pulling data from the same database and calculating revenue for one month. Both queries run without errors, but the dashboard subtracts returns and the agent does not. You can't fault the SQL, yet one question got two answers.

Suppose the calculation was agreed on. Now the agent is ready to send the regional breakdown to a shared channel, while company rules allow only some employees to see it. The numbers are correct, but they still can't be published.

The team that built a controller for AI agent activity went through this and reviewed patents from IBM, Microsoft, Oracle, Google, and SAP to see what was already invented. The main takeaway for anyone giving agents access to corporate data: the word "semantics" hides three different tasks, and they break in different ways. The third one, deciding "can this result go to these specific people," is handled by a separate publication gateway.

The semantic layer does not solve it.

Three tasks under one word

The first task is ontology: what we are actually talking about. Take "region" in a revenue report. For the sales department it means the customer's region; for logistics it means the delivery region. A customer may be in Moscow while the order ships to Tver. If the model has a single "region" field, each department will read the report its own way and conclude that the others got it wrong.

The second is the semantic layer: the rules by which a number is produced. What counts as revenue, how returns are handled, and by what attributes the result is broken down. This is where the dispute over the return month lives.

In October, 100 was sold; in November, 30 was returned. One engine attributes the return to the month of sale: 70 for October and 0 for November. Another records it in the month of the return: 100 for October and −30 for November.

Over the two months the total is the same, 70, but the month-by-month histories differ. If you swap the customer's region for the delivery region, the dimension has changed. If you move the return from the month of sale to the month of return, the calculation rule has changed.

The numbers shift in both cases, and the fixes are different.

The third is publication authorization. The breakdown has been calculated as agreed, and there is nothing left to do in SQL. What remains is checking where it will go: a report is allowed in a closed finance channel and forbidden in a general one. The database was asked how much was earned, but nobody asked it who is in the channel. The publication gateway must act before the result leaves the system or becomes available to another audience.

What the patent review showed

The authors checked each document against three questions: where the calculation rule is defined, how the system turns it into a query, and who decides whether the result can be sent to these people. Searching by titles proved useless: the word "rights" does not tell you at which step the check happens. Some documents block running a query, others limit what the output contains, and still others should block sending an already calculated result. The team needed that last case specifically, so they had to read the claims of the inventions.

A few examples from the review. Microsoft patent US12524403B2 describes using context when preparing a prompt that translates a user's question into query language. The Toronto-Dominion Bank application US20260044717A1, published February 12, 2026, is titled "Computing systems and methods for a text-to-SQL generative artificial intelligence chat with enforced access levels."

There, user rights are taken into account when the query is generated, that is, before data is retrieved. A denial means the query either does not run or returns less data. This is close to the authors' concern, but it is not the case where an already prepared result must not be passed on.

AtScale patent US12079180B2 describes a way to build a model from existing analytical configurations, and the company participates in the open OSI format.

An open format describes structure, but not behavior

Open Semantic Interchange (OSI) is an attempt by dbt Labs, Cube, and other platforms to agree on how metric models are exchanged. The benefit is clear: when you change tools, you do not have to re-create dozens of metrics from scratch. Suppose reports move from Looker to Power BI. The warehouse stays the same, but the new system must be told what revenue is, how to break it down, and how to link sales to deliveries. This is an illustrative example, not a claim that a ready-made transfer between these systems exists through OSI.

But a shared format does not mean platforms build queries or check access in the same way. The team's own discrepancy surfaced on test data: after the model was transferred, October revenue differed from the reference. The file loaded without errors, and only a control calculation caught the difference.

What to do in practice

  • Separate the three layers: the meaning of concepts, the calculation rules, and the publication decision.
  • After every model transfer, compare month-by-month values on the same data, not just the total and an "Import completed" status.
  • Place the send-permission check as a separate step, once the recipient is known.
  • Find the point in your system where an agent could send a correct number to the wrong recipient, and determine who is responsible for it.

This article is an engineering review by one team, not a market study: the patent sample is small. The split into three tasks is, however, easy to verify on your own product.

Story

Key Questions Answered

What are the key details on Three tasks under one word?

The first task is ontology: what we are actually talking about. Take "region" in a revenue report. For the sales department it means the customer's region; for logistics it means the delivery region. A customer may be in Moscow while the order ships to Tver. If the model has a single "region" field, each department will read the report its own way and conclude that the others got it wrong. The second is the semantic layer: the rules by which a number is produced.

What the patent review showed?

The authors checked each document against three questions: where the calculation rule is defined, how the system turns it into a query, and who decides whether the result can be sent to these people. Searching by titles proved useless: the word "rights" does not tell you at which step the check happens. Some documents block running a query, others limit what the output contains, and still others should block sending an already calculated result.

What are the key details on An open format describes structure, but not behavior?

Open Semantic Interchange (OSI) is an attempt by dbt Labs, Cube, and other platforms to agree on how metric models are exchanged. The benefit is clear: when you change tools, you do not have to re-create dozens of metrics from scratch. Suppose reports move from Looker to Power BI. The warehouse stays the same, but the new system must be told what revenue is, how to break it down, and how to link sales to deliveries.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — A Correct Agent Revenue Figure Can Still Leak: Why You Need a Separate Publication Gateway https://news.hamidun.com/en/news/18473/a-correct-agent-revenue-figure-can-still-leak-why-you-need-a

What do you think?
Loading comments…