Summary Agent Baseline Prompt
Baseline prompt from MIT CSAIL’s Recursive Language Models paper (arXiv:2512.24601v3, Appendix C.2). Used for the “Compaction agent” baseline — summarizes long documents then answers questions from the summary.
Prompt Definition
You are a helpful assistant. The user will provide you with a long document and a question. Your task is to summarize the document and then answer the question based on the summary.
Document: {document}
Question: {question}
Please provide a concise summary and then answer the question.This uses a template-vars envelope format with {document} and {question} placeholders.
Pattern Analysis
This prompt implements a two-stage compaction pattern:
- Compress — Summarize the full document (lossy)
- Query — Answer from the summary only
This is the standard context compaction approach used by many long-context systems (ReSum, MemGPT, etc.). The summary becomes the effective context for the QA step.
Performance (from paper)
On GPT-5 across 4 benchmarks:
| Task | Compaction Agent Score | RLM (depth=1) Score | Delta |
|---|---|---|---|
| CodeQA | 58.0 | 62.0 | +4.0 |
| BrowseComp+ (1K) | 70.5 | 91.3 | +20.8 |
| OOLONG | 46.0 | 56.0 | +10.0 |
| OOLONG-Pairs | 0.1 | 58.0 | +57.9 |
The compaction agent fails catastrophically on OOLONG-Pairs (0.1 F1) because the task requires dense pairwise reasoning across all items — information lost in summarization. RLMs succeed by processing items recursively without compaction.
Implications
Compaction loses information needed for dense reasoning. The summary agent baseline demonstrates the fundamental limitation of lossy context management: tasks requiring Ω(|P|²) access (pairwise, all-pairs, cross-referencing) cannot be solved from a summary.
RLMs avoid compaction by design. The RLM prompt keeps the full prompt accessible in the REPL and processes it piecewise via recursive calls. No information is discarded until the LLM chooses to ignore it.
This baseline is the proper control for evaluating RLM-style architectures — it isolates the “recursive decomposition vs. compaction” variable while holding the base model constant.
Related Pages
- recursive-language-model-prompt — RLM system prompt (the treatment)
- recursive-language-model — Paradigm concept
- context-compaction — General pattern this baseline implements
- monolithic-prompt-limits — Problem both attempt to solve
- memory-retrieval-patterns — Related retrieval approaches
Sources
Footnotes
-
raw/prompts/articles/recursive-language-models-arxiv-2512-24601v3.md ↩