REVERE: Reflective Evolving Research Engineer
Organizations: TCS Research · Yale University
Abstract
Existing prompt-optimization techniques rely on local signals, causing poor generalization across tasks. In addition, they also rely on weak update mechanisms, such as full-prompt rewrites or unstructured merges, which cause knowledge loss and unstable adaptation. These limitations are magnified in research-coding workflows, which involve heterogeneous repositories and weak feedback, limiting abstraction and learning across tasks. We introduce Reflective Evolving Research Engineer (REVERE), a lightweight, self-adapting agent framework that learns from a Global Training Context, distills recurring cross-repository failure modes into reusable heuristics, and applies targeted, code-based edits to agent prompts. REVERE is evaluated across settings ranging from long-horizon to single-shot benchmarks, and improves over prior expert-crafted instructions by 4.50% on SUPER, 1.3% on ResearchCodeBench, and 4.89% on ScienceAgentBench. It does so at nearly 10x lower cost and 2.7x faster adaptation than existing prompt-optimization baselines, demonstrating that self-adapting agents with continual learning and global memory consolidation can meaningfully evolve their capabilities over time.
Figures & tables
| Method | GT | SUPER (%) | RCB (%) | SAB (%) | |||
| Landmarks | Output Match | Overall | Accuracy | SuccessRate | CodeBERTScore | ||
| long-horizon | single shot | interactive - ReAct | |||||
| Baseline | – | 24.70 | 9.30 | 17.00 | 27.80 | 20.90 | 67.50 |
| SOTA † | – | 35.80 | 14.80 | 25.30 | 31.90 | 23.50 | 88.20 |
| Offline Adaptation | |||||||
| GEPA | ✗ | 0.00_{{\color[rgb]{0.6797,0.3867,0.3945}\scriptstyle-35.80}} | 18.60_{{\color[rgb]{0.3867,0.6797,0.4648}\scriptstyle+3.80}} | 9.30_{{\color[rgb]{0.6797,0.3867,0.3945}\scriptstyle-16.00}} | 25.69_{{\color[rgb]{0.6797,0.3867,0.3945}\scriptstyle-6.21}} | 17.42_{{\color[rgb]{0.3867,0.6797,0.4648}\scriptstyle+6.08}} | 77.80_{{\color[rgb]{0.6797,0.3867,0.3945}\scriptstyle-10.94}} |
| Method | SUPER Bench (%) | RCB (%) | SAB (%) | |||
| Landmarks | Output Match | Overall | Accuracy | SuccessRate | CodeBERTScore | |
| long-horizon | single shot | interactive | ||||
| Baseline - Test Tasks | 24.70 | 9.30 | 17.00 | 27.80 | 20.96 | 67.50 |
| Baseline - All Tasks | 19.63 | 10.40 | 15.01 | 43.80 | 20.58 | 66.86 |
| Online Adaptation | ||||||
| ACE - Test Tasks | 26.80 {{\color[rgb]{0.3867,0.6797,0.4648}\scriptstyle+2.10}} | 11.10 {{\color[rgb]{0.3867,0.6797,0.4648}\scriptstyle+1.80}} | 18.95 {{\color[rgb]{0.3867,0.6797,0.4648}\scriptstyle+1.95}} | 15.50 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-12.30}} | 11.30 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-9.66}} | 66.50 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-1.00}} |
| Method | SUPER Bench (%) | RCB(%) | SAB (%) | |||
| Landmarks | Output Match | Overall | Acc. | SuccessRate | CodeBERTScore | |
| long-horizon | single shot | interactive | ||||
| REVERE | 38.10 | 31.40 | 34.70 | 35.40 | 30.60 | 83.3 |
| REVERE w / o Cheatsheet | 30.70 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-7.40}} | 16.70 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-14.70}} | 23.70 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-11.00}} | 30.60 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-4.80}} | 20.90 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-9.70}} | 78.30 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-5.00}} |
| REVERE w / o Auxiliary context | 24.80 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-13.30}} | 24.10 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-7.30}} | 24.40 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-10.30}} | 31.90 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-3.50}} | 25.80 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-4.80}} | 79.80 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-3.50}} |
| REVERE w / o Reflection history | 25.90 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-12.20}} | 9.30 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-22.10}} | 17.60 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-17.10}} | 32.60 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-2.80}} | 22.50 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-8.10}} | 75.90 {{\color[rgb]{0.418,0.4453,0.5}\scriptstyle-7.40}} |
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Tasks | Task Input | Ground Truth | Cost P.T | Resource Limits (Calls / Exec Time) |
| Super-Expert | 45 | Query, GitHub repo, commit | Expert trajectory | $1–3 | 100 iters / 20 min |
| Setting up, and executing tasks from research repositories. | |||||
| ResearchCodeBench | 212 | Paper, masked code, context files | Target code | $0.2 | 1 Call / 10 min |
| Code completion by implementing methodology from the paper. | |||||
| ScienceAgentBench | 102 | Task instruction, dataset path | Gold Python file | $0.3 | 20 iters / 40 min |
| Scientific coding tasks spanning multiple domains for data-driven discovery. | |||||
| Method | GT | SUPER Bench (%) | RCB (%) | ScienceAgentBench (%) | |||
| Landmarks | Output Match | Overall | Accuracy | SuccessRate | CodeBERTScore | ||
| long-horizon | single shot | interactive - ReAct | |||||
| Offline Adaptation | |||||||
| GEPA | ✗ | 0.0_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 0.0}} | 18.6_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 0.85}} | 9.30_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 0.42}} | 25.69_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 0.00}} | 17.42_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 1.35}} | 77.80_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 2.33}} |
| GEPA | ✓ | 1.93_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 2.15}} | 2.60_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 1.0}} | 2.27_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 0.99}} | 10.44_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 3.12}} | 17.09_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 2.70}} | 78.53_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 1.84}} |
| ACE | ✗ | 19.53_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 10.01}} | 18.51_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 3.62}} | 19.02_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 3.2}} | 21.99_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 3.28}} | 8.60_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 7.27}} | 53.48_{{\color[rgb]{0.418,0.4453,0.5}\scriptstyle\pm 8.08}} |
| Method | Levenshtein Retention | Git Retention | Semantic Similarity |
| GEPA – full prompt rewrite | 0.11 | 0.03 | 0.62 |
| ACE – incremental delta updates | 0.86 | 0.92 | 0.99 |
| REVERE – targeted edits | 0.84 | 0.89 | 0.94 |
| Method | split | join | replace | append | extend | insert | += | strip | startswith | endswith | find | index | count |
| REVERE (full) | 63.1 | 62.7 | 7.5 | 6.0 | 0.0 | 45.9 | 14.2 | 29.9 | 18.7 | 0.7 | 6.7 | 3.4 | 0.0 |
| w/o GTC | 75.7 | 73.5 | 4.3 | 14.3 | 2.6 | 53.5 | 11.7 | 24.8 | 12.6 | 0.9 | 3.0 | 9.6 | 0.0 |
| w/o Auxiliary context | 59.9 | 58.3 | 11.5 | 12.0 | 0.5 | 34.4 | 11.5 | 32.8 | 14.1 | 4.2 | 1.6 | 3.6 | 0.5 |
| w/o Reflection history | 65.9 | 65.5 | 3.7 | 6.4 | 0.4 | 51.3 | 16.5 | 33.0 | 19.9 | 0.7 | 4.1 | 4.5 | 0.0 |
| Row | Task Model | Reflector | Same/Cross | Test Subset (27) | Full Set (45) |
| 1 | GPT-5.4 | (unadapted) | – | 48.40 | 47.56 |
| 2 | GPT-5.4-mini | (unadapted) | – | 41.99 | 43.27 |
| 3 | Gemini-3-Flash | (unadapted) | – | 38.07 | 37.09 |
| 4 | GPT-5.4-mini | GPT-5.4-mini | Same | 33.66 | 39.12 |
| 5 | GPT-5.4-mini | GPT-5.4 | Cross | 51.48 | 48.85 |
| 6 | GPT-5.4-mini | GPT-5.2 | Cross | 50.00 | 47.07 |
| Category | Description | Found Solution |
| Dependencies | Build/install failures or missing libraries for training/fine-tuning. | • Use pip install --only-binary=:all: ... • Pin numpy / sklearn / Cython to highest available wheel |
| Environment | Environment/version mismatches causing runtime errors. | • Enumerate/validate environment variables and dependency availability • Debug versions/signatures: inspect.signature(func) • Reconfigure environment: if no gpu available configure cuda() to cpu |
| Configuration | Wrong CLI args/configs or missing scripts. | • Verify argument names: train_file , validation_file , data_dir • Enumerate run_*.sh candidates and match closest |
| Data - Acquisition | Missing datasets or incorrect asset content. | • Inspect README/scripts; attempt wget / gdown / curl • Inspect content directly using head , cat , less , file |
| Data - Preprocessing | Incompatible dataset schema/fields or container formats. | • Write wrapper to rename or transform fields • Decompress .csv ; check for embedded .jsonl / .tsv |
| Execution Issues | Scripts produce no metrics or import errors. | • Check output directory and config paths • Fix hardcoded outputs • Patch imports/ sys.path ; test package and script entrypoints |
| Adaptation | Start Prompt | Full Set (45 Tasks) | Test Set (27 Tasks) | ||||
| Output Match | Landmarks | Overall | Output Match | Landmarks | Overall | ||
| Unadapted | Baseline | 42.60 | 52.50 | 47.60 | 40.70 | 56.00 | 48.40 |
| Unadapted | Counter-instructed | 35.10 | 44.70 | 39.90 | 34.40 | 45.20 | 39.80 |
| REVERE | Baseline | 46.90 | 71.70 | 59.30 | 46.80 | 67.00 | 56.90 |
| REVERE | Counter-instructed | 43.70 | 68.30 | 56.00 | 41.20 | 69.60 | 55.40 |
| Metric | Static SOTA | REVERE |
| Avg. CBS on passing programs only | 84.2 | 77.0 |
| Programs that fail to run (of 102) | 19 | 9 |
LLM Agent Self-Improvement
Large language model agent self-improvement studies how agents use experience and feedback to improve their behavior, tools, and workflows.
See all 273 papers