Self-Evolving Agents through Privileged Retrospective Distillation
Organizations: Meta AI
Abstract
Self-evolving agents aim to improve from their own experience rather than remain fixed after deployment, but naturally collected trajectories often lack ground-truth solutions or verifier-derived rewards. We introduce Retrospective Self-Distillation (RSD), a multi-round framework that turns such experience into dense supervision using privileged retrospective context. For each on-policy trajectory, the same underlying model acts as both student and teacher: the teacher re-scores the student's realized actions while conditioning on cross-task precedents and lessons, together with turn-level reflection and future hindsight from the completed trajectory. The resulting teacher distribution is distilled back into the policy through on-policy self-distillation. Across rounds, the experience bank grows and the retrospective context is refreshed, allowing the model, its data, and its supervision to co-evolve. We further introduce frontier-guided context-policy evolution, where a stronger frontier model proposes constrained edits to how privileged context is constructed. Across ALFWorld, ScienceWorld, and SearchQA with Qwen3-8B and Qwen3-14B, RSD improves performance by up to 59.7% relative to the base model, while frontier-guided context-policy evolution adds up to a further 44.7% relative improvement over a fixed context policy. These results show that naturally accumulated experience can be converted into persistent model capability without ground-truth trajectories or verifier-derived rewards for the core policy update.
Figures & tables
| ALFWorld (SR) | ScienceWorld (SR) | SearchQA (EM) | ||||
|---|---|---|---|---|---|---|
| Method | Qwen3-8B | Qwen3-14B | Qwen3-8B | Qwen3-14B | Qwen3-8B | Qwen3-14B |
| Base | 62.9 | 69.3 | 15.6 | 12.9 | 35.4 | 35.4 |
| RFT | 66.9 | 71.0 | 12.7 | 14.3 | 35.4 | 36.3 |
| GT-SFT | 34.1 | 42.7 | 11.6 | 13.4 | 34.7 | 35.2 |
| STaR | 65.3 | 77.8 | 12.7 | 13.6 | 34.4 | 37.6 |
| BoN-16+SFT | 71.6 | 77.7 | 20.8 | 20.4 | 29.7 | 35.5 |
| Variant | ALFWorld | ScienceWorld |
|---|---|---|
| Full | 76.6 | 23.4 |
| Precedents | 75.0 | 15.1 |
| Lessons | 71.6 | 22.7 |
| Reflection | 71.4 | 21.8 |
| Future | 71.4 | 17.6 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| ALFWorld (SR) | ScienceWorld (SR) | SearchQA (EM) | ||||
|---|---|---|---|---|---|---|
| Method | 8B | 14B | 8B | 14B | 8B | 14B |
| Reflexion@1 | 66.1 | 69.5 | 12.9 | 13.6 | 34.8 | 36.9 |
| Reflexion@2 | 76.0 | 76.7 | 17.8 | 18.5 | 37.1 | 38.1 |
| Reflexion@3 | 80.7 | 79.6 | 20.9 | 24.1 | 41.3 | 43.6 |
| RSD | 76.6 | 79.6 | 23.4 | 20.6 | 37.9 | 38.7 |
| Round Pair | on Disfavored Actions |
|---|---|
| ALFWorld | |
| ALFWorld | |
| ScienceWorld | |
| ScienceWorld |
| Lesson Source | ALFWorld | ScienceWorld |
|---|---|---|
| Successful only | 69.4 | 22.5 |
| Failed only | 72.6 | 22.5 |
| Successful + Failed (default) | 76.6 | 23.4 |
| Method | Probe | SR |
|---|---|---|
| Fixed | – | 23.4 |
| Random | – | 23.2 |
| Frontier (diagnostics) | No | 23.9 |
| Frontier + Probe | Yes | 27.5 |
| Context Edit | Adopted@Peak | Ablation SR |
|---|---|---|
| Precedents | 4/4 | |
| Lessons off | 3/4 | |
| Future off | 1/4 |
| Round | Context Before | Proposed Change | SR | Decision |
|---|---|---|---|---|
| Prec.=0, Lessons=on, Future=on | Prec. | 0.180 | Revert | |
| Prec.=0, Lessons=on, Future=on | Prec. | 0.258 | Keep | |
| Prec.=1, Lessons=on, Future=on | Future | 0.221 | Revert | |
| Prec.=1, Lessons=on, Future=on | No change | 0.216 | Hold | |
| Prec.=1, Lessons=on, Future=on | Prec. | 0.243 | Revert | |
| Prec.=1, Lessons=on, Future=on | No change | 0.227 | Hold |
| Teacher Schedule | R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | Peak | Final |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Frozen | 65.0 | 68.2 | 63.5 | 65.7 | 63.5 | 65.7 | 62.4 | 67.5 | 67.1 | 67.9 | 68.2 | 67.9 |
| Fully evolving | 64.6 | 71.6 | 78.5 | 79.2 | 78.1 | 79.6 | 80.3 | 76.2 | 39.4 | 0.0 | 80.3 | 0.0 |
| Precedent Count | ALFWorld | ScienceWorld |
|---|---|---|
| 75.6 | 24.9 | |
| (default) | 76.6 | 23.4 |
| 78.8 | 20.3 |
| Field | Prompt Content |
|---|---|
| System prompt | You are an embodied agent solving a household task in a text-based simulator (AlfWorld). You receive an Observation describing what you can see and a list of Admissible commands you may execute. On every turn you must reply with exactly two lines: Thought: <one short sentence of reasoning> Action: <one command, copied verbatim from the Admissible list when possible> Plan briefly, then issue the next action. Only the line beginning with ’Action:’ is used to step the environment. Do not add any other text after the Action line. |
| One-shot demonstration | A one-shot demonstration. |
| User turn | Task: {task_goal} Observation: {scene_description} Admissible: cmd1; cmd2; ...; cmd30 (+N more) |
| Assistant turn | Thought: <reasoning> Action: <command> |
| Field | Prompt Content |
|---|---|
| System prompt | You are an embodied agent solving a science task in the ScienceWorld text-based simulator. You receive an Observation describing what you can see and an Inventory listing what you carry. On every turn you must reply with exactly two lines: Thought: <one short sentence of reasoning> Action: <one valid action> Plan briefly, then issue the next action. Only the line beginning with ’Action:’ is used to step the environment. |
| One-shot demonstration | A single generic ReAct trajectory. |
| User turn | Task: {task_description} Observation: {observation} Inventory: {inventory or "(empty)"} |
| Assistant turn | Thought: <reasoning> Action: <valid action> |
| Field | Prompt Content |
|---|---|
| System prompt | You are an expert open-domain question-answering agent. You answer questions by repeatedly issuing wikipedia search queries, reading the returned snippets, and finally producing a concise short answer. Output protocol -- on every turn you must reply with exactly two blocks: <thought>... brief reasoning (1-2 sentences) ...</thought> <action>VERB[PAYLOAD]</action> where VERB[PAYLOAD] is exactly one of: search[your concise wikipedia query, 3-8 words] to fetch top-3 snippets answer[your final short answer] to terminate the episode. Use search[...] until you have enough evidence, then answer[...]. Final answers should be short and direct (a single entity, date, or short phrase). Do not output anything after the </action> tag. |
| One-shot demonstration | A fixed one-shot demonstration. |
| User turn | Question: {question} <information>1) ... 2) ... 3) ...</information> |
| Assistant turn | <thought>...</thought> <action>search[query]</action> or <thought>...</thought> <action>answer[final]</action> |
| Component | Prompt |
|---|---|
| Lessons | Successful and failed attempts at ’{task_type}’ ALFWorld tasks: {demos} In 3 short bullet lessons, give the GENERAL strategy for this task type: the correct sub-goal order, and the common mistakes seen in the FAILED attempts to AVOID. |
| Reflection | You attempted an ALFWorld task. TASK: {goal} YOUR ATTEMPT (step: action -> observation): {ftxt} OUTCOME: {environment outcome} after {N} steps. Using hindsight, identify the SINGLE earliest step whose action was the pivotal mistake, and the better action there. Respond EXACTLY as: STEP: <int> ACTION: <action> |
| Stage | Construction Template |
|---|---|
| Forward context | [GENERAL STRATEGY across tasks] {behavior} [LESSONS for this task type] {lessons summary} [PRECEDENT 1 --- a different, similar task solved successfully] 1) act; 2) act; ... [PRECEDENT 2 --- ...] 1) ... |
| Reflection | [SELF-REFLECTION on your current attempt] {reflection} |
| Future hindsight | [HINDSIGHT --- with knowledge of the future: ...] {future trajectory information} |
| Final privileged note | [PRIVILEGED] [LESSONS for this task type] ... [PRECEDENT 1 ...] ... [PRECEDENT 2 ...] ... [SELF-REFLECTION on your current attempt] ... [HINDSIGHT --- with knowledge of the future: ...] |
| Default injection | The privileged note is appended to the teacher’s initial user turn ( user_end ). Alternative supported positions are system , user_begin , last_user , and trailing . |
| Frontier hypothesis-generation prompt (P1) |
| You are a SCIENTIST tuning the privileged context policy (the ’harness’) for on-policy self-distillation (OPSD). A teacher rescores the student’s OWN rollouts under a note built from precedents + lessons + behavior + future + reflection; the harness config controls that note. GOAL: maximize downstream dev SR (task success) of the next model. PRINCIPLES (general, NOT task-specific): - MORE IS NOT BETTER. Extra/again-predicted context adds tokens+noise without helping; ’remove/simplify’ and turning a component OFF are as valid as ’add’. EVERY whitelisted knob is fair game --- precedent count AND retrieval AND lessons/behavior/future/reflection/selection/etc. Do NOT fixate on precedent count. - You are optimizing PROXY DEV SR measured by a NO-TRAIN harness@inference eval: each candidate’s precedents are injected into the model’s OWN context and we read dev SR. This probe reflects the FORWARD-CONTEXT knobs (precedent count/retrieval) --- it is VALIDATED to track true full-round SR for those. It does NOT move for hindsight/training-mechanism knobs (future/lessons/reflection/teacher_temp/selection): those have no inference analog. You MAY still propose them, but the probe will read flat for them and they will be judged only by the real training round (the retrospective gate), not this probe. - Prefer edits your evidence says raise SR. - Form hypotheses, test them, and revise. ===== ROUND DIAGNOSTICS ===== {digest} ===== EDITABLE KNOBS (whitelist) ===== {whitelist} ===== PROBE EVIDENCE SO FAR THIS ROUND (harness@inference dev SR, no-train) ===== {accumulated evidence, or ‘‘(none yet --- this is the first iteration)’’} Propose {NCAND} DISTINCT candidate edits to TEST now (each changes AT MOST {MAX_EDITS} whitelisted knobs, in-bounds). Cover DIFFERENT knob families (include >=1 subtractive/OFF and >=1 touching a generated component: lessons/behavior/future/reflection). Print EXACTLY {NCAND} lines, nothing else: CAND: <key>=<val>[, <key2>=<val2>]; HYP: <why this should raise dev SR> |
| Frontier candidate-selection prompt (P2) |
| Candidate edits tested this iteration (harness@inference dev SR, no-train; higher is better): {cand1: <edit> -> proxy_dev_SR=...; cand2: ...; ...} CURRENT (unedited) harness under the SAME no-train probe: proxy_dev_SR={CUR_SR} Read the proxy SRs as EVIDENCE of downstream task success. Choose the action: - CHOOSE cand<i> --- if a candidate’s proxy SR is convincingly the best (and beats leaving the harness as-is). - CHOOSE none --- if none convincingly beats the current harness. - REHYPOTHESIZE --- if the evidence suggests a better untested direction; you will get another probe round. Print EXACTLY one line: ‘CHOOSE: cand<i>’ or ‘CHOOSE: none’ or ‘REHYPOTHESIZE’ Then one line: ‘WHY: <cite the proxy-SR evidence>’ |
Self-Evolving Agents
Self-evolving agents improve their skills, memory, tools, policies, or environments by learning from interaction and evaluation feedback.
See all 416 papers