Self-Evolving Memory for Prompt Optimization (2026)
FreeMemory-augmented APO that stores historical refinement insights and reuses them across iterations
About Self-Evolving Memory for Prompt Optimization (2026)
MemAPO is a memory-driven framework for automatic prompt optimization that reconceptualizes prompt optimization as generalizable and self-evolving experience accumulation. It maintains a dual-memory mechanism that distills successful reasoning trajectories into reusable strategy templates while organizing incorrect generations into structured error patterns that capture recurrent failure modes. For a new prompt, MemAPO retrieves both relevant strategies and failure patterns to compose prompts that promote effective reasoning while discouraging known mistakes. Through iterative self-reflection and memory editing, MemAPO continuously updates its memory, enabling prompt optimization to improve over time rather than restarting from scratch for each task. Experiments on diverse benchmarks show that MemAPO consistently outperforms representative prompt optimization baselines while substantially reducing optimization cost.
Key Features
Pros & Cons
- Consistently outperforms representative prompt optimization baselines
- Substantially reduces optimization cost through reusable knowledge
- Generalizes across diverse tasks and queries without starting from scratch
- Accumulates and improves prompting knowledge over time via self-reflection
- Limited evaluation to benchmarks; real-world deployment details not provided
- Requires initial memory bootstrapping (potentially from prior optimization runs)
- Complexity of dual-memory management may introduce overhead