Before the agents: a semantic layer for advertising metrics
An agent can give a convincing answer that is simply wrong when “impression” or “revenue” means three different things. The first step towards agents is a shared dictionary of metrics.
A language model can produce an answer that reads perfectly and is still wrong, because the data behind it is ambiguous, stale or contradictory. In advertising technology that risk is high: an impression, a request, a win or a fill rate can be defined differently in the ad server, an SSP, Prebid and the internal BI. The first step towards agents is not installing a model. It is a data contract that both people and machines can use.
A data source is not an access protocol
The Model Context Protocol (MCP) is often presented as a way to “connect AI to your data”. It is an interaction layer between an AI client and tools or resources; it is not a data source. Its 2026-07-28 specification made the protocol stateless and strengthened authorisation, which makes it easier to run behind gateways and load balancers. But what an agent reads through MCP is only as good as the data behind it.
| Source | Data | Possible access | Freshness |
|---|---|---|---|
| Ad server | Requests, impressions, revenue, line items, delivery | API, reports, data warehouse | Near real time to batch |
| Prebid | Bids, bidders, timeouts, auctions | Events, logs, analytics | Real time |
| SSP | Bid rate, wins, revenue, deals | API, reports | Near real time or batch |
| Consent platform | Consent, vendors, purposes | API, events, logs | Real time |
| DMP or CDP | Segments, reach, activation | API, SQL, exports | Near real time or batch |
| CRM | Accounts, contracts, opportunities | API | Transactional |
| CMS | Content, taxonomy, metadata | API, database, stream | Real time or batch |
| Knowledge | Documents, procedures, contracts | Search and retrieval | Depends on indexing |
The semantic layer
The semantic layer is the official dictionary of advertising metrics. For each metric it states the formula, compatible dimensions, granularity, currency, time zone, exclusions, preferred source and reconciliation rules. Asking two agents the same question must not produce two implicit definitions.
| Metric | Definition | Primary source | Checks |
|---|---|---|---|
| Net revenue | Revenue after explicitly defined fees | Finance or a certified layer | Currency, VAT, fees, period |
| Ad requests | Eligible requests as defined by the publisher | Ad server or telemetry | Site, device, consent, format |
| Fill rate | Impressions served / eligible requests | Semantic layer | Never mix SSP and ad server definitions |
| Bid rate | Auctions with at least one valid bid | Prebid telemetry | Timeouts and active bidders |
| Win rate | Wins / valid bids | Prebid and ad server | Auction level or bidder level |
| Viewability | Measurable impressions viewed, per the chosen standard | Measurement vendor | Coverage and non-measurable impressions |
Twenty to thirty critical metrics are enough to start.
A source of truth per decision
There is no single universal source of truth. The right source depends on the decision. For invoicing, finance or the certified ad server comes first; to diagnose a bidder timeout, Prebid telemetry is more relevant; to understand consent, the consent platform is the operational source. An agent must know this hierarchy, and show discrepancies rather than hide them.
Provenance and time
Every answer that can lead to a decision should carry its source, period, last update time, metric definition, filters, confidence level and any conflict between sources. An agent must be able to say “insufficient data” rather than fill the gap with intuition.
An ingestion pipeline
- List the sources and their owners: ad server, SSPs, Prebid, consent platform, DMP or CDP, CRM, CMS, analytics, finance.
- Give each a sensitivity class and a retention period.
- Choose the access mode: API, export, log, stream, webhook or SQL replication.
- Land raw data in an immutable zone where that is justified.
- Normalise identifiers, time, currency, sites, devices, ad units, bidders and campaigns.
- Build certified business tables.
- Expose views or tools designed for agents, rather than raw tables.
- Measure freshness, completeness, schema drift and anomalies.
Retrieval does not replace the warehouse
Retrieval-augmented generation (RAG) works well for procedures, documentation, contracts, media kits and commercial rules. It is the wrong engine to compute daily revenue from billions of events. An agent should route each question: SQL for structured facts, search for documents, real-time APIs for the current state, and a rules engine for policies.
This is how we build data pipelines for our clients: every daily step checks that its inputs are present and fresh before it runs. See the identity graph case.
Sources
- The 2026-07-28 MCP specification release candidate, Model Context Protocol blog.