← Back to the journal

DataFocus · Journal

GraphRAG vs an Ontology Platform: Which Gives Agents Better Enterprise Context?

GraphRAG builds an inferred graph from documents to improve retrieval over text. A governed ontology holds owned definitions over live tables and answers with SQL that ran. Use each for what it is built for, and combine them.

Use GraphRAG when your agent's questions are about a large body of text, such as reports, tickets, contracts or research notes, and the hard part is finding and summarizing what those documents say. Use a governed ontology platform when the questions need numbers from live business tables, definitions someone owns, and permissions an agent must respect. Most enterprise agents need both: GraphRAG-style retrieval for documents, and an ontology for anything that has to be computed, checked or approved. The difference is not "graph versus no graph". It is a graph a model inferred from text versus a model of the business that people approved and an engine computes over.

What does GraphRAG build, and from what?

GraphRAG comes from Microsoft Research. Its February 2024 blog post describes the approach as one that "uses LLM-generated knowledge graphs to provide substantial improvements in question-and-answer performance" on private narrative data. The input is text. A language model reads the corpus, extracts entities and relationships, and the resulting graph is used to retrieve and summarize.

The accompanying paper, Edge et al., From Local to Global: A Graph RAG Approach to Query-Focused Summarization (arXiv, April 2024, revised February 2025), states the problem it targets: "RAG fails on global questions directed at an entire text corpus." Questions like "what are the main themes across these documents" are poorly served by fetching the top few chunks. The paper reports that the graph-based approach improved the comprehensiveness and diversity of answers to such global sensemaking questions over datasets in the 1 million token range.

Two properties follow from the design and matter for agent builders:

  • The graph is inferred. Entities and edges are whatever the model extracted. Nobody signed off on "this node is the customer, and this is what revenue means".
  • The output is text. The answer is a summary grounded in retrieved passages. If a passage says "Q3 revenue was about 4 million", the agent can repeat that; it cannot recompute it.

For document-heavy discovery, that is the right tool, and the Microsoft results are evidence for it.

What does a business ontology hold?

DataFocus defines an ontology as "a model of your business, covering its objects and how they relate, the rules and definitions you work by, the actions that can be taken, and who may see and do what. People and AI work on the same model." In DataFocus OT Flash and OT Heavy, an ontology models one business area and has five parts: objects and relationships, rules and knowledge, indicators, actions, and permissions.

Take the purchase-approval ontology that ships with the product:

  • Objects and relationships. Tables from different systems are organized under the ontology, with how they relate and what each relationship means, shown in an ontology graph. The built-in example has nine tables, including purchase requests, approval events, process variants, bottlenecks, compliance findings, improvement tasks and audit records.
  • Rules and knowledge. A document center holds policies, rules and metric definitions, linked to the data they govern: compliance rules, SLA and bottleneck rules, event-log definitions, and the procedure for writing back and auditing tasks.
  • Ownership. The documentation describes how this works across a business: objects connect (orders to customers, production tasks and effective contracts), each field has a source and each definition an owner, and uncertain relationships remain unconfirmed rather than being silently asserted.

That last point is the sharpest contrast with GraphRAG. In an inferred graph, a weak edge looks like any other edge. In a governed ontology, an unconfirmed relationship is visibly unconfirmed until someone approves it.

Numbers: retrieved text vs SQL that ran

Agents get asked "what was the average approval time last month for requests over the threshold". GraphRAG can only answer that if a document already contains the figure, and the figure is as current as the document.

An ontology platform computes it. In DataFocus OT, a real engine sits underneath: Apache Doris in Flash, Trino and others in Heavy. Answers come from the SQL that actually ran instead of figures estimated by a language model. Every query returns the SQL that ran, the tables it used and a data fingerprint, and the AI follows the objects and relationships defined in the ontology instead of guessing joins.

There is outside evidence that this kind of structure matters for numeric questions. In a 2023 data.world benchmark (Sequeda, Allemang and Jacob, arXiv, November 2023) on an enterprise insurance SQL schema, GPT-4 with zero-shot prompts directly on the database reached 16% accuracy, rising to 54% when questions were posed over a knowledge graph representation built from an ontology and mappings. It is one schema and a GPT-4-era model, so treat it as directional, but note what the "knowledge graph" was there: an ontology mapped onto the tables, not a graph extracted from prose.

GraphRAGGoverned ontology (DataFocus OT)
Built fromText corpusLive tables plus linked policy and definition documents
How the graph is madeExtracted by an LLMModeled; fields have sources, definitions have owners
Uncertain linksLook like other edgesStay marked unconfirmed
Numeric answerQuoted from a passageComputed by SQL on an engine
Evidence returnedRetrieved passagesSQL, tables used, data fingerprint
Best atGlobal questions over large document setsMetrics, joins, rule checks, write-back

Permissions and approval in each approach

GraphRAG, as described in the paper, is a retrieval and summarization method. Access control is whatever you build around the index. Once text from many documents has been merged into entity summaries, filtering by the user's rights is harder than filtering individual chunks, so plan that explicitly if documents carry different permissions.

In DataFocus OT, permissions are part of the ontology. An agent gets only what the authorizing user may see. Requests outside its grant do not reveal whether the data exists, and withdrawing access takes effect at once. Every ontology has an ontology agent: you ask in plain language and it answers from the ontology's data and documents with evidence, and it can run the ontology's executions to analyze or write back. Write-back goes through the executions defined in the ontology, not through changes the agent improvises.

Combining them: documents plus governed data

The two approaches cover different halves of enterprise context, so a combined design is often the right one. A hypothetical layout for an agent that supports procurement analysts:

  1. Ontology for facts and actions. Purchase requests, approvals and bottlenecks live as tables in the ontology. Any question that needs a count, average or comparison goes to the ontology agent, which returns SQL and a data fingerprint.
  2. Ontology document center for rules. The approval policy and SLA definitions are linked to the tables they govern, so "is this request late" is evaluated against the owned definition.
  3. GraphRAG over the long tail. Supplier correspondence, meeting notes and past audit narratives that never become tables go into a GraphRAG index for theme and discovery questions.
  4. Routing rule. If the answer must be a number, a filtered list or a change to a record, route to the ontology. If it is "what do these documents say about X", route to GraphRAG. When an answer uses both, show both kinds of evidence: the SQL and the passages.
  5. Promotion path. When GraphRAG keeps surfacing the same relationship (say, a supplier tied to repeated compliance findings), treat it as a candidate to model in the ontology, where it stays unconfirmed until an owner approves it.

This is illustrative architecture, not a tested reference deployment.

Choosing for your agent

  • Pick GraphRAG first if your corpus is mostly unstructured text, your users ask exploratory or summary questions, and wrong numbers would not reach a decision. It is also the better fit when there is no table to compute over.
  • Pick an ontology platform first if answers feed metrics, compliance checks or write-back, if two systems disagree about what "customer" or "approved" means, or if agents must inherit user permissions.
  • Use both when analysts need the narrative and the numbers, which in practice is most enterprise work.

Trade-offs on the ontology side: someone has to model the business area and own its definitions, which is work GraphRAG skips by letting the model infer. On the GraphRAG side, indexing cost and summary quality depend on the model, and the result has no notion of an approved definition.

To try the ontology half, both editions are distributed free from the DataFocus download page and the GitHub repositories for OT Flash and OT Heavy; system requirements are listed in each edition's release notes. The documentation covers how ontologies, documents and the ontology agent fit together.