Cross-Model Experience Inheritance for Recursive Self-Improvement in AI Agents
Recursive self-improvement (RSI) in agent systems usually optimizes the runtime shell around a foundation model rather than editing the model’s weights. This article explains why simply copying prompts, tool sequences, and rules from one model to another often fails: the result layer transfers easily, but the reasons and conditions behind it are lost. It presents self-improvement memory (SIM) as a structured, auditable decision asset that records task signatures, model profiles, decisions, rationales, failure cases, constraints, validation evidence, and transfer policies. It then outlines a practical cross-model inheritance loop—abstract, retrieve, adapt, validate, and consolidate—and discusses memory layering, governance, contamination controls, and pragmatic starting points for developers.
Cross-Model Experience Inheritance for Recursive Self-Improvement in AI Agents
1. Starting Point: RSI Optimizes the Runtime Shell, Not the Base Weights
Discussions around recursive self-improvement (RSI) are moving from concept toward engineering practice. A key boundary needs to be clarified first: in agent scenarios, RSI usually does not directly modify the hundreds of billions of parameters in a large model. Instead, it continuously optimizes the runtime shell around the model, including prompt organization, tool-calling strategies, task decomposition, guardrail rules, retry logic, result validation, and orchestration flows. The base model provides general reasoning and generation capabilities, while the runtime shell determines how those capabilities are organized into an executable, evaluable, and deliverable task loop.
In the past, teams could repeatedly experiment on a fixed model: adjusting prompts, adding tool descriptions, increasing failure retries, and correcting guardrail conditions to gradually refine the runtime shell to a high level. This process is essentially the accumulation of “experience”—which strategies work under which tasks, input distributions, and constraints; which practices trigger errors; and which rules are merely compensations for the shortcomings of an older model.
Once the base model changes, however, the problem becomes visible: the old shell may quickly fail. More counterintuitively, public technical discussions have described a phenomenon in which a runtime shell deeply evolved and highly performant on one model, when directly transferred to another model, scores even lower than the new model’s native initial shell. The reason is not mysterious: when code, prompts, and rules are migrated, only the “results” are often preserved, while the “reasons” are lost.
2. Root Cause of Migration Failure: Results Can Be Copied, Reasons Cannot
A rule in a runtime shell usually contains three layers of information:
- Result layer: the final prompt, tool order, guardrail conditions, retry count, output format, and so on.
- Reason layer: why it was designed this way—to avoid a certain type of hallucination in the old model, compensate for a certain tool-understanding bias, or adapt to a specific context window and latency constraint.
- Condition layer: under which task types, input distributions, data quality levels, tool versions, and evaluation criteria the experience holds.
During direct migration, the result layer is the easiest to copy, while the reason layer and condition layer are often lost. The new model may already have capabilities that the old model lacked, and it may also have different boundaries in other capabilities. Complex rules in the old shell that were set to compensate for the old model’s weaknesses may become over-constraints on the new model; a tool-calling order that was effective in the old model may disrupt the new model’s native planning ability; and guardrail rules used for correction in the old model may wrongly penalize more reasonable outputs from the new model.
Therefore, cross-model experience inheritance cannot be equated with “copying old prompts over.” It should be understood as “injecting transferable decision knowledge into the new runtime shell after abstraction, retrieval, adaptation, and validation.” This is exactly the problem that self-improvement memory (SIM) aims to solve.
3. Core of SIM: Turning Logs into Transferable Decision Assets
SIM should not be merely conversation logs or final code snapshots. Truly valuable self-improvement memory should record the complete chain of “decision—reason—condition—validation,” so that experience can be retrieved, explained, transferred, and audited.
A practical memory entry should contain at least:
- Task signature: task type, input features, output constraints, and evaluation metrics, used to determine whether the experience applies.
- Model profile: the model capability assumptions at the time the experience was formed, such as long-context stability, tool-selection preference, and format-following tendency, without binding to a specific brand or model version.
- Decision content: which prompt structure, tool strategy, retry logic, or guardrail rule was adopted.
- Reason explanation: why the strategy was adopted and which failure mode it addressed.
- Failure counterexamples: under which inputs the strategy is ineffective, preventing the experience from being over-generalized.
- Applicable and prohibited conditions: the boundaries within which the experience is valid.
- Validation evidence: offline evaluation, shadow runs, small-traffic control results, or human review results.
- Transfer policy: which parts can be reused across models and which parts need recalibration.
An illustrative pseudocode example is as follows:
memory_record = {"task_signature": "structured extraction + multi-tool validation","model_profile": "stable over long context; tool selection needs explicit constraints","decision": "extract candidates first, then call validation tools, finally format uniformly","reason": "reduce candidate omissions caused by early format constraints","failure_modes": ["do not retry more than twice when a tool returns an empty result"],"constraints": "applies to tasks with clear fields that allow secondary validation","validation": "offline set improvement; no rollback in shadow runs","transfer_policy": "strategy reusable; retry threshold must be reevaluated for the new model"}
Such a memory entry is not a “diary” but a computable engineering asset. It allows subsequent models to inherit not a rigid piece of code, but a set of experience with explanations and boundaries.
4. Engineering Flow for Cross-Model Experience Inheritance
Cross-model inheritance should follow a closed loop of “abstract—retrieve—adapt—validate—consolidate.”
Step 1: Abstract. Split rules in the old shell into task strategies, model-compensation strategies, and general constraints. Task strategies are usually transferable; model-compensation strategies must be reevaluated; general constraints such as safety guardrails, output formats, and permission boundaries can be retained but need review.
Step 2: Retrieve. Based on the new task signature and model profile, retrieve relevant experience from the memory store instead of stuffing all historical experience into the context. Retrieval results should include reasons, counterexamples, and applicable conditions, avoiding the injection of conclusions alone.
Step 3: Adapt. Run small-scale probe evaluations on the new model to identify differences between its capability boundaries and those of the old model. For areas with clear differences, generate candidate adaptation strategies rather than directly overriding the native shell.
Step 4: Validate. Candidate experience first enters shadow runs or small-traffic control tests, observing success rate, stability, latency, cost, and safety metrics. Key rules should have human review and rollback points.
Step 5: Consolidate. Validated experience is written back to the memory store, with version, evidence, and invalidation conditions recorded. Experience that fails validation should also be retained as negative samples to prevent repeated mistakes later.
5. Memory Layering and Governance: Preventing “Experience Contamination”
One of the biggest risks in cross-model inheritance is spreading incorrect experience as general knowledge. Therefore, SIM needs layered governance:
- Fact layer: task definitions, tool contracts, and input/output constraints, requiring high confidence and strong review.
- Strategy layer: prompt organization, tool order, retry and validation strategies, allowing experimentation but requiring validation gates.
- Counterexample layer: failure cases, misuse conditions, and rollback records, used to constrain over-generalization.
- Meta-memory layer: records memory source, version, applicable model profile, and expiration time.
At the same time, memory contamination protection should be established: deduplicate, attribute, and confidence-score new experience before it enters the store; enforce applicability checks during cross-model transfer; set human approval for high-risk rules; and periodically compress outdated experience to avoid retrieval noise caused by memory-store expansion. If such a loop is built on Baidu AI Cloud, general-purpose container platforms can host executors, object storage can save memory snapshots, and logging and monitoring can form the observability chain; the specific selection should be based on the team’s current stack and compliance requirements.
6. Practical Recommendations and Boundaries
For developers, the value of SIM lies in reducing the cold-start cost of new models, cutting repeated trial and error, and making the evolution of the runtime shell auditable and rollback-capable. It is advisable to start with three types of tasks: high-frequency repetitive tasks, tasks with clear failure modes, and tasks with quantifiable evaluation metrics. Do not pursue full memory from the beginning; instead, build a small-scale, high-confidence experience store first.
It should be emphasized that cross-model experience inheritance is not “directly copying past-life memory,” but “reason-aware transfer.” The engineering boundary of RSI remains runtime shell optimization; it cannot replace model capability evaluation, data governance, or security governance. Only by making memory structured, validation gated, and governance routine can AI self-improvement move from incidental trial and error toward a sustainable engineering loop.
