Reverse Prompting: A Memory-Efficient Paradigm for LLM Agents Through Structural Regeneration
preprint
OA: closed
CC-BY-4.0
Abstract
Large language model (LLM) agents face a fundamental challenge: how to maintain memory and context across extended interactions when constrained by limited context windows. Current approaches rely on external storage systems, vector databases, or retrieval mechanisms that are often complex and opaque. We introduce reverse prompting, a simple alternative where agents store compact, human-readable recipes instead of raw outputs. These recipes capture the essential structure and intent of generated content—such as code, documents, or plans—and can be used to regenerate functionally equivalent outputs when needed. For example, a 50-line machine learning script can be compressed into a 15-line recipe specifying the model architecture, dataset, and training parameters. When fed back to an LLM, this recipe produces new code that accomplishes the same task. We demonstrate the concept with practical examples across different domains and discuss its potential applications, limitations, and advantages over existing memory mechanisms. Reverse prompting offers a transparent, model-agnostic approach to agent memory that maintains human interpretability while enabling efficient storage and cross-session continuity.
My notes (saved in your browser only)
Citation neighborhood (no data yet)
We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.
Source provenance
- europepmc
- last seen: 2026-05-20T01:45:00.602351+00:00
- unpaywall
- last seen: 2026-05-26T02:00:01.498150+00:00
License: CC-BY-4.0