Meta Context Engineering via Agentic Skill Evolution — part 3/4

Cleaned-text code points [31847, 47660). Bibliography omitted here; source.md includes it.

Obs.❼ MCE contexts transfer better from strong to weak models. A practical desideratum for CE systems is the ability to transfer learned contexts from strong models to weaker ones, enabling a form of knowledge distillation. As shown in Table 2 , when transferring DeepSeek-V3.1-trained contexts to smaller models, MCE consistently exhibits lower performance degradation than ACE. In contrast, ACE’s transferred contexts occasionally degrade performance below the base model (e.g., LawBench F1 decreases from 0.24 to 0.19 on Llama3.3-70B). We attribute MCE’s superior transferability to: (1) context efficiency —smaller LLMs struggle with long-context processing, and MCE’s compact contexts mitigate this; and (2) generalizability —MCE’s fully agentic, batch-level optimization produces well-structured contexts less dependent on the training model, whereas ACE’s rollout-specific curation may overfit to the error patterns of the training model.

#### 4.2.3 Training Efficiency

We investigate the training efficiency of MCE on the FiNER benchmark ( Fig. 4 ).

Obs.❽ MCE significantly reduces training duration. On FiNER, MCE completes 5 training epochs in 1.9 hours versus 25.8 hours for ACE, which is a 13.6 × 13.6\times speedup. This speedup stems from MCE’s batch-level optimization: depending on the skill, the base agent either directly analyzes training data to curate context (reading incorrect predictions, identifying patterns, and updating files without heavy LLM scaffolding) or writes code to parallelize reflection and curation across training rollouts. This contrasts with ACE’s instance-by-instance optimization.

Obs.❾ MCE is rollout-efficient. The same architectural properties that improve context quality (global context view and batch-level optimization) also accelerate convergence. On FiNER, MCE requires only 450 rollouts to reach 95% training accuracy, while ACE peaks at 94% after 2169 rollouts ( 4.8 × 4.8\times fewer).

### 4.3 Ablation Studies

Method Offline Online Base Model (zero-shot) 58.0 ACE 71.0 (+13.0) 64.0 (+6.0) MCE (w/o skills) 73.0 (+15.0) 67.0 (+9.0) MCE (w/ a fixed skill) 71.0 (+13.0) 68.0 (+10.0) MCE (full, w/ evolving skills) 75.0 (+17.0) -

Checkpoint DeepSeek V3.1 MiniMax M2.1 # Tokens Acc (%) # Tokens Acc (%) Epoch 1 12K 71 38K 69 Epoch 2 23K 69 90K 69 Final 79K 70 114K 67

##### Ablating the Bi-level Design ( Table 3 ).

We conduct ablation studies on FiNER to validate MCE’s bi-level design. We compare three variants: (1) w/o skills : the base-agent operates without any skill guidance; (2) w/ a fixed skill : the base-agent follows a single skill generated by the meta-agent from task specifications alone, without iterative evolution; and (3) full : the complete MCE with evolving skills. Note that the full version is inapplicable to the online setting, as single-pass processing precludes iterative skill evolution.

The results reveal three findings. First, meta-level skill evolution provides a clear boost: full MCE achieves 75% versus 73% for the skill-less variant in the offline setting. Second, even without skill guidance, the base-agent alone outperforms ACE (73% vs. 71% offline, 67% vs. 64% online), indicating that fully agentic CE can be effective without manual scaffolding. Third, fixed skills exhibit high variance across tasks (see also Table 1 ), as their quality depends on task specification alone without learning from validation performance.

##### Ruling Out Model Confounds ( Table 4 ).

MCE uses MiniMax M2.1 as the agentic model, raising the question of whether performance gains stem from superior model capabilities rather than MCE’s methodology. To address this, we replace the reflector and curator in ACE with MiniMax M2.1 and compare against the default DeepSeek V3.1.

The results show that MiniMax M2.1 degrades ACE’s performance. Despite generating more verbose playbooks (114K vs. 79K tokens at completion), MiniMax M2.1 achieves lower final accuracy (67% vs. 70%). Training also terminates earlier (epoch 3, step 73) as the playbook exceeds the context window. This rules out knowledge transfer from the agentic model as the source of MCE’s gains. We conclude that MCE’s advantages stem from its methodological design, though these advantages require an agentic model capable of interacting with the programming environment, and producing valid files and code.

## 5 Conclusion and Discussion

This work presents Meta Context Engineering (MCE), a bi-level optimization framework that advances beyond static context representations and optimization procedures in prior CE methods. MCE introduces learnable CE skills, represents context as files and code, employs fully-agentic bi-level optimization, orchestrates dual agents under an evolutionary framework, and co-evolves CE skills and context artifacts. Our experiments across five domains demonstrate MCE’s consistent superiority. MCE achieves 5.6–53.8% relative improvement over SOTA methods, with a mean gain of 16.9%. Additionally, MCE exhibits superior context adaptability, efficiency, and transferability, as well as substantial training speedups. These results validate that treating CE as a learnable agentic capability, rather than a fixed workflow with predefined schemas, unlocks a generic design space for optimizing agentic AI systems.

Limitations. MCE is particularly advantageous for tasks centered on domain knowledge acquisition and pattern matching, as its learnable skills effectively capture data characteristics and organize domain-specific structures. However, MCE may not offer advantages on reasoning-intensive tasks, as existing manually crafted agentic harnesses (characterized by iterative trials, error correction, and systematic reflection) are already well-suited for such problems. Second, MCE may struggle in scenarios where rollouts involve very long and complex trajectories. Such settings demand fine-grained credit assignment and detailed trajectory analysis, which batch-level fully agentic CE may fail to perform effectively. We note that this limitation stems from the capabilities of the underlying agent model rather than the MCE framework itself; as agentic models continue to improve, this constraint is expected to diminish. We expect MCE to scale better with the advancement of agentic models.

Future Work. We identify three meaningful directions for future research. First, the agentic skill evolution paradigm extends beyond CE. Prior evolutionary approaches target specific solutions, heuristic code, or search algorithms; MCE instead evolves skills, a higher-order and integrated abstraction essential for general AI. While static skills are well-recognized [ Anthropic, 2025b , Muratcan Koylan, 2025 ] , MCE is among the first to dynamically evolve them, bridging manual skill engineering and autonomous self-improvement. The paradigm of evolutionary skills could generalize to other agentic capabilities and task domains. Second, our generator currently uses one-shot inference for consistency with CE baselines. Since MCE stores context as files, an agentic generator that interacts directly with these artifacts could be more effective. Extending MCE to co-evolve context utilization skills alongside context learning skills is a promising direction. Third, progressive disclosure is native to agent skills: agents load skill details into context only when relevant. This enables MCE to compose and scale skills across domains with minimal overhead. Investigating skill transfer across tasks and emergent behaviors from skill composition are interesting open questions.

Taken together, MCE reformulates CE as a learnable agentic capability, unlocking a generic design space for optimizing general AI. We envision agents that not only execute tasks but continuously refine their learning algorithms and memory architectures , enabling open-ended evolution.

## Appendix A Experimental Details

This section provides experimental details for the benchmarks. We also present task specifications for our bi-level agents and generator prompt templates used across all methods.

### A.1 FiNER

We utilize the FiNER dataset from the ACE official repository 2 2 2 https://github.com/ace-agent/ace/tree/main/finance/data . To create a challenging evaluation benchmark within our computational budget, we randomly sample a subset focusing on financial tags related to debt instruments, credit facilities, and loan-related financial reporting, with train/validation/test splits of 200/100/100 instances. Each instance is formulated as a named entity recognition task where the model must predict the appropriate financial tag for a given entity within its sentence context. Specifically, each query follows the format: “What is the best tag for entity ‘<value>’ in sentence: ‘<sentence>’?”, where the ground truth is the corresponding tag name.

The subset encompasses 12 debt and credit-related financial tags from the XBRL taxonomy:

1. DebtInstrumentInterestRateStatedPercentage

2. DebtInstrumentFaceAmount

3. LineOfCreditFacilityMaximumBorrowingCapacity

4. DebtInstrumentBasisSpreadOnVariableRate1

5. DebtInstrumentCarryingAmount

6. DebtInstrumentRedemptionPricePercentage

7. LongTermDebtFairValue

8. LongTermDebt

9. LettersOfCreditOutstandingAmount

10. LineOfCredit

11. LineOfCreditFacilityCurrentBorrowingCapacity

12. DebtInstrumentUnamortizedDiscount

### A.2 USPTO-50k

We utilize the USPTO-50k dataset [ Schneider et al., 2016 ] , a widely-used benchmark for single-step retrosynthesis prediction in computational chemistry. Given a target product molecule represented in SMILES notation, the task requires predicting the precursor reactants needed to synthesize it. This task evaluates the model’s understanding of organic reaction mechanisms and chemical transformation patterns.

We follow Cai et al. [2025b] in data preprocessing. We randomly sample 50 instances from the original training split for training, 30 instances from the training split for validation, and 100 instances from the test split for evaluation. Stratified sampling is used to uniformly cover all 10 reaction types, ensuring balanced representation across different chemical transformation classes.

### A.3 Symptom2Disease

We utilize the Symptom2Disease dataset from Hugging Face 3 3 3 https://huggingface.co/datasets/gretelai/symptom_to_diagnosis . Each instance consists of a natural language description of patient symptoms, and the task is to predict the correct medical diagnosis from 22 possible disease categories.

We preserve the original test split (212 samples) and perform stratified sampling on the original training split to create train/validation splits of 200/50 instances, maintaining balanced representation across disease categories. The disease categories include: diabetes, dengue, chicken pox, allergy, impetigo, arthritis, gastroesophageal reflux disease, typhoid, cervical spondylosis, hypertension, malaria, pneumonia, psoriasis, peptic ulcer disease, drug reaction, bronchial asthma, urinary tract infection, common cold, varicose veins, fungal infection, jaundice, and migraine.

### A.4 LawBench

We utilize the criminal charge prediction task from LawBench 4 4 4 https://github.com/open-compass/LawBench , a comprehensive Chinese legal benchmark. Given case facts including prosecution descriptions, evidence summaries, and procedural information, the model must predict the applicable criminal charges. This task is challenging because (1) cases may involve multiple concurrent charges requiring comprehensive legal analysis, and (2) distinguishing between similar charges (e.g., theft vs. robbery, fraud vs. contract fraud) requires nuanced understanding of Chinese criminal law.

We randomly sample 200/50/100 instances for train/validation/test splits from the original dataset. Each instance follows the format: the model receives case facts and must output charges in the format “[ 罪名]charge1;charge2<eoa>”. Evaluation uses micro-F1 score to account for partial credit on multi-charge cases, following the original benchmark.

### A.5 Aegis2

We utilize the AEGIS2 dataset [ Ghosh et al., 2025 ] , a comprehensive AI safety dataset designed for training lightweight guardrail models. Each instance contains a user prompt with its corresponding safety label (safe/unsafe) and violated risk categories. The task is binary classification of user prompts, with unsafe as the positive class and F1 score as the evaluation metric.

To identify challenging categories, we evaluate LLaMA-3-SafeGuard [ Llama Team, 2024 ] across all 24 risk subcategories using the system prompts specified in the original paper. Based on per-category F1 scores, we selecte the four worst-performing categories: Copyright_Trademark_Plagiarism, Political_Misinformation_Conspiracy, Unauthorized_Advice, and Immoral_Unethical.

For data splits, we include all 70 unsafe samples from the four selected categories in the test set, balanced with 70 randomly sampled safe instances (140 total). The validation set contains 64 unsafe samples from the original validation split and 64 safe instances (128 total). For training, we sample 75 instances from each of the four unsafe categories (300 total) and 100 safe instances, yielding 400 training samples.

## Appendix B Prompts

## Appendix C Learned Skills

To give an example of the learned skills, we present the best learned skill for the FiNER benchmark below. To avoid an overly lengthy appendix, the complete collection of learned skills is available in the assets of our repository.

The learned skill provides an 8-phase systematic approach to context refinement. It organizes context into three files: reasoning-chains.md, semantic-principles.md, and tag-reference.md. Notably, it orchestrates a workflow of three LLM calls to transform prediction errors into generalizable reasoning principles (see ## Implementation Guidance section): 1) using LLM for error analysis, 2) using LLM to generalize specific rules, and 3) using LLM to create reasoning chains.

## Appendix D Case Studies and Analysis

This section analyzes MCE’s performance compared to baselines across tasks, examines the skill evolution process, and overviews the optimal skills and context learned by MCE.

### D.1 FiNER

#### D.1.1 Task Characteristics and Baseline Limitations

FiNER presents a unique challenge that demands deep reflection, pattern abstraction, and exceptional domain expertise with acute sensitivity to nuanced rules. Its bottleneck lies in mastering high-density long-tail rules and leveraging extensive knowledge repositories. The critical factors for success are rule coverage and disambiguation logic.

Imitating the training examples alone is not enough; deep reflection and pattern abstraction beyond the training instances are required. Therefore, for this task, ICL, MIPROv2, and GEPA struggle to perform well. ICL and MIPROv2 rely on learning from training set demos, while GEPA fails because it compresses nuances into overly concise prompts. ACE excels because it leverages repetitive reflections to accumulate extensive knowledge and patterns in the playbook.

Unlike ACE’s monolithic playbook accumulation approach, MCE develops structured, hierarchical context files guided by evolving skills that progressively shift from generic methodologies to error-driven generalization.

#### D.1.2 Skill Evolution

The initial skill focuses on a systematic, phase-based approach for context curation:

After several iterations of meta-agent refinement based on validation performance feedback, the optimal skill shifts its core philosophy from pattern extraction to error-driven generalization :

The optimal skill introduces explicit anti-patterns , documenting what causes errors rather than just what the correct answers are:

#### D.1.3 Context Evolution