DEV Community

Cover image for Grounding AI Agents in Business Meaning: Semantic Layers, Ontologies, and MCP Elicitation in Practice

Grounding AI Agents in Business Meaning: Semantic Layers, Ontologies, and MCP Elicitation in Practice

Seenivasa Ramadurai on October 04, 2026

When an AI agent gets it wrong, the model is usually not the problem. The agent was never taught what your terms mean. Semantic models and ontologi...
Collapse
 
ontomato profile image
ontomato •

halting on an undefined term is the part that usually gets dropped in demos.

from my experience a glossary only helps if the agent cannot quietly swap in a synonym or write raw sql around the missing meaning. when top client and overdue still live only in prose, different runs invent different grains. i like keeping the named metric, the source rows it counts, and a stop that fires in code when the term is not on the approved list. then elicitation is for ambiguity the person must pick, not for rewriting the company definition in chat.

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai •

Thanks for sharing your view.

Collapse
 
ontomato profile image
ontomato •

glad it landed.

from my experience the halt on an Undefined Term is the bit teams skip when the demo has to keep talking. one of our users started failing the turn closed when the metric name was missing from the approved list, even if the model could invent a synonym. that made elicitation about a real choice, not about rewriting the company definition in chat.

Collapse
 
reidmarlow profile image
Reid Marlow •

The distinction between run-time elicitation and governance updates is the sharp part here. Exposing glossary mutations directly to an agent or end-user invariably turns business metrics into a moving target across departments.

One failure mode I run into with semantic lookup tools is prompt-loop evasion: when a model hits an undefined term error, it often tries to work around the missing definition by substituting synonyms or raw SQL queries rather than stopping. Enforcing the halt at the execution boundary rather than relying on prompt adherence is usually what keeps the guarantee intact.

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai •

Thanks, this is a good point. The post is a design idea, not a production harness, so the "do not assume" error in my sketch is only a prompt-level instruction, and you're right that a model can work around it with a synonym or raw SQL. The halt has to be enforced at the execution boundary, not left to the prompt. In an actual design that means the agent reaches data only through governed tools, with no raw SQL path, and an undefined-term result puts the run into a stop state it can't leave on its own. The exact mechanism depends on the architecture and the orchestration layer. I'll add a section on this to the post.

Collapse
 
botsailorofficial profile image
BotSailor •

This is a really thoughtful way of looking at why AI agents get things wrong. I especially liked the idea that the problem is often not a lack of intelligence, but a lack of shared meaning.

The “top client” and “overdue invoice” examples make the problem very real. Those terms sound obvious until you actually have to define them precisely. Humans fill in those gaps from experience and company context, while an agent can only work with what we make available to it.

I also really liked the decision to halt when a term is undefined instead of letting the agent make a reasonable guess. That feels like an important shift from trying to make agents “smarter” to making them more trustworthy.

The distinction between letting humans resolve ambiguity and keeping the actual business definitions governed was especially interesting. Great article—this is the kind of practical thinking AI agents need as they move from demos into real business workflows.

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai •

Thank you.

Collapse
 
irr123 profile image
Ivan •

Interesting approach. Have you tried running the same case many times to see how stable the results are?

In my experience non-determinism often stays a bottleneck even with good context.

Collapse
 
sreeni5018 profile image
Seenivasa Ramadurai •

Not yet. This post is a design idea I had recently, and I wanted to share it and hear how others see it, so I haven't run it many times or measured how stable it is. I agree that non-determinism stays a bottleneck even with good context, since context narrows the range of outputs but doesn't remove the variation. The thinking behind the design is to move as much as possible out of the model and into deterministic pieces: governed definitions, rule checks in code, and a halt enforced by the tools. The model's variation then affects the plan, but not the meaning of the terms or the final checks. I'd still want to test that by running the same case many times and seeing how often it stays correct. How do you measure stability in your own runs?

Collapse
 
irr123 profile image
Ivan •

My case: the exact ground-truth data arrived long after the decisions I wanted to make on it. So I validated my AI-based process many times against historical exact data.

As a result, I moved from agentic behavior to a predictable prompt chain. It gave good business results.

Thread Thread
 
sreeni5018 profile image
Seenivasa Ramadurai •

That's a sensible way to handle a long feedback delay. Validating against historical exact data many times and ending up with a predictable prompt chain is a good result, and I'd take stable and measured over flexible and unproven. Did you try Agent Skills to improve the chain? Prompts tend to get bloated as a process grows, and with skills only a short name and description sit in context until a step needs the details. The full instructions and any reference files load on demand (progressive disclosure), so each step stays small and focused. Curious whether that would help in your case or whether the chain is already lean enough.