PRISM: Efficient Long-Range Reasoning With Short-Context LLMs

Dulhan Jayalath, James Bradley Wendt, Nicholas Monath, Sandeep Tata, Beliz Gunel

Abstract

Long-range tasks demand reasoning over long inputs. However, existing solutions are limited, e.g., long-context models require large compute budgets, parameter-efficient fine-tuning (PEFT) needs training data, and retrieval-augmented generation (RAG) entails complex task-specific designs. Though in-context approaches overcome many of these issues, methods with short-context LLMs are inefficient, trading context for processing more tokens. We introduce PRISM, a highly token-efficient in-context method based on structured schemas that outperforms baselines on diverse tasks with 4x shorter contexts. This approach produces concise outputs and efficiently leverages key-value (KV) caches to reduce costs by up to 54%. PRISM scales down to tiny contexts without increasing costs or sacrificing quality, and generalizes to new tasks with minimal effort by generating schemas from task descriptions.

Introduction

Large Language Models (LLMs) are increasingly capable of handling massive contexts, but "long-context" models remain computationally expensive and often inaccessible for resource-constrained environments. Existing workarounds like Parameter-Efficient Fine-Tuning (PEFT) require task-specific training data, while Retrieval-Augmented Generation (RAG) often struggles with global reasoning or complex dependencies across a whole document.

Standard incremental summarization—where a model reads a chunk, updates a natural language summary, and proceeds—suffers from "leaky" summaries that lose detail and high token overhead. Crucially, traditional incremental methods break the efficiency of Key-Value (KV) caching because the prompt prefix changes with every summary update, forcing the model to re-process the entire input. PRISM (Processing Incrementally with Structured Memory) addresses these inefficiencies by introducing a structured, cache-friendly approach to long-range reasoning.

Comparison of PRISM with alternative long-range reasoning methodologies.

The PRISM Framework

PRISM introduces a programmatic approach to document processing through several key innovations:

1. Structured Memory and Proposed Revisions

Instead of unstructured natural language, PRISM maintains memory based on a typed hierarchical schema (e.g., a JSON object or Python dataclass). Rather than rewriting the entire memory at every step, the LLM outputs specific revisions—such as updating a field or adding a new entry. This keeps outputs concise and reduces the cognitive load on the model by providing a "reasoning rail."

2. KV-Cache Optimization via Amendments

To maximize cache hits, PRISM places the memory before the new data chunk in the prompt. To prevent memory updates from breaking the cache for subsequent tokens, the authors utilize an "Amendments" strategy. Instead of modifying a JSON object in-place, changes are appended to the end of the memory string. The LLM is instructed to treat the latest amendment as the ground truth for a specific path, allowing large portions of the prompt prefix to remain identical across steps.

The PRISM architecture: Incremental processing with structured memory and KV cache optimization.

3. Automated Schema Generation

PRISM remains task-agnostic by leveraging the LLM's ability to generate necessary memory schemas automatically. By providing a task description and an example query, the system can derive a structured schema without manual expert intervention, facilitating rapid deployment on new tasks.

Experimental Evaluation

The authors evaluated PRISM on three challenging benchmarks: BooookScore (summarizing 100k+ token books), RepoQA (code retrieval), and LOFT-Spider (complex SQL reasoning).

Key results include:

  • Performance: PRISM achieved 97% of the performance of state-of-the-art long-context models like Gemini 1.5 Pro on BooookScore, despite using significantly smaller context windows.
  • Efficiency: The method reduced token costs by up to 54% compared to standard incremental baselines, achieving cache hit rates of up to 75%.
  • Scalability: PRISM maintained high accuracy even when context windows were scaled down to "tiny" sizes, proving that smaller chunks do not necessarily lead to higher costs when caching is optimized.

Conclusion and Future Work

PRISM demonstrates that structured memory can bridge the gap between short-context efficiency and long-range reasoning requirements. While highly effective, the approach currently faces bottlenecks in "multi-hop" reasoning where the model must recursively look up keys not yet encountered. Future work may explore bidirectional processing or dynamic schemas that evolve as the model discovers new information types within a document.

Summary updated

BibTeX
@inproceedings{jayalath2025prism,
  author = {Dulhan Jayalath and James Bradley Wendt and Nicholas Monath and Sandeep Tata and Beliz Gunel},
  title = {{PRISM: Efficient Long-Range Reasoning With Short-Context LLMs}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=uJhn3hooEA},
}
Figure