RAG & Knowledge

Why RAG Is Not Enough: The Four Layers Between a Knowledge Base and a Business Agent

An original four-layer model for enterprise AI that must act, not just answer: RAG covers documents, knowledge graphs cover relationships, the operational ontology covers state, rules and actions, and the agent executes against all of it with verification. In…

The request that breaks a knowledge base

Every enterprise AI project starts with a demo that works: the knowledge base is loaded, retrieval is wired up, and the model answers policy questions, quotes product specs, summarises incidents. Then a user asks the real question — “analyse why this customer’s complaints went up, and if they qualify, submit the VIP upgrade request” — and the same system falls apart.

Example, not a benchmark. The scenario below is constructed for illustration only — no real customer, no real data, no claim about any deployment. It is the same kind of teaching case used in the source material this guide is based on.

Take a customer, call them C001. The request behind that one sentence touches four different systems: customer records and tier in the CRM, orders and contracts in the ERP, complaint tickets in the service desk, and the VIP policy in the knowledge base. Completing it means resolving one identity across four id schemes, joining the relationships, checking eligibility against policy and current state, verifying the requester’s permissions, routing an approval, writing the change through a controlled interface, and confirming the state actually changed. Not one of those steps is “find a similar paragraph.”

Inference. This guide is our original analysis of the architecture that handles such requests, in four layers: retrieval, graph, ontology, agent execution — plus the five ways teams get stuck between the first two and the last two. Technical definitions are checked against the official sources and the GraphRAG paper at the bottom; cited by title and canonical link only, no full-text reproduction, licence UNDECLARED / index_only.

Layer 1 — RAG gives you documents, not state

Fact. Retrieval-augmented generation grounds the model’s answers in retrieved passages from a corpus: documents are embedded, stored, retrieved at query time, and fed to the model as context [S3]. It is the right architecture for questions whose answer lives in documents: policies, manuals, specs, past incident write-ups.

Inference. The distinction that decides whether a project survives the demo: a policy document says what the VIP rules are; the CRM says what C001’s tier is right now. The first is knowledge, stable until the policy changes. The second is operational state, which changes on every order, refund and ticket. RAG answers the first class of question well. For the second class it is structurally out of scope: the retrieved paragraph can explain the upgrade policy, but it cannot tell you whether C001 has an open major ticket. Teams that treat “RAG is deployed” as “the enterprise AI is deployed” discover this on the first real request, and usually relive it as a surprise.

Layer 2 — graphs connect the entities RAG cannot see across

Inference. Once the system knows that C001 has a contract, bought a product, and submitted tickets, the interesting questions become multi-hop: which tickets involve the product that dominates this customer’s complaints? Did the spike concentrate in a batch? A knowledge graph — entities, typed relations, properties — makes those traversals first-class queries instead of a chain of joins each system has to expose.

Fact. The Microsoft research paper “From Local to Global” formalises the step beyond single-retrieval RAG: build a graph over the corpus, then combine local retrieval with community summaries so the system can answer both query-focused questions and global ones — for example, “which products do recent complaints concentrate on” — that no single retrieved passage contains [S2]. The pattern transfers to operational data: retrieval finds the relevant neighbourhood; the graph answers the question that spans it.

Inference. Where the graph still stops: it answers “what is related”, not “what is allowed”. It can show that C001 has an open major ticket. It cannot say whether an upgrade may be requested, by whom, and through which approval. That is the line the next layer exists for.

Layer 3 — the operational ontology: objects, state, rules, actions

Fact. In the Palantir Foundry documentation the ontology is the layer that sits between data and applications: object types map underlying data to business objects, links name the relations between them, and actions define the authorised operations those objects support, with security as part of the model [S1]. That is the working definition of an operational ontology, and it is worth unpacking, because each element removes a class of failure from the C001 request.

  • Object — the customer, the order, the ticket as business entities, not four different table schemas. Building an object is not copying data somewhere new; it is defining the mapping, keys, provenance and update path, while the source systems stay where they are.
  • Link — the foreign key becomes a named business relation: hasOrder, hasContract, hasTicket. The agent queries relations instead of stitching SQL.
  • State — the fields that move through a process: normal, pending application, in approval, VIP. An agent that does not know the current state cannot know what is legal to do next.
  • Rule — the eligibility logic as deterministic code, checked against live data. A policy retrieved by RAG is text; the rule service is the decision. The two must never be conflated: a model reading the policy paragraph is not entitled to certify eligibility.
  • Action — the thing that turns a system from read-only into operational. A production action is not a raw endpoint: it declares inputs, preconditions, executor, permissions, approval requirement, success criteria and failure handling. If you find yourself letting the model generate an UPDATE customer SET tier=’VIP’ directly, the ontology is missing its most important layer — that path skips every rule, permission and approval above it.

Inference. The sentence we would put on the wall: the model may request an operation; it may never declare that the permission check passed. Enterprise-grade AI and a fancy chatbot are separated by exactly that boundary, and it is enforced in the backend, not in the prompt.

Layer 4 — the agent executes against the ontology, and verifies

Fact. An agent is a system that loops toward a goal: it calls tools, observes results, and decides its next step; the published guidance from Anthropic draws the line between predefined workflows and such autonomous loops, and recommends the cheapest structure that covers the task [S4].

Inference. With an ontology in place, the agent’s loop for the C001 request becomes auditable: resolve the customer object, read relations and current state, retrieve the policy, run the eligibility rule, request the ChangeLevel action, let the backend check permissions and route approval, execute, then re-query the object to confirm the tier actually changed before reporting anything. The last step is where most projects quietly fail: “submitted” is a claim that requires an execution receipt; an in-approval request is not a success; a timeout is not a failure. Each status needs its own evidence, and a business reference number lets you re-check instead of re-submitting.

Advice. Record four things separately in production: the model output, the tool calls, the backend execution receipts, and the final business state. A post-mortem that cannot separate those four is a post-mortem that cannot find the bug.

The five places projects actually get stuck

Inference. From the delivery side, the same four layers produce five recurring failure modes:

  1. RAG as the whole system. Documents and live state are different data classes with different update mechanisms; designing one retrieval path for both is the root error.
  2. Knowledge graph equated with ontology. A graph of entities and relations without states, rules and actions still cannot execute anything reliably.
  3. Objects without actions. Months spent modelling Customer, Order and Product, then the first write request gets handled by calling a raw API behind the ontology — the execution layer was never built.
  4. The agent writing to the database directly. The model-generated-SQL path bypasses rules, permissions, approvals and events. One wrong judgement lands in production data with no audit trail.
  5. Validating the PoC, never the run. After go-live the hard questions are the unglamorous ones: is the data fresh, does a retried action double-execute, how is an ambiguous timeout resolved, how does an approval rejection recover the task, does a model upgrade invalidate a business rule.

Advice. The sequence that avoids all five: start with knowledge access (retrieval over the real documents, with versions and access control); then unify the business semantics of one domain (objects, key mappings across systems, relations, states); then automate on that model — read-only queries first, low-risk actions second, anything touching money or entitlements only behind permission checks, approvals and human confirmation. Every phase ships value; no phase is a bet on the whole stack.

Limits of this guide

The C001 scenario is constructed for illustration and makes no claim about any real customer or deployment. The four-layer model and the five failure modes are our editorial analysis, informed by public engineering material including the source article’s treatment; we reproduce no third-party text. Platform-specific details vary: the Palantir ontology model is one reference implementation, not a universal specification. Technical anchors are cited by title and link only, no full text, no licence asserted (index_only). Verified 2026-11-28.

Sources

Statement types used above: Fact = traceable to an official source or the cited paper; Inference = our architectural analysis; Advice = a practice recommendation; Example = constructed scenario, not a measurement and not a real customer.

What to do about it

  • Knowledge and operational state are different data classes; RAG only covers the first
  • A graph answers what is related; only the ontology answers what is allowed
  • A production action is not a raw endpoint — preconditions, permissions, approval, failure handling
  • The model may request an operation; it may never declare the permission check passed

Where this fits in the FDE path

Recommended kits

The FDE Deployment Toolkit 2026

Reference architectures, a 60-point go-live checklist, GPU cost models and a vendor shortlist — the four artefacts you rebuild on every single deployment.

Recommended kits

RAG in Production Playbook

Chunking strategies, reranking setups, evaluation harnesses and the seven failure modes that kill every RAG demo in week three.