Skip to main content
What makes responses from AI agents reliable

Semantic Layer and Context Layer in Practice


Susanne Ullrich 0a4cdba3
Susanne Ullrich on September 18, 2026

The closer AI gets to operational marketing decisions, the more the knowledge behind the data matters.

An example for Semantic Layer and Context Layer in practice: the marketing director asks her AI agent which channel to cut budget from. Within seconds, the agent recommends pulling 30 percent out of Paid Social, since ROAS has dropped since Friday. The math checks out. The recommendation is still wrong: an expired API token has kept conversions from being tracked in full since Friday.

This example is fictional, but it is exactly the kind of trap that modern marketing teams run into once they let AI handle their routine reporting.

At Hopmann, we have spent a long time on the question of how AI agents can analyze marketing data not just fast, but reliably. Because missing context is what decides whether a recommendation is right or wrong, we made the semantic layer and the context layer the central theme of our Raw & Roasted event on September 17, 2026. Tobias Lanzl, who manages Hopmann’s AI-Ready Data Stack team, placed both within the Hopmann AI Foundation and walked through their role using concrete examples. This post summarizes the key takeaways from the evening.

Key takeaways from our Raw & Roasted event, at a glance:

  • The semantic layer turns the definitions an AI agent needs into a technical dictionary for that specific use case.
  • The context layer adds current events, rules, and business context.
  • Together, the two layers help the agent calculate numbers correctly and interpret them correctly.
  • Getting the depth of information right is what matters most. Start with one concrete pilot use case, and add only what the agent actually needs for reliable answers.

Semantic layer and context layer are two of the five layers in the Hopmann AI Foundation. The full model connects measurement strategy, data quality & governance, semantic layer, context layer, and agentic marketing intelligence. You can read more about the other layers of the Hopmann AI Foundation on our blog.

Raw & Roasted: Context for AI Agents with Tobias Lanzl, event at the Hopmann office in Munich
Raw & Roasted on September 17, 2026 at the Hopmann office in Munich

What AI Agents Promise on Company Data, and What It Takes to Deliver

Querying your own data directly is now possible for far more people than before. Natural language opens up access even to team members who have never built their own Power BI model. Answers arrive in seconds instead of waiting for a free slot on the analytics team’s calendar. Follow-up questions can be asked right away, where a dedicated dashboard used to be the only option.

For marketing decisions, though, one property of analytics matters more than anywhere else. In programming, several different paths can lead to the same working result. For a metric like last month’s revenue, a company needs one binding answer. What counts as revenue in the first place gets settled in the measurement strategy. Data quality & governance secure the reliability of, and controlled access to, the underlying data. Only then does the semantic layer translate that business decision into the data world for the specific use case at hand. The context layer adds what is needed to interpret the result correctly.

Think of Your AI Agent as a New Colleague

Picture your AI agent as a new colleague who gets database access on their first day. Both need a good onboarding: clear definitions, plus enough background on the business.

For an AI agent, this onboarding matters for three specific reasons:

  • Uncertainty: An experienced colleague asks a follow-up question when a request is unclear. An agent works more reliably once that same clarity has already been documented for it.
  • Speed and volume: A colleague applies a stored definition once. An agent can apply it consistently across thousands of queries, which keeps results comparable.
  • Scope: Clear guardrails help the agent recognize when a question falls outside its area and belongs somewhere else.

How the Five Layers of the Hopmann AI Foundation Work Together

Reliable AI answers do not start at the semantic layer. The Hopmann AI Foundation covers the full path from a business question to actionable marketing intelligence:

  1. Measurement strategy: connects company goals to marketing’s questions and defines the relevant metrics from a business standpoint.
  2. Data quality & governance: builds the foundation of complete, consistent, and securely usable data.
  3. Semantic layer: maps the metrics, dimensions, and terms a specific use case needs into technical form.
  4. Context layer: adds current events, rules, constraints, and other business knowledge.
  5. Agentic marketing intelligence: uses this foundation to answer questions, explain relationships, and prepare decisions.

In the Raw & Roasted talk, Tobias focused on the semantic layer and the context layer. But those two layers can only do their job once strategy, data quality, and governance are in place upstream. We go deeper on how these two layers work together with AI agents in marketing in Semantic Layer for AI in Marketing.

The five layers of the Hopmann AI Foundation, from measurement strategy to agentic marketing intelligence
The five layers of the Hopmann AI Foundation, from measurement strategy to agentic marketing intelligence

The Semantic Layer: A Technical Dictionary for Your Use Case

An example from the talk makes this concrete. A table called MKT_PERF_V2 starts out with nothing but column names: dt, src, camp_nm, rev, revenue_net, rev_att, conv, cost. For an AI agent to draw the right conclusion from it, it also needs to know which of the three revenue columns counts as Revenue, whether conv means leads or orders, how ROAS is calculated, and what exactly sits behind cost.

The business definition of these metrics is not created in the semantic layer. It comes from the measurement strategy, where a company decides, for example, what counts as a conversion, which revenue figure matters for a given steering question, and which decision a metric is meant to support.

The semantic layer takes the parts of that strategy a specific use case needs and maps them as a technical dictionary. That includes:

  • Metrics: mapping business definitions to formulas and data fields
  • Dimensions and entities: descriptions of analysis attributes and business objects
  • Relationships and time logic: how tables connect, plus rules for fiscal years and reporting dates
  • Synonyms: connecting different terms, like customers and users, to the same data field

More documentation is not automatically better here. Too little information forces the agent to guess. Too much unfocused input makes it harder for the agent to pick out the definitions and fields that actually matter for a given question. That is exactly where our semantic layer consulting comes in: we connect the right elements of your measurement strategy to the use case at hand. From our project experience, we know how much depth of information is genuinely useful, so data turns into data-driven marketing you can act on.

Semantic layer example: column definitions and SQL logic for the MKT_PERF_V2 table
A table with meaning: the semantic layer connects business-defined metrics with the right fields and calculation logic

Once the same table carries the right descriptions and a technical mapping of those business-defined metrics, answer quality improves noticeably. The agent then knows that, for this use case, ROAS Net is calculated as net revenue divided by cost, and cost per conversion as cost divided by conversions. Asked “What was our cost per conversion last month, broken down by channel?”, it can now give a single, unambiguous answer.

In our projects, we see the biggest effect when this documentation is built in parallel with the agent’s technical setup from the start. It used to mainly help new colleagues find their footing. Today, it doubles as the foundation for reliable AI answers.

The Context Layer: The Framework for Why

The semantic layer makes the business-defined calculation usable for the agent. The context layer explains how to interpret the result. In the talk, a ROAS chart by channel showed Paid Social dropping from 4.1 to 2.2 between week 40 and week 41, while Paid Search stayed flat. Based on the numbers alone, an AI agent might reasonably suspect creative fatigue or rising CPMs, and recommend shifting budget to Paid Search. Whether that read is actually correct is something only the context layer can tell you.

ROAS trend by channel: a drop in Paid Social between week 40 and week 41
ROAS by channel: the drop in Paid Social was caused by an expired Meta API token, not campaign performance

The context layer bundles the knowledge needed to interpret results correctly:

  • Business events: migrations, campaign launches, or supply chain events
  • Decisions: a versioned history of business-driven changes
  • Data quality signals: the current state and completeness of the data
  • Business context: goals, seasonality, and budget limits
  • Usage context: roles and typical questions
  • Rules: guardrails and verified queries

We go into more detail elsewhere on how this fits into the broader strategy for AI in marketing.

Business events table in the context layer: an entry for the expired Meta API token on October 6
One entry in the business events table is enough for the agent to correctly interpret the ROAS drop

In the example from the talk, the business events table held an entry from October 6: the Meta API token had expired that day. With that context, the agent recognizes the ROAS drop as a short, fixable data gap, not a campaign performance issue. A business_context.yaml file also stores goals, seasonality, and a 35 percent budget cap for Paid Social, so the agent’s suggestions stay aligned with company strategy.

Semantic Layer and Context Layer in Practice, Compared

Each layer in the Hopmann AI Foundation does a different job. The measurement strategy defines which metrics the company needs for its decisions. Data quality & governance secure their data foundation. The semantic layer makes the relevant slice of the data model usable for a given AI agent. The context layer explains why a number looks the way it does and what to watch for when judging it. Agentic marketing intelligence brings all of this together in the application itself.

One answer from the Q&A has stuck with me. Someone in the audience asked how you would explain the difference to a fifteen-year-old. Tobias compared the semantic layer to a toolbox that gets the agent access to the right numbers in the first place. The context layer is the instruction manual that explains what those numbers actually mean. You can find a more detailed comparison in our post Semantic Layer vs. Context Layer.

The Pragmatic Starting Point: Fast to Set Up, the Real Win Is Organizational

The technical lift for semantic layer and context layer in practice is manageable today. Platforms like Snowflake, Databricks, or Fabric already offer the relevant functionality. Analytics tools like Omni are built directly around a data model. MCP servers also make it possible to connect Claude or ChatGPT to your database and context.

Three organizational steps matter most:

  1. Define together: the stakeholders involved agree, within the measurement strategy, on questions like what counts as a lead.
  2. Map deliberately: the data relevant to the pilot is quality-checked and made available under proper governance. The needed definitions then go into the semantic layer, and the business knowledge into the context layer.
  3. Maintain continuously: changes get documented regularly and made available to the agent. Relevant decisions from meetings flow in through automatic transcription or documentation from an accountable owner, so definitions and context stay current.

This is what keeps definitions, data quality, and context current, rather than letting them end up as a one-time documentation exercise.

An Anthropic study cited in the talk illustrates what this maintenance is worth. With written business context in place, answer accuracy rose from 21 to 95 percent. With regular updates, it stayed at that level. That is why maintenance should be part of the plan from day one. The recommendation from the talk: start with the five to ten tables a team uses most often, and evolve the setup from there based on real user feedback.

Anthropic study: answer accuracy in self-service analytics rises from 21 to 95 percent with written business context
From 21 to 95 percent: answer accuracy with written business context in place (Anthropic study, cited in the talk)

What This Means for Your Company

For decision-makers, this comes down to one thing: trust in AI-powered analysis is not primarily a matter of which language model you choose. It comes from how well business knowledge is documented and kept current. Teams that plan for semantic layer and context layer early end up with answers they can actually rely on, and more time for the decisions those answers are meant to support. To learn how to choose the right semantic layer architecture for your company, see our deep-dive post on the topic.

How Hopmann Supports You

When your marketing team starts basing budget decisions on AI-generated answers, the quality of your semantic layer and context layer is what determines how confidently your CMO or CFO can rely on those numbers.

This is exactly where Hopmann comes in. We combine marketing expertise with technical data excellence, sitting at the intersection between your CMO and your data engineering team and keeping both perspectives in view. We start by clarifying which business definitions from your measurement strategy actually matter for the specific AI agent at hand. From there, we check data quality and governance, translate the right selection into the semantic layer, and add the business context that is needed.

The result is a sensible middle ground between too much information and too little direction. Our support spans everything from analyzing your existing data landscape, through a concrete pilot use case, to the ongoing maintenance of your layers as part of your team’s daily work. You work with the same advisory team throughout the entire project. Learn more about our approach to an AI-ready marketing data stack here.

Want to set up a pilot for your team? Get in touch.

Explore Our Semantic Layer and Context Layer Consulting
Susanne Ullrich, Head of Marketing at Hopmann Marketing Analytics

Susanne Ullrich
Head of Marketing, Hopmann Marketing Analytics

Leads marketing at Hopmann, with a background in industrial engineering and close to 20 years of marketing experience across international B2B and B2C companies.


Questions from the Audience at Raw & Roasted

FAQ on Marketing Data Stack

What strategic leverage does the Context Layer offer when AI agents help prepare marketing decisions?

With a context layer, an AI agent automatically incorporates budget constraints, ongoing campaigns, and data quality signals (such as current data gaps or pipeline status) into its recommendations. For decision-makers, this means that recommendations are transparent and can be relied upon with confidence, all the way up to the C-suite.

What exactly distinguishes the Semantic Layer from the Context Layer in practice?

The Semantic Layer explains what exists in the data and how it is calculated—such as formulas, dimensions, and time logic. The Context Layer explains why a number looks the way it does and what to look out for—such as business events, decisions, and the current status of the data. You can find a detailed comparison in our article “Semantic Layer vs. Context Layer.”

How can subject matter experts without a background in data engineering contribute to the Context Layer, even without prior technical knowledge?

Those who work with data in their day-to-day operations, such as in CRM, often bring exactly the kind of knowledge that an analytics team would otherwise have to ask for: which values are always filtered out for a specific source, or that the conversion rate of an awareness campaign is interpreted differently than that of a performance campaign. This knowledge, which you would otherwise share with a new colleague on their first day, can be directly incorporated into the Context layer without any prior technical knowledge.

How often should the Context Layer be updated?

The Context Layer is not a one-time documentation project, but a living system. Ideally, some of the information (e.g., data quality signals or pipeline status) is fed in automatically and in real time from your monitoring tools. Manual context adjustments (e.g., new budget limits or campaign launches) depend on the dynamics of your business. A study by Anthropic highlights the importance of this: with up-to-date business context, the accuracy of analysis responses increased from 21 to 95 percent. In day-to-day operations, the most valuable signal for necessary updates comes from direct feedback from the team when the agent has not yet been able to correctly assess a situation.

How do you ensure that the AI agent always uses the most up-to-date information?

Clear accountability makes all the difference: A dedicated individual or team determines which information is currently valid. In practice, this is achieved through version control or a simple indicator showing which version is currently relevant. This keeps the context layer up to date and ensures the agent remains reliable. Clearly defined domain responsibilities also ensure that changes to strategy or taxonomy are centrally approved and immediately take effect for the agent as a “single source of truth.”

How can you get started in a pragmatic way without overhauling the entire company all at once?

The recommendation from the presentation is to begin implementing the Semantic Layer and Context Layer in practice with a specific pilot use case, such as the five to ten tables that a single marketing team needs each day to address recurring questions. From there, you can iterate based on real user feedback before expanding both components to other teams and data sources.