Prompting technique

ReMem (Reason-Memory) / ExpRAG

Evo-Memory: Benchmarking LLM Agent Test-time Learning with Self-Evolving Memory, arXiv:2511.20857 (2025) · read the paper

What it does

The method transforms an LLM's context window into temporary learnable memory through a structured log of past experience. The model first analyzes relevant examples of successes and failures from history, then applies extracted lessons to the current task. Increases task success rate by 60% by avoiding repeated errors.

Task typemulti step
Shaperag enhanced
Efforta pipeline
Addressesanswers that are close but wrong; the same prompt giving different answers; the model losing what was agreed earlier
Published2025-11-25
AuthorsTianxin Wei, Noveen Sachdeva, Benjamin Coleman et al.

When it helps

Use ReMem when an LLM-agent regularly solves similar types of tasks and can accumulate experience. Particularly effective for complex multi-step tasks where avoiding repetition of past mistakes is important. Suitable for automated systems where the agent works in a loop and can learn from its actions. Requires the ability to store and structure interaction history in 'task-prompt-result-evaluation' format. Requires tuning of relevant experience extraction system and two-stage prompt with phases

A prompt you can paste

Generic by design: it applies the technique without knowing your task. Adapt the marked parts.

Prompt
You are an AI agent tasked with improving performance on a specific type of task by learning from past experience.

**PAST EXPERIENCE LOG**

This log contains examples of previous tasks, the prompts used, the results obtained, and an assessment of success or failure. Analyze this log to understand what strategies work well and which ones should be avoided for the current task.

---
**EXPERIENCE ENTRY #1**

**Task:** Generate 3 creative post ideas for a Telegram channel about healthy eating, focusing on practical tips.
**Prompt Used:**

If this one does not fit, the two closest alternatives in the corpus are Debugging Prompts Framework and MTR (Multi-Turn Reasoning) Framework, which target the same failure from a different angle.

Worked example

The same technique applied to a concrete job: answer questions strictly from a supplied document set. Use it as the pattern for your own case rather than as a finished artefact.

Worked example
You are an AI agent tasked with answering questions strictly from a supplied document set using the ReMem (Reason-Memory) technique.

==================================================
PAST EXPERIENCE LOG
==================================================

[Experience #1]
**Task:** Answer questions about a company's Q3 financial report.
**Prompt Used:** "Answer the following questions based on the provided Q3 financial report: [Questions]"
**Result:** The model hallucinated details about future projections not present in the report.
**Outcome:** FAILURE. Reason: The model was not explicitly instructed to *only* use information present in the document and avoid speculation.

[Experience #2]
**Task:** Summarize the key findings from a research paper on climate change.
**Prompt Used:** "Summarize the key findings from the following research paper on climate change. Stick strictly to the information presented in the text. Document: [Paper Text]"
**Result:** The summary accurately reflected the paper's findings without adding external information.
**Outcome:** SUCCESS. Reason: Explicit instruction to "stick strictly to the information presented" and the clear provision of the document were effective.

==================================================
CURRENT TASK
==================================================

**Document Set:** [Please insert the document text here. This should be the corpus of information from which answers are to be drawn.]
**Questions to Answer:** [Please list the specific questions that need to be answered based on the document set.]

==================================================
EXECUTION INSTRUCTIONS
==================================================

First, perform the **Think** step, then the **Act** step.

**Think:**
1. Analyze the provided 'PAST EXPERIENCE LOG'.
2. Identify the key strategy from the SUCCESSFUL experience that should be applied to the CURRENT TASK.
3. Identify the error from the FAILURE experience that must be avoided.
4. Synthesize these insights into a clear instruction for the AI regarding how to process the 'Document Set' and 'Questions to Answer'.

**Act:**
1. Formulate a prompt for the AI that incorporates the synthesized instruction from the Think step.
2. This prompt must explicitly instruct the AI to answer the 'Questions to Answer' *solely* based on the provided 'Document Set'.
3. Ensure the prompt includes a clear directive to avoid any external knowledge or speculation, mirroring the success of Experience #2.
4. Present the final answers to the questions.

**Output Format:**
- Clearly label the "Think" and "Act" sections.
- Within the "Act" section, present the final answers to the questions clearly.

Get this written for your actual task

Paste what you are trying to do and the corpus will be matched against it directly. Free, no account, about ten seconds.

Free · no signup · ~10s
0.00match confidence
single retrieval pass
Prompt for your task

      

That number is low on purpose, and it is real. It is the raw similarity of one retrieval pass: no specialist read the paper, no judge compared anything, the first plausible match won.

6,235techniques in the corpus
one of which is this page

Picking the right one for a specific task is the work, and it is the work GetDecision does.

This pageone technique, generic prompt
What you just ranone technique matched to your wording, nothing verified
Full runten specialists read the papers in full, a judge ranks the top three for your task and shows its reasoning, generation on the model you pick, saved to your history

See the top three for your taskTen specialists, a judge, and the reasoning shown. Free account, first run included.

Run the full analysis

Related techniques

Debugging Prompts FrameworkA systematic framework for diagnosing and preventing typical errors of language models in instruction understa…MTR (Multi-Turn Reasoning) FrameworkA method of structuring multi-step interaction with an LLM through a "game with rules" format. Includes four b…StateAct (Self-Prompting + Chain-of-States)StateAct improves LLM agent performance through two mechanisms: continuous reminder of the end goal (self-prom…Dynamic Enhancement Chain (DEC)A method that breaks down a complex question into a chain of simple sub-questions solved sequentially. Each st…

All techniques · Failure modes and fixes