Context as Infrastructure: Knowledge Compilation for Retrieval in Agentic Systems with Harnesses

Zhichang Yu, Baining Cao, Sbaaoui Idriss, Qi Wang, Gangqiang Xu +13 more
10/30/2026
cs.IRcs.AIcs.CL

Official code: infiniflow/ragflow (94,607 stars, Python, Apache-2.0, last commit 2026-04-30).

Abstract

Retrieval-augmented generation is becoming agentic. A search harness writes queries, reads results, reformulates, and decides when to stop.

Show full abstract

This largely solves accuracy: a harness with only BM25/grep and MiniMax M3 answers 85% of BrowseComp-Plus and 91% on multi-hop FRAMES in our runs, without compiled or vector indexes. It exposes a context problem: an undisciplined loop repeats queries, rereads documents, and fills the window with unused passages. The missing layer is knowledge compilation: a configurable ingestion pipeline where LLMs enrich documents with context no chunk contains alone--navigation hierarchies with claim-evidence leaves, entity graphs, timelines, mind maps, ontologies, wikis, and memory. Compilation is not a better retriever: under a competent harness, structural artifacts gave no detectable accuracy gain on FRAMES, and a PageIndex-style outline degraded at scale. It is a supply layer. A navigation tree whose leaves are claim-evidence pairs--the mechanism we measure--cuts query tokens by 91% when evidence suffices and adds 1.9% when it does not, a 38% average reduction; this implies a 2% break-even sufficiency rate and a measured rate near 43%. A decision gate cuts latency from 140 s to 30 s, though substitution's token saving is bought with retrieval rounds and carries its own latency cost. Other artifacts--ontology, graph, wiki, timeline, mind map, memory--pay off in deployment (governance, integration, onboarding, temporal orientation, continuity) where accuracy benchmarks cannot see them. We describe RAGFlow's pipeline and harness (open source at https://github.com/infiniflow/ragflow), which turns the loop into five disciplined stations and keeps the context entering the model the smallest sufficient set; together they form an agent-native database: a store that hands the agent compiled, governed context instead of a ranked list of passages.

View on arXivView PDF

Code Implementations(1)

infiniflow/ragflowOfficial100%
Apache-2.0

RAGFlow is a leading open-source Retrieval-Augmented Generation (RAG) engine that fuses cutting-edge RAG with Agent capabilities to create a superior context layer for LLMs

94,60711,373Python, TypeScriptDec 12, 20237 months agoApache-2.0
llm-app

Similar Papers

Cite this paper

@article{yu2026context,
  title  = {Context as Infrastructure: Knowledge Compilation for Retrieval in Agentic Systems with Harnesses},
  author = {Zhichang Yu and Baining Cao and Sbaaoui Idriss and Qi Wang and Gangqiang Xu and Ling Qin and Xiaoling Jin and An Liu and Shaohao Cai and Xiaoyang Bao and Shengle Chen and Changchang Ding and Pengfei Zhu and Jingxiang Xu and Yifeng Mao and Lu Liu and Hai Jin and Yingfeng Zhang},
  year   = {2026},
  eprint = {2610.41172},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.41172v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.41172.svg)](https://codeofpaper.com/paper/2610.41172)

Discussion