TL;DR

  • AI needs context to work well in a business setting. But not all context is built equal.
  • Here’s part two of my crash course on context models for Enterprise AI: how to build one, and where RAG, data lakes, and ontologies fall short.

Every second executive I talk to is trying to build a safety net around their AI agents. They’ve seen the news stories of agents gone rogue — and surveys like this one from VentureBeat showing 79% of enterprises have already taken a financial or operational hit due to an agent acting out of bounds.

But while the need for a context layer is now undisputed, the way to build it is. I’m still seeing many teams taking shortcuts, converting SOP PDFs into vector databases or pinning their hopes on a data mesh, all to find out that their agents still make costly mistakes and burn tokens.

In Part 1 of my context model crash course, I explained why context should always be cross-system, dynamic, and anchored in real process execution.

For part 2, we’re getting into the mechanics: I’ll explain how to actually build a process-centric context model — and why standard alternatives (e.g. RAG graphs, data lakes, ontologies) fall short.

But first, let’s cover some basics.

Where does context live in a business?

The good news is that a vast amount of information a context model needs to help agents make the right decisions is already right there in your business..

The bad news is that it’s stretched across a chaotic web of fragmented systems and apps. Places like:

  • SOP and work instructions that live in Visio, word docs, or PDFs
  • BPMN models
  • Process/customer data and operational rules that live in ERPs, CRMs, custom workflow tools, and spreadsheets
  • Email and slack conversations

Your problem is that these sources and systems are neither interconnected nor continuously updated at the pace your processes run. A context model solves this — though its success hinges entirely on how you build it.

5 ways to build a context model (and why #5 is my clear winner)

1. RAG or Graph-RAG

When I talk to enterprise AI architects and engineering leads about building context for AI, the first thing I usually hear is something like: “Can’t we just point Graph-RAG [or RAG] at our SOPs and let the model figure out the rules?”

The answer is, sure you can — if you don’t mind burning tokens, slow answers or getting confident-but-wrong responses. Here’s why:

Standard RAG: Pulling text chunks by semantic similarity is faster and lighter on tokens than GraphRAG, but you pay for it in accuracy. Because standard RAG grabs isolated snippets without understanding cross-system dependencies or process order, it gives your agent a fragmented view of the business. That’s how you get an agent shipping newer inventory while letting three pallets of temperature-sensitive meds expire—resulting in a $100k write-off (true story from a customer I worked with).

GraphRAG: Mapping entities and relationships into a knowledge graph gives your model much richer context and better accuracy than standard RAG. The catch is that your token bills and latency will blow up — because it’ll need to traverse graphs and stuff multi-hop relationships into every prompt. Plus, as long as this knowledge graph is built from static docs rather than live process execution logs, it still misses how your processes actually behave in the real world.

2. Data lakes/ Data lake houses

You might have made the effort to package your data in a data lake or data lakehouse, hoping this will tell AI exactly where to find the right data sets to make informed calls. But this static data view still forces AI to do what I call ‘reasoning gymnastics’ — aka spending time and tokens deducting business rules and coming up with solutions that are half-baked at best.

That’s because a data lake (house) tells AI where to find the right system/tool data, but it still doesn’t give it an understanding of how your business truly operates. Only if AI knows how a process is unfolding in real time — and how it has gone down a thousand times before — can it recognize decision patterns, operational risks, and deduct best practices on how to act next time (read more on why that is in part 1).

3. Forward-deployed engineers

If you’ve followed the news, you might have seen that both Anthropic and OpenAI have launched their own consultancies (with engineers working directly in customer companies) to get a bigger piece of the Enterprise AI cake. For these AI labs, it’s just the next step to own the entire AI cycle: “Don’t just sell the model. Go so deep inside the company that removing you becomes impossible.”

Now you could say: “If anyone knows how to make AI work and can build that context, it’s the people who sit right at the source.”

But in my view, there’s two reasons that speak against it:

First, proprietary trust. Your operational patterns, margin structures, and decision rules are your competitive advantage. Most enterprises won't hand that operational IP over to model labs that are also servicing their direct competitors.

Second, the conflict of interest. Anthropic and OpenAI are incentivized to tie your unique business logic directly to their own models. But you need that context layer to sit completely outside any lab — to swap models as costs, latency, and capabilities shift.

4. Context layers

There’s a fourth category that is arguably the most advanced approach to provide context to AI — and that’s via a context layer.

The label (Knowledge graph, semantic layer, ontology) might vary, but the core challenge remains: they give you isolated, single-system semantics rather than a cross-system, process-centric view of your business. Which means they don’t natively understand how work actually flows across your enterprise.

Now I will say Palantir’s ontology comes pretty close to what a complete context model should look like. Their approach is to define and connect objects, properties, links, and actions into an operational layer — which helps models simulate outcomes and make smarter decisions.

But, in my view, it still misses two critical dimensions that make that picture complete:

1. Native memory: To be fair, Palantir supports time-series data, action logs, and event objects that can track history over time. But that memory doesn't exist natively out of the box; it’s spread across multiple layers. Which means it can trace the ‘messy’ backstory of processes; e.g. how an order traveled through four different systems, who made which exception approval, or how a change in vendor payment terms caused a part shortage three weeks later. But connecting those dots across systems still takes a mountain of manual work.

2. Operational patterns: business processes don’t run by the book — they run on workarounds, shortcuts, and informal rules people invent to get things done. Palantir doesn’t learn those real-world habits by observing how work actually unfolded over thousands of past transactions. It doesn't know that your team always approves an order of a VIP client without the credit check being complete, because their payment history has been immaculate. Because the system can't discover those patterns on its own, forward-deployed engineers have to interview your staff and reverse-engineer every single shortcut, exception, and workaround by hand — deployment by deployment.

So yes, their ontology gives your agents a detailed map of your business, but someone still has to spend months building the traffic rules from scratch — which makes it expensive and pretty inflexible (who will update the ontology once your processes change?).

5. Process-centric context models

I’ve explained why a process-centric context model is the only way to make AI safe, scalable, and profitable in Part 1 of this series — along with the seven characteristics it needs.

The TL;DR version: process mining and task mining can capture 99% of your unique business context, as long as it’s digitally captured somewhere. By “logging” the real-time operational data across all your systems alongside the historical sequence of every step, interaction, and past decision, and reconstructing it into a digital twin of your operations — it gives you (and your agents) an accurate, objective view of how work actually flows through an organization.

The best object-centric process models also offer decision intelligence — meaning they let you simulate different scenarios and predict the most likely outcomes, giving AI invaluable knowledge on what to do next. And they make agentic decision-making a self-learning loop; meaning every agent’s actions are monitored and results are fed straight back into the context model.

Now, let’s get into the how.

In the best case, the answer is pretty easy: you build it conversationally. Building a context model with Celonis feels much like chatting with Claude or Gemini. You don’t write code; you interact with Celonis Apollo, the platform’s built-in AI agent. Which makes building it incredibly fast (one of our automotive customers built their context model with it in one afternoon).

Here is what that looks like in practice:

1. Start with an operational goal, and Apollo handles the rest

You prompt Celonis Apollo in plain English, with goals like:
“I want to optimize our cash conversion cycle.”
“Wrap this analysis into an agent that runs every Monday.”
“Help me build a dashboard to monitor and intervene on unpaid invoices.”

I’ll go with the cash conversion cycle example to explain what Celonis (and the agent) do at every step of the way.

2. Celonis discovers your true operational flows

It doesn’t start from a blank slate. Celonis reconstructs your end-to-end process flows in the form of a dynamic, system-agnostic digital twin. Which means every workaround, every process step, and every change is automatically captured — no hand-coding needed. For instance, in order to understand your company’s cash conversion flows, it maps your Order-to-Cash, Purchase-to-Pay, and Inventory Management processes as they move across your tech stack — think SAP, Salesforce, your procurement portal, as well as your billing and warehouse management apps.

3. It adds decades of accumulated process knowledge on top

It then cross-references your current state with the process patterns Celonis has distilled from over 2,500 enterprise deployments.

It immediately identifies the relevant business objects (invoices, purchase orders, customer records) and digital events (credit checks, invoice approvals, goods receipts) tied to your cash conversion cycle.

4. It co-builds solutions with your review

Celonis Apollo surfaces your process architecture and asks: “Here are the 12 objects and 34 event types driving your cash conversion cycle. Should we model this?” You approve, reprompt, or adjust parameters in real time until the foundation reflects how your business actually runs.

5. It infuses your business knowledge

To capture your company’s unique policies, business rules, and KPI calculations, you add your documentation into Celonis’ “knowledge vault” — BPMN diagrams, work instructions, compliance guidelines, SOP PDFs. Celonis Apollo ingests these documents directly into the context model.

6. And adds decision intelligence

The Celonis Context Model also encompasses decision intelligence, prediction, and simulation capabilities. That means you don’t just know when operations break, but when they’re about to break – and how to prevent it.

Take order release and credit management as an example: Your ERP system’s built-in AI agent might put a $200,000 sales order on credit hold because the customer crossed their limit in your ERP. Which means delivery gets blocked, warehouse staging stalls, and a critical customer relationship is strained.

But when powered by the Celonis Context Model, an agent sees the whole picture:

  • The present: The order is pending release in your ERP.
  • The past: The customer has a 99% on-time settlement record across hundreds of historical transactions.
  • Prediction & simulation: It simulates the exposure, calculates near-zero risk, and releases the order for shipping.

Instead of an agent causing an invisible supply chain bottleneck, it now protects both working capital and customer delivery timelines.

Why a process-centric context model makes agents dramatically more reliable (and cheaper)

When an agent operates on top of a process-centric context model like Celonis, rather than raw data, RAG/Graph-RAG, or an ontology, three things happen:

  • You stop wasting tokens
    Your model doesn't have to spend thousands of tokens deriving your business logic with every prompt. It saves its ‘brain power’ for what it does best: synthesizing information, evaluating tradeoffs, and taking actions — all within the guardrails you’ve set.
  • Agents stop guessing
    Instead of an agent guessing how a delay in fulfillment ripples through billing and slows down collections, it knows. Built on your deterministic boundaries, your agents know which step usually follows another, what thresholds trigger an escalation, and where an SLA breach is imminent based on how the process went down a thousand times before.
  • Your operational context is yours alone.
    Because the Celonis context model is separated from your agentic layer, you can plug in Gemini Enterprise, Claude, or an open-source model tomorrow without rebuilding your business logic from scratch.

Why context is very much alive

The crucial thing about context for AI is that it’s never ‘done’ or ‘complete.’ You can’t “set up” a context model once and move on. It’s alive and evolves as much as your company evolves. New products, tools, business rules, customers, exceptions, strategic priorities, even geopolitical events — all of these need to be ingested in your context model to reflect your business reality.

So it isn’t just about being as ‘complete’ as possible — it’s about continuously evolving/improving that context layer with real-time input.

That’s also where context feedback loops, or Agent Mining, come in. Because the best context models enable agents to learn from their own actions and human feedback: the agent takes an action, the human approves/denies/adjusts, and that feedback goes directly back into the context model — making each new agentic action smarter than the previous one.

Real-life example: How Uniper refined agent logic with a context model

Let’s take a look at a real-life example of what a process-centric context model enables.

Uniper, a European energy company with global reach, initially fed Microsoft Copilot raw data straight from their own HR system to revamp their hiring journey. And the LLM couldn't find a single issue with their recruiting pipeline. On the contrary, it confidently hallucinated that everything was running perfectly.

But when they fed the same agent their recruiting process data and business knowledge through the Celonis Context Model, the picture changed completely.

The agent showed exactly how many shortlisted candidates were waiting for feedback for more than 14 days and which applications were stuck pending review. The result: reduced screening times, a much shorter (by 27 days) average time-to-sign for candidates, stronger process governance, and lower token costs.

“With Celonis as our context layer, we’re building AI solutions that aren’t just tools we experiment with, but assistants we trust.”

— Robert Daamen, Head of Process Intelligence CoE and Services, Uniper

Recap: What to look out for when building context models

When building a context model, you have three main levers to make agentic AI safe and profitable:

1. Tame token consumption by feeding agents real process patterns and deterministic guardrails instead of forcing them to deduce rules from scratch.

2. Own your context layer outside proprietary model gardens so your operational IP stays yours.

3. Treat context as a living thing, continuously updated by human feedback, real process flows, and agent mining.

If you want to see how leading enterprises are doing exactly this, I highly recommend our AI Transformation Playbook.

Sources and references