RAG & Retrieval·Question 62 of 100Advanced

Your agents work over a large enterprise document estate. When does chunked agentic RAG win, when does a browsable knowledge tree win, and when does a typed domain ontology win? Why can the ontology be both more accurate and cheaper per task, and what does it cost to build?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

A useful public data point: Sarvam's knowledge-fabric write-up (October 2026) compared the three on Harvey's LAB firm-knowledge benchmark. Rubric criteria met went from 55.1% (agentic RAG over chunks) to 74.4% (knowledge tree) to 84.2% (ontology), while cost per task went $0.64, $1.18 and $0.28. Harvey separately reports up to 30% higher rubric pass rate and up to about 50% lower task cost from Harvey Graph, which pairs a case-law knowledge graph with a per-workspace context graph. These are vendor numbers on one domain, so treat them as a hypothesis to reproduce, but the shape is explainable.

Full worked answer

A useful public data point: Sarvam's knowledge-fabric write-up (October 2026) compared the three on Harvey's LAB firm-knowledge benchmark. Rubric criteria met went from 55.1% (agentic RAG over chunks) to 74.4% (knowledge tree) to 84.2% (ontology), while cost per task went $0.64, $1.18 and $0.28. Harvey separately reports up to 30% higher rubric pass rate and up to about 50% lower task cost from Harvey Graph, which pairs a case-law knowledge graph with a per-workspace context graph. These are vendor numbers on one domain, so treat them as a hypothesis to reproduce, but the shape is explainable.

Agentic RAG over chunks. The agent searches, reads fragments, reformulates and searches again. It needs no upfront modelling, handles any question, and stays fresh as documents change. Its weakness is relational questions ("which matters for this client used the older indemnity clause, and who signed off?"): the relations are scattered across documents, so the agent reconstructs them by reading, cost grows with exploration, and it misses joins it never thought to make.

Knowledge tree. Hierarchical summaries (estate, collection, document, section) that the agent browses top-down. It fixes "where would this be?" and gives the agent orientation, which is why accuracy rises. It is also why cost rises: browsing means reading many summary nodes per task before reaching evidence.

Typed ontology. Entities and relations (matter, client, party, clause, version, author, approval date) extracted and resolved once, then queried. A relational question becomes a query plus a few targeted reads instead of twenty exploratory ones. Accuracy goes up because entity resolution and supersession were done carefully at build time, not improvised mid-task. Cost per task goes down because the expensive reasoning moved out of the query path.

What it costs to build:

  • Schema design with domain experts, which is weeks, and the schema encodes assumptions that will be wrong somewhere.
  • An extraction pipeline over the whole corpus (LLM extraction per document is a one-off cost proportional to corpus size), plus entity resolution and a human audit of a sample.
  • Incremental updates as documents change, and permission propagation: an edge between two documents must not leak the existence of one the user cannot see.
  • Schema evolution, and a fallback: questions outside the schema still need chunked retrieval, so you run both.

Choosing. Look at the query mix. Lookup and "find the passage" questions are well served by chunked RAG. Orientation-heavy questions over sprawling estates favour a tree. Repeated relational and aggregate questions in a stable domain favour an ontology. Then do the break-even sum: with the numbers above, the ontology saves about $0.36 per task against agentic RAG, so a $60k build and audit pays back after roughly 170k tasks, before counting the accuracy gain. Low-volume or fast-changing domains may never get there.

What a good answer covers

  • A useful public data point
  • Rubric criteria met went from 55.1% (agentic RAG over chunks) to 74.4% (knowledge tree) to 84.2%…
  • Harvey separately reports up to 30% higher rubric pass rate and up to about 50% lower task cost from…
  • These are vendor numbers on one domain, so treat them as a hypothesis to reproduce, but the shape is…
  • The agent searches, reads fragments, reformulates and searches again

Key terms: Agentic RAG over chunks · Knowledge tree · Typed ontology · What it costs to build · Choosing

Interviewer follow-ups to expect

  1. How would you keep the ontology's permission model consistent with the source system's ACLs?

  2. Which questions would you put in an eval set to show the ontology is not just overfitting to the benchmark?

  3. When would you add a tree on top of the ontology rather than choosing one?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep