Abstract
AI search depends on linking large language models (LLMs) with vast external knowledge sources. Yet web pages, PDF files, and other raw documents are not inherently LLM-ready: they are long, noisy, and unstructured. Conventional retrieval methods treat these documents as verbatim text and return raw passages, leaving the burden of fragment assembly and contextual reasoning to the LLM. This gap underscores the need for a new retrieval paradigm that redefines how models interact with documents. We introduce the Model-Document Protocol (MDP), a general framework that formalizes how raw text is bridged to LLMs through consumable knowledge representations. Rather than treating retrieval as passage fetching, MDP defines multiple pathways that transform unstructured documents into task-specific, LLM-ready inputs. These include agentic reasoning, which curates raw evidence into coherent context; memory grounding, which accumulates reusable notes to enrich reasoning; and structured leveraging, which encodes documents into formal representations such as graphs or key-value caches. All three pathways share the same goal: ensuring that what reaches the LLM is not raw fragments but compact, structured knowledge directly consumable for reasoning. As an instantiation, we present MDP-Agent, which realizes the protocol through an agentic process: constructing document-level gist memories for global coverage, performing diffusion-based exploration with vertical exploitation to uncover layered dependencies, and applying map-reduce style synthesis to integrate large-scale evidence into compact yet sufficient context. Experiments on information-seeking benchmarks demonstrate that MDP-Agent outperforms baselines, validating both the soundness of the MDP framework and the effectiveness of its agentic instantiation.
Introduction
Current Retrieval-Augmented Generation (RAG) systems are frequently hindered by "Data Chaos." Raw documents—ranging from complex PDFs to sprawling web pages—are inherently noisy, redundant, and unstructured. Standard retrieval methods typically treat these documents as verbatim text, returning disconnected fragments to the Large Language Model (LLM). This approach forces the LLM to expend its limited context window and reasoning capacity on "fragment assembly"—the arduous task of determining how disparate pieces of text relate while filtering out irrelevant boilerplate noise. In scenarios requiring multi-step reasoning across multiple sources, vanilla RAG often fails because the signal-to-noise ratio is too low for effective processing.
The Model-Document Protocol (MDP)
To address these challenges, we propose the Model-Document Protocol (MDP). This framework shifts the focus from simple "passage fetching" to a structured transformation of raw data into "LLM-ready" knowledge. MDP defines three primary pathways for bridging raw text to LLMs:
- Agentic Reasoning: Iteratively curating raw evidence into a coherent, task-specific context.
- Memory Grounding: Accumulating reusable "notes" or summaries to enrich the reasoning process.
- Structured Leveraging: Encoding documents into formal representations, such as knowledge graphs or key-value caches, to facilitate efficient retrieval.
MDP-Agent: An Agentic Implementation
We instantiate this protocol through MDP-Agent, a system designed to organize data chaos into a compact, hierarchical knowledge chain. Key components include:
- Gist Memory: Unlike standard dense embeddings that capture only local semantics, MDP-Agent uses a lightweight LLM to generate a "gist" for every document—a high-level summary of its structure and themes. This allows the agent to understand the global context of a document before performing granular extraction.
- Diffusive Wide Exploration: When initial queries are insufficient, the agent "diffuses" its search by generating new sub-queries based on intermediate findings, uncovering hidden dependencies across documents.
- Map-Reduce Synthesis: To handle large-scale data, the system filters and extracts evidence in parallel (the "Map" phase) and then synthesizes it into a compact, relevant subspace (the "Reduce" phase).
- The Knowledge Chain: The final output is a structured context that explicitly encodes the reasoning trajectory and the supporting evidence, rather than a mere collection of snippets.
Evaluation and Results
The performance of MDP-Agent was evaluated on two challenging benchmarks: GAIA (General AI Assistant), which requires real-world tool use and multi-step logic, and WebWalkerQA, which involves traversing multiple subpages to integrate dispersed evidence.
As shown in the results, MDP-Agent (utilizing QwQ-32B) achieved an average score of 50.5% on the GAIA benchmark, significantly outperforming vanilla RAG (32.0%) and specialized reasoning models like DeepSeek-R1 (31.1%) without retrieval. On WebWalkerQA, the gap was even more pronounced, with MDP-Agent scoring 53.1% while standalone LLMs struggled to exceed 10%.
Discussion and Future Work
The core insight of this work is that retrieval should be viewed as a transformation rather than a fetch. By prioritizing "gist" over raw embeddings and decoupling high-level reasoning from low-level data processing, MDP-Agent achieves high efficiency. In complex cases, the central reasoning model consumed only ~9K tokens, while auxiliary "worker" models processed over 200K tokens of raw data.
However, limitations remain. The system's performance is heavily dependent on the quality of the central reasoning LLM. Furthermore, the iterative nature of diffusive search introduces higher latency compared to single-shot RAG. Future work will explore the "Structured Leveraging" pathway more deeply, integrating formal formats like KV caches and graphs to further enhance reasoning speed and reliability.
Conclusion
The Model-Document Protocol redefines the interaction between LLMs and external knowledge. By transforming unstructured data into LLM-ready context, MDP-Agent demonstrates that structured knowledge representations are essential for solving complex, real-world information-seeking tasks.
Summary updated