Recursa: Toward Recursively Self-Improving Foundation Model Systems

Erkang Zhu, Yin Lin, Xiaorong Shi, Xuanrui Lin, Jingren ZhouarXiv 2026 · arXiv

TL;DR

Recursa is a foundation model system designed to adapt to new, data-scarce domains by recursively learning from its own experience. By refining a decoupled "knowledge repository" of skills and instructions through a multi-agent hierarchy, it significantly improves performance on complex, long-horizon tasks without requiring human experts or stronger teacher models.

What Problem Does This Paper Address?

Foundation models often struggle when deployed in specialized environments like law or finance, where they encounter unfamiliar terminology and complex procedural requirements. Traditional domain adaptation—like fine-tuning or reinforcement learning—typically requires massive amounts of expert-labeled data and clear reward signals, both of which are rare in new domains.

The authors identify two primary hurdles:

  1. The Knowledge Gap: The system lacks specific facts, terminology, or awareness of where domain materials are located.
  2. The Behavior Gap: The system has the information but applies it incorrectly (e.g., finding the right document but selecting the wrong clause).

Current methods often focus on just one of these gaps or rely on a "teacher" model (like GPT-4) to guide a smaller "student." Recursa aims for true self-improvement, where the system’s own model modifies the system to close both gaps.

Methods

Recursa separates the "brain" (the foundation model) from the "knowledge" (a repository of instructions, skills, and memory). This allows the system to update its domain expertise without the expensive process of retraining model weights.

The Harness

To turn a model into an effective agent, Recursa uses a specialized harness. Instead of simple text-based tool calls, it uses a persistent Python REPL. This allows the agent to compose complex logic (loops, conditionals) and keep intermediate data in memory rather than cluttering the model's limited context window. It also features an append-only event log for programmatic context management, allowing agents to retrieve past interactions only when needed.

Figure 1. Recursa’s harness. The model writes Python code, the REPL executes it, and its output returns to the context. The context is appended to the event log, which the REPL queries. Recursa learns the knowledge repository (orange) in this paper; the harness and the foundation models stay fixed.

The Learning Process

Adaptation happens in two phases:

  1. Bootstrapping: The system explores the domain corpus to build "navigation structures" and practices on self-generated tasks to close the initial knowledge gap.
  2. Recursive Self-Improvement: This is the core innovation. Recursa uses a multi-agent hierarchy where a "Parent Learner" splits training tasks among "Child Learners." These learners run parallel "Solvers" to attempt tasks, diagnose failures, edit the knowledge repository, and validate that the new skills actually fix errors without causing regressions.
Figure 3. Recursive self-improvement in Recursa. Left: a learner splits its training tasks D into subsets and issues a learning task (Di, K) to a child learner on each; children return revised components and learning traces (Ki, Ti), which the parent merges and reflects on before issuing new learning tasks. Right: each leaf learner refines the components in a loop with parallel solvers.

Datasets

The system was evaluated on Harvey LAB’s Firm Knowledge benchmark, a challenging legal research dataset. It simulates a synthetic law firm with nearly 10,000 files and 108 million tokens. Tasks require searching across the corpus, reasoning over evidence in multiple documents, and producing long-form answers that meet specific rubric criteria. The authors notably revised 46 of the benchmark's criteria where the original rubrics conflicted with the source documents.

Key Insights and Ideas

  • Efficiency vs. Accuracy: The authors found that bootstrapping primarily makes the agent more efficient—reducing interaction turns and token usage by about 20-25%—but doesn't significantly boost accuracy on its own. The heavy lifting for accuracy comes from the recursive self-improvement loop.
  • Reducing "Learning Waste": A major challenge in self-improvement is "waste"—time spent waiting for results (stalls) or repeating redundant work (rework). Recursa’s multi-agent orchestration addresses this by splitting tasks so that different agents exercise different skills, minimizing merge conflicts and redundant diagnoses.
  • Learning "Domain Judgment": Through self-improvement, the agents learned to look past literal keyword matches. For example, in legal tasks, the system learned to search for "Exclusivity" or "No Solicitation" when asked for a "no-shop" clause, judging candidates by their substance rather than just their headings.

Key Results

Recursa demonstrated substantial gains across different base models on the Harvey LAB test set:

  • DeepSeek-V4.1-Flash: The all-pass rate (completing all parts of a task correctly) jumped from 30.0% to 55.0%.
  • Qwen3.8-Flash: The all-pass rate increased from 35.0% to 46.0%.
  • Multi-agent Superiority: The multi-learner approach significantly outperformed a single-learner baseline. For DeepSeek, the multi-learner reached 55% on the test set, while the single learner only reached 43%.

Limitations and Future Work

While Recursa shows a path toward autonomous domain adaptation, it has several limitations:

  • Corpus Dependency: Its performance is strictly tied to the quality and availability of the domain-specific materials it bootstraps from.
  • Compute Intensity: The recursive loop of solving, diagnosing, and validating requires significant computational resources for LLM inference.
  • Fixed Components: In this study, the foundation model weights and the harness itself remained fixed. The authors identify extending recursive self-improvement to the model weights and the harness design as critical next steps.
  • Domain Scope: The current results are focused on the legal domain; future work is needed to see how well these recursive strategies generalize to finance, engineering, or the hard sciences.

Summary updated

Abstract

Foundation models in changing environments can encounter unfamiliar domain knowledge that their original training did not cover. However, new domains rarely provide large amounts of expert-created training data or reliable supervisory signals for further training. We introduce Recursa, a foundation model system that adapts to new domains by learning from its own experience without human experts or a stronger teacher model. Recursa uses a knowledge repository to store what it learns: domain-specific skills and instructions on when to apply them, along with memories of past task experiences and reflections on what to improve. Recursa bootstraps the repository from domain materials and then refines it through recursive self-improvement. It uses parallel learners to execute tasks and synthesize local improvements, then validates and merges the improvements into the knowledge repository. On Harvey LAB's Firm Knowledge benchmark, Recursa raises the all-pass rate on held-out test tasks from 30.0% to 55.0% with DeepSeek-V4.1-Flash and from 35.0% to 46.0% with Qwen3.8-Flash.
BibTeX
@misc{zhu2026recursa,
  author = {Erkang Zhu and Yin Lin and Xiaorong Shi and Xuanrui Lin and Jingren Zhou},
  title = {{Recursa: Toward Recursively Self-Improving Foundation Model Systems}},
  year = {2026},
  eprint = {2611.04035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.04035},
}
Figure