Source-linked AI summary
Meta Context Engineering via Agentic Skill Evolution
Haoran Ye, Xuning He, Vincent Arak, Haonan Dong, Guojie Song
TL;DR
Current context-engineering methods depend on manually crafted harnesses that impose structural biases. MCE co-evolves context-engineering skills and context artifacts through bi-level optimization. Across evaluations, it reports 5.6–53.8% relative improvement over state-of-the-art CE methods (mean of 16.9%).
Problem
Current context-engineering methods rely on manually crafted harnesses that impose structural biases on context representation and optimization.
Source: §1 · p. 2Method
MCE uses bi-level optimization to co-evolve executable context-engineering skills and context artifacts, with a meta-level agent refining skills and a base-level agent executing them.
Source: §1 · p. 2, §3.1 · p. 5Results
5.6–53.8% relative improvement over state-of-the-art CE methods (mean of 16.9%) was reported, alongside superior context adaptability, transferability, and context-use and training efficiency.
Source: §1 · p. 3Takeaways & Limitations
Across five domains, the authors conclude that MCE advances beyond static context representations and optimization procedures used by prior methods.
Source: §5 · p. 10MCE may not offer advantages on reasoning-intensive tasks, where manually crafted agentic harnesses are already well-suited.
Source: §5 · p. 10
Abstract
from arXiv · showhide
The operational efficacy of large language models relies heavily on their inference-time context. This has established Context Engineering (CE) as a formal discipline for optimizing these inputs. Current CE methods rely on manually crafted harnesses, such as rigid generation-reflection workflows and predefined context schemas. They impose structural biases and restrict context optimization to a narrow, intuition-bound design space. To address this, we introduce Meta Context Engineering (MCE), a bi-level framework that supersedes static CE heuristics by co-evolving CE skills and context artifacts. In MCE iterations, a meta-level agent refines engineering skills via agentic crossover, a deliberative search over the history of skills, their executions, and evaluations. A base-level agent executes these skills, learns from training rollouts, and optimizes context as flexible files and code. We evaluate MCE across five disparate domains under offline and online settings. MCE demonstrates consistent performance gains, achieving 5.6--53.8% relative improvement over state-of-the-art agentic CE methods (mean of 16.9%), while maintaining superior context adaptability, transferability, and efficiency in both context usage and training.
1 Introduction
The introduction argues that manually designed Context Engineering (CE) harnesses constrain context optimization, and presents Meta Context Engineering (MCE) as a framework that co-evolves CE skills and context artifacts. Across five domains, four LLMs, and offline and online settings, MCE improves over state-of-the-art CE methods while offering greater adaptability and efficiency.
1 Introduction
- CE optimizes inference-time context to improve downstream utility and enable continuous self-improvement, with interpretability, deployment efficiency, modularity, and robustness advantages over parameter optimization.The introduction describes CE’s applications across vertical-domain tasks, long-horizon tasks, multi-agent coordination, and experience-driven self-evolution.Source: §1 · p. 2
- Manually crafted CE harnesses impose structural biases: context representations trade off detail, generalization, expressiveness, and latency, while brevity- and verbosity-oriented optimization can respectively omit strategies or create noisy, bloated context.These heuristic choices restrict CE to a narrow design subspace and can preclude task-optimal strategies beyond human intuition.Source: §1 · p. 2
- MCE co-evolves CE skills and context artifacts through agentic crossover, which synthesizes skills from task specifications, historical trajectories, and performance metrics.A base-level agent executes evolved skills on training rollouts and uses coding tools and file access to create flexible, programmatic context artifacts; this generic design space can reconstruct ACE’s pipeline [Zhang et al., 2026] or discover alternatives.Source: §1 · p. 2
- 89.1% and 74.1% average relative improvement over DeepSeek-V3.1 offline and online, respectively, exceeded prior SOTA by 18.4% and 33.0%, respectively.MCE adjusts context length from 1.5K to 86K tokens, achieves better performance with fewer context tokens, and has 4–7% lower degradation when transferring contexts from strong to weak models. It trains 13.6× faster and uses 4.8× fewer rollouts than ACE to achieve higher training accuracy.Source: §1 · p. 2
- 5.6–53.8% relative improvement over state-of-the-art CE methods (mean 16.9%) was achieved by MCE across five domains, four LLMs, and offline and online settings.The evaluations cover finance, chemistry, medicine, law, and AI safety.Source: §1 · pp. 2–3
2 Background and Related Work
The background argues that existing context-engineering harnesses constrain how contexts are represented and optimized, motivating MCE’s agentic co-evolution of skills and context artifacts. It positions agent skills as a new abstraction for LLM-driven evolutionary optimization.
2.1 Agentic Context Engineering
- Current context-engineering methods use manually designed exploration–reflection harnesses and predefined schemas, limiting context adaptation.These approaches are motivated by the need for post-deployment domain adaptation and self-improvement despite LLMs’ zero-shot capabilities [Fang et al., 2025, Hu et al., 2025b, Khattab et al., 2023, Shinn et al., 2023, Yuksekgonul et al., 2025].Source: §2.1 · p. 3
- Existing CE harnesses impose limiting biases in both context representation and optimization.Case-based trajectories preserve episodic traces but generalize poorly; itemized lists remain flat, while hierarchical and graph memories add latency and complexity without consistently beating naive retrieval. Prompt rewriting favors abstract rules over domain detail, whereas additive curation can cause structural rigidity and context bloat [Agrawal et al., 2025; Suzgun et al., 2025; Zhang et al., 2026; Cai et al., 2025a,b].Source: §2.1 · p. 3
- MCE replaces manually crafted workflows with learned skills and agent-generated files and code, enabling flexible, fully agentic context engineering.Skills inject task specificity into self-looping, self-spawning agents, while files and code provide general, verifiable context artifacts unconstrained by predefined schemas [Anthropic, 2025; Wang et al., 2024a; Wei, 2025; Yang et al., 2024].Source: §2.1 · p. 3
2.2 Evolutionary Computation with LLMs
- LLM genetic operators enable semantic variation in unstructured search spaces, and prior LLM-driven evolutionary work targets solution, function, and program levels.Examples include prompts, textual solutions, and numerical parameters; heuristics and reward functions; and search algorithms, neural architectures, and agent workflows [Guo et al., 2024; Lee et al., 2025; Xu et al., 2025b; Liu et al., 2024b; Romera-Paredes et al., 2024; Ye et al., 2024; Ma et al., 2024; Hottung et al., 2025; Novikov et al., 2025; Liu et al., 2025; Zhang et al., 2025b].Source: §2.2 · p. 3
- Agent skills offer an integrated abstraction for evolutionary optimization, supporting co-evolution, modular interfaces, and granular recombination.Organized instructions, scripts, and resources unify different solution levels, decouple optimization from the agent architecture, and let agents inspect and selectively recombine components from ancestor skills [Anthropic, 2025; Cen and Tan, 2025; Guo et al., 2025; Xie et al., 2025; Zhao et al., 2025].Source: §2.2 · pp. 3–4
3 Meta Context Engineering
Meta Context Engineering (MCE) co-evolves the skills that guide context engineering and the context artifacts those skills produce. It separates how context is represented and learned from the context function itself, using agentic optimization at both levels.
3.1 Problem Formulation
- MCE separates context construction—static components plus query-conditioned operators—from the skill specifying how to learn it, optimizing context within each skill and skills against validation performance.This decoupling operates above already-trained, frozen LLMs and opens a broader design space for context engineering.Source: §3.1 · pp. 4–5
3.2 Meta-Level: Agentic Skill Evolution
- Agentic crossover synthesizes skills by reasoning over the task specification and prior skill history, selectively combining and refining successful or failed approaches.Evolved skills vary autonomy, granularity, and verbosity with task complexity and model capacity, and use training and validation signals to detect overfitting and improve generalization.Source: §3.2 · p. 5
3.3 Base-Level: Fully Agentic Context Optimization
- The base-level agent executes the current skill and learns from training-rollout feedback, representing context as unconstrained files and code for static components and dynamic operators.It can warm-start from the prior best context function.Source: §3.3 · pp. 5–6
3.4 Algorithmic Orchestration
- MCE iterates through skill evolution, rollout-based context optimization, and validation, using a history-informed (1 + 1)-ES that retains the better of one offspring and the current best.Training-data batching is optional for large datasets.Source: §3.4 · p. 6
4 Experiments
Across five domains, MCE outperforms the compared context-engineering baselines in offline and online evaluations. It also adapts context length, transfers context to smaller models, and reduces training time and rollout requirements; ablations support the value of evolving skills and the methodology rather than the agentic model alone.
4.1 Experimental Setup
- Experiments use five benchmarks, common initial contexts and training budgets for baseline comparisons, and a one-shot query-to-context interface for MCE.DeepSeek V3.1 is the default generator and reflector, while AEGIS2 uses Qwen3-8B; evaluations include offline training and online sequential processing, and MCE is tested with fixed-skill and autonomous base-agent variants.Source: §4.1 · pp. 6–7
4.2.1 Context Performance
- 89.1% average relative gain offline versus 70.7% for ACE, and 74.1% online versus 41.1%, with MCE ranking first on all five offline benchmarks.The evaluation covers financial, chemistry, medicine, law, and AI-safety benchmarks; Table 1 summarizes context performance across them.Source: §4.1 · p. 6, §4.2.1 · p. 7, Table 1 · p. 8
4.2.2 Context Adaptability, Efficiency, and Transferability
- MCE adapts context length to task needs and beats ACE at comparable or lower token counts on FiNER.MCE-S achieves 73% accuracy at about 1.5K tokens versus ACE’s 65% at a comparable length; MCE-L reaches 75% at 20K tokens versus ACE’s 70% at 79K. MCE’s global context view and batch-level rollout processing support restructuring and refinement rather than additive curation.Source: §4.2.2 · p. 9, Figure 3 · p. 9
- MCE contexts transfer from DeepSeek-V3.1 to smaller models with less performance degradation than ACE’s, whose transferred context can fall below the base model.For example, ACE’s LawBench F1 on Llama3.3-70B drops from 0.24 to 0.19; MCE’s compact, structured contexts are offered as reasons for better transfer.Source: Table 2 · p. 8, §4.2.2 · p. 9
4.2.3 Training Efficiency
- 1.9 hours versus ACE’s 25.8 hours for five FiNER training epochs, a 13.6× speedup; MCE also reaches 95% training accuracy in 450 rollouts versus ACE’s 94% after 2169.MCE’s batch-level optimization can analyze data directly or parallelize reflection and curation across rollouts, unlike ACE’s instance-by-instance optimization.Source: §4.2.3 · pp. 9–10
4.3 Ablation Studies
- On FiNER, full MCE reaches 75% offline accuracy versus 73% without skills, while the skill-less agent beats ACE both offline and online.The skill-less variant scores 73% versus ACE’s 71% offline and 67% versus 64% online; fixed-skill quality varies across tasks, and full MCE is inapplicable online because single-pass processing precludes skill evolution.Source: Table 3 · p. 10, §4.3 · p. 10
- Replacing ACE’s reflector and curator with MiniMax M2.1 lowers final accuracy to 67% from 70%, despite producing a 114K-token playbook versus 79K.Training stops earlier when the playbook exceeds the context window; the comparison rules out knowledge transfer from MCE’s agentic model as the source of its gains, while noting that MCE requires an agentic model able to work with programming environments, files, and code.Source: Table 4 · p. 10, §4.3 · p. 10
5 Conclusion and Discussion · (Appendix)
MCE recasts context engineering as a learnable agentic capability that co-evolves skills and context artifacts; experiments show consistent gains, while the discussion identifies task and trajectory limitations and directions for further development.
5 Conclusion and Discussion
- MCE achieves 5.6–53.8% relative improvement over SOTA methods (mean gain 16.9%) across five domains, with superior adaptability, efficiency, transferability, and training speedups.The authors attribute these results to treating context engineering as a learnable agentic capability rather than a fixed workflow with predefined schemas.Source: §5 · p. 10
- MCE co-evolves learnable context-engineering skills and context artifacts represented as files and code through fully agentic bi-level optimization.The framework orchestrates dual agents under an evolutionary framework, advancing beyond static context representations and optimization procedures.Source: §5 · p. 10
- MCE may excel at domain-knowledge acquisition and pattern matching but not reasoning-intensive tasks, and batch-level CE may falter on long, complex trajectories requiring fine-grained credit assignment.The authors attribute the trajectory limitation to underlying agent-model capabilities and expect it to diminish as agentic models improve.Source: §5 · pp. 10–11
- The authors propose extending evolutionary skills beyond context engineering to other agentic capabilities and task domains, dynamically evolving skills rather than only solutions, code, or search algorithms.They describe MCE as among the first to dynamically evolve skills, bridging manual skill engineering and autonomous self-improvement [Anthropic, 2025b, Muratcan Koylan, 2025].Source: §5 · p. 11
- Future work could replace the one-shot generator with an agent that interacts directly with context files and co-evolves context-utilization skills alongside context-learning skills.The current one-shot inference setup maintains consistency with context-engineering baselines.Source: §5 · p. 11
- Progressive disclosure lets agents load skill details only when relevant, supporting skill composition and scaling across domains with minimal overhead.The authors identify skill transfer across tasks and emergent behaviors from skill composition as open questions.Source: §5 · p. 11
- MCE’s broader vision is agents that continuously refine their learning algorithms and memory architectures, enabling open-ended evolution as they execute tasks.The authors frame this as a generic design space for optimizing general AI.Source: §5 · p. 11
A Experimental Details … B Prompts
This appendix details the data and task setups for five benchmarks and presents prompts for the meta-agent and base-agent workflow. The prompts support history-aware skill evolution and context updates based on training rollouts, with alternative procedures for error analysis, reflection, and clustering.
A.1 FiNER
- The FiNER evaluation samples debt- and credit-related financial tags, with 200/100/100 train/validation/test instances for entity tagging in sentence context.The full benchmark task maps financial entities to US GAAP XBRL tags.Source: §A.1 · pp. 16–17
A.2 USPTO-50k
- USPTO-50k single-step retrosynthesis predicts precursor reactants from product SMILES, using stratified samples of 50/30/100 across 10 reaction types.Preprocessing follows Cai et al. [2025b].Source: §A.2 · p. 17
A.3 Symptom2Disease
- Symptom2Disease predicts one of 22 diagnoses from symptom descriptions, with stratified 200/50 training/validation samples and the original 212-sample test split.Predicted diagnoses are scored by exact match after case and whitespace normalization.Source: §A.3 · pp. 18–19
A.4 LawBench
- LawBench predicts criminal charges from Chinese case facts, including multi-charge cases and similar offenses; its 200/50/100 splits are evaluated by micro-F1 [as specified in the benchmark].The required output lists charges separated by semicolons.Source: §A.4 · p. 19
A.5 Aegis2
- AEGIS2 evaluates safe/unsafe prompt classification by F1 on selected difficult risk categories, with 400/128/140 train/validation/test instances [Ghosh et al., 2025; Llama Team, 2024].The four categories were LLaMA-3-SafeGuard’s worst-performing; evaluation uses an 8B model, described as more sensitive to prompt format and wording.Source: §A.5 · p. 20
B Prompts
- The meta-agent evolves standalone skills through crossover over iteration history, while the base agent updates prior-best context using the skills and training rollouts.The meta-agent outputs a skill; the base agent outputs context files and retrieval logic.Source: B Prompts · pp. 21–22
- The meta-agent reviews prior skills and train/validation metrics for overfitting or underfitting, combines successful strategies through agentic crossover, and guides the base agent to improve—not rebuild—the best context.The prompt asks it to analyze what worked or failed before designing the next skill.Source: B Prompts · p. 22
- Direct agentic curation updates prior context by grouping errors into recurring mistake types, adding or refining guidance, and removing sections that may cause overfitting.It prioritizes frequent, high-impact mistakes and validation performance over rare edge cases.Source: B Prompts · p. 23
- An alternative skill uses LLM reflection on each incorrect sample to identify missing knowledge, then incrementally adds, updates, or merges insights in context files.The prompt describes both free-text reflection and structured output as implementation options.Source: B Prompts · p. 23
- A clustering-based skill groups training samples by features such as question type, domain tags, or entity category, then synthesizes a dedicated context section for each group.The grouping may use rule-based clustering.Source: B Prompts · p. 24
- The base agent analyzes incorrect and correct predictions, updates context with generalizable patterns, and uses training examples as illustrations rather than memorized answers.The prompt calls for adding missing knowledge, clarifying ambiguous rules, and reinforcing successful approaches while ensuring retrieval can match unseen questions.Source: B Prompts · p. 26
C Learned Skills · D Case Studies and Analysis · D.1 FiNER
The FiNER learned skill refines context by turning training errors into semantic principles and explicit reasoning chains rather than memorizing examples. The following analysis section examines MCE’s performance, skill evolution, and learned skills and context.
C Learned Skills
- The FiNER skill uses an 8-phase refinement process, three context files, and three LLM calls to analyze errors, generalize rules, and create reasoning chains.The files are reasoning-chains.md, semantic-principles.md, and tag-reference.md.Source: C Learned Skills · pp. 26, 30
- The skill builds on existing context, extracting generalizable semantic principles from errors and pruning overfitted content instead of memorizing specific examples.It emphasizes understanding why errors occur and refining rather than discarding prior context.Source: C Learned Skills · p. 27
- It groups training errors by reasoning failure, including superficial pattern matching, missed semantic distinctions, context blindness, and category confusion.The skill proposes addressing these failures with reasoning steps, clearer semantic boundaries, and attention to context words.Source: C Learned Skills · p. 27
- The skill warns that facility type and phrasing determine classification: a tranche loan signals a debt instrument, while debt outstanding under a facility is not borrowing capacity.It identifies the facility name as a discriminator and distinguishes debt carrying amount from current borrowing capacity.Source: C Learned Skills · pp. 28–30
- Explicit reasoning chains guide classification through entity type, financial-instrument category, and category-specific distinctions rather than surface cues.The skill also calls for cross-example validation and a hierarchy from category boundaries to within-category distinctions and edge cases.Source: C Learned Skills · pp. 29–30
- The iteration’s success criteria include more principles than examples, reasoning chains for major decisions, documented anti-patterns, generalization to novel examples, and improved validation accuracy.The stated criterion allows training accuracy to decrease slightly as overfitting is reduced.Source: C Learned Skills · p. 31
D Case Studies and Analysis
- The case-studies section analyzes MCE against baselines across tasks, examines skill evolution, and overviews the optimal learned skills and context.Source: D Case Studies and Analysis · p. 31
D.1.1 Task Characteristics and Baseline Limitations … 2. QUICK_REFERENCE.md: Critical error patterns distilled from training failures
The FiNER and USPTO50k appendices describe tasks where generic or overly concise prompts miss nuanced, long-tail rules and domain-specific distinctions. Across both, MCE evolves skills and context toward error-informed, structured guidance, with different task-specific strategies.
D.1.1 Task Characteristics and Baseline Limitations
- FiNER requires broad long-tail rule coverage and disambiguation, so learning from training examples alone is insufficient and concise prompts miss nuances.The passage says success depends on deep reflection, pattern abstraction, and domain expertise.Source: §D.1.1 · p. 32
D.1.2 Skill Evolution
- After validation feedback, FiNER skill evolution shifts from extracting specific patterns to error-driven generalization, prioritizing abstract principles and semantic reasoning over example memorization.The prior skill captured 29 patterns, but a 4.5% train/val gap indicated overfitting; the revised approach identifies cross-example themes in errors.Source: §D.1.2 · p. 32
D.1.3 Context Evolution
- FiNER’s final context uses three specialized files for tag rules, semantic distinctions, and 30+ corrected error patterns.Its facility decision chain distinguishes revolving credit facilities, tagged as LineOfCreditFacilityMaximumBorrowingCapacity, from term loans, tagged as DebtInstrumentFaceAmount.Source: §D.1.3 · p. 33
D.2 USPTO50k / D.2.1 Task Characteristics and Baseline Limitations
- USPTO50k combines logical reasoning with domain-knowledge retrieval, while chemical reaction space and rare reaction-specific rules challenge ICL, MIPROv2, and GEPA.The passage says MIPROv2 length constraints favor generic instructions, GEPA brevity omits corner-case rules, and ACE’s incremental context accumulation is more effective for this task.Source: §D.2.1 · p. 33
D.2.2 Skill Evolution / QUICK_REFERENCE.md
- The USPTO50k skill shifts from comprehensive coverage to differential learning, mining both success and failure patterns while preserving what works in existing context.It favors workflow-oriented, actionable guidance over encyclopedic information, and its QUICK_REFERENCE.md strategy keeps the top 20 common error patterns while removing unique edge cases.Source: §D.2.2 · p. 34
D.2.3 Context Evolution
- The USPTO50k context evolves into a structured knowledge system that includes a step-by-step workflow with embedded verification checks.Source: §D.2.3 · p. 34
3. SUCCESS_PATTERNS.md: Validated patterns with 100% training accuracy · D.3 Symptom2Disease
The section describes a chemistry context organized around workflow-specific guidance, inline checks, and both successful and erroneous reaction patterns. It argues that pairing positive and negative examples supports more robust generalization than error-only documentation.
3. SUCCESS_PATTERNS.md: Validated patterns with 100% training accuracy
- The USPTO context integrates inline verification checkpoints into its workflow, including a reaction-specific step for heterocycle formation.The workflow asks the agent to identify the heterocycle and match it to a standard synthesis pattern.Source: §3 · p. 34
- For heterocycle checks, the context distinguishes oxadiazoles by oxygen in the ring and warns against confusing them with triazoles.It maps an “oc” pattern to 1,3,4-oxadiazole and an “nnn” pattern to 1,2,4-triazole.Source: §3 · pp. 34–35
- For amide-formation retrosynthesis, the documented precursor is an ester, C(=O)OC, rather than an acid, C(=O)O.The check starts from a product containing C(=O)N.Source: §3 · p. 35
- The context documents reaction exemplars with 100% training accuracy, including Hantzsch thiazole synthesis from thioacetamide and an α-halo carbonyl.The example identifies the bromine-bearing carbon as alpha to the carbonyl.Source: §3 · p. 35
- Combining patterns to replicate with errors to avoid supports more robust generalization and a systematic workflow over pattern memorization.The section highlights this organization as important for the combinatorial complexity of chemical reaction space.Source: §3 · p. 35
- The context provides separate guides for reaction classes and uses full retrieval, returning all concatenated context, for USPTO50k.Full retrieval is identified as the most effective strategy for this task.Source: §3 · pp. 34–35
D.3.1 Task Characteristics and Baseline Limitations
Symptom2Disease is a 22-category symptom-to-disease classification task with little train-test shift and limited need for abstraction, making many-shot ICL a strong baseline. Methods that preserve examples fit the task better than methods that compress them into abstract instructions.
D.3.1 Task Characteristics and Baseline Limitations
- With 22 disease categories, Symptom2Disease relies mainly on pattern matching because test symptoms closely mirror training data and require little deep abstraction or multi-step reasoning.Many-shot ICL is the strongest baseline, using 8–10 examples per disease category for distribution coverage and semantic nearest-neighbor matching.Source: §D.3.1 · p. 35
- GEPA and ACE underperform: GEPA’s brevity bias erases fine-grained symptom distinctions, while ACE’s monolithic playbook adds noise and can entrench early online errors.ACE’s abstract heuristics can override pretrained medical knowledge; GEPA may generalize distinct symptoms into overly broad rules.Source: §D.3.1 · p. 35
- DC performs strongly with dynamic many-shot ICL and semantic retrieval, while MIPROv2 benefits from selecting examples that preserve distributional features.Semantic similarity aligns with pragmatic similarity for symptom-description classification, making retrieval a natural fit.Source: §D.3.1 · p. 35
D.3.2 Skill Evolution
The skill evolves from building symptom-based diagnostic context to conservative, evidence-gated refinement, while learning from prior iterations that preserving a near-optimal model and knowing when to stop are essential.
D.3.2 Skill Evolution
- The initial skill extracts generalizable symptom-diagnosis patterns, synthesizes profiles of core symptoms and descriptors, and refines them using incorrect predictions.Profiles include a key pattern describing the defining symptom combination; error analysis identifies commonly confused diagnoses and patterns behind wrong predictions.Source: §D.3.2 · pp. 35–36
- At 88% val and a 1% gap, the evolved skill preserves the near-optimal architecture and adds only discriminators that demonstrably improve performance.It uses five validation gates and requires the train-val gap not to widen beyond 1% after an addition.Source: §D.3.2 · p. 36
- The evolved skill tightens addition criteria to 3+ occurrences, low generalization risk, and novel-case confidence of at least 0.9.These thresholds are stricter than previous iterations’ 2+ occurrences and medium-risk allowance.Source: §D.3.2 · p. 36
- The skill adds explicit stop criteria because further refinement can be counterproductive when remaining errors are likely ambiguous cases.It stops if validated patterns are under 3, train accuracy exceeds 90%, the estimated train-val gap exceeds 1.5%, or ambiguous, edge, and novel errors exceed 40% of total errors.Source: §D.3.2 · p. 36
D.3.3 Context Evolution · D.4 LawBench
The context evolves from broad guidance into a diagnosis guide that applies discriminators to specific symptom patterns. Its retrieval system routes queries to relevant context subsets, while the evolution strategy favors validated patterns and evidence-backed additions.
D.3.3 Context Evolution
- The guide prioritizes decisive discriminators, such as distinguishing painful impetigo blisters from itchy, widespread chicken pox blisters.Source: §D.3.3 · p. 36
- It also captures semantic symptom essences, distinguishing asthma’s primary breathing difficulty from pneumonia’s infection symptoms and colored phlegm.Source: §D.3.3 · p. 37
- For minimal distributional shift, context evolution is conservative: preserve validated patterns, add discriminators only with strong evidence, and recognize irreducible ambiguities.Source: §D.3.3 · p. 37
- A prioritized cascade detects symptom patterns and returns only relevant context sections, with learned disambiguation rules directing explicit breathing difficulty to asthma guidance.Source: §D.3.3 · pp. 37–38
- The retrieval architecture uses 30+ prioritized Python rules, including critical symptom combinations, surgical fixes, semantic matching, error patterns, and a full-guide fallback.Source: §D.3.3 · p. 37
- MCE routes each query to relevant context subsets instead of accumulating a monolithic playbook, reducing context interference while providing targeted guidance.For symptom2disease, the retrieval function grows into a 1,440-line rule-based system for fine-grained classification.Source: §D.3.3 · pp. 37–38
D.4.1 Task Characteristics and Baseline Limitations
LawBench criminal charge prediction requires detail-sensitive legal reasoning and precise closed-set classification. In this setting, accumulated ACE playbooks interfere with case facts, while GEPA’s concise global instruction supports systematic generalization.
D.4.1 Task Characteristics and Baseline Limitations
- LawBench charge prediction combines long, detail-sensitive case descriptions, strict legal reasoning, and high-precision classification into fixed crime labels.For example, distinguishing theft from robbery requires determining whether force or threat was used.Source: §D.4.1 · p. 38
- ACE’s accumulated historical-error bullets can interfere with legal cases by introducing tangential patterns that obscure small, decisive facts.The passage gives ordinary-goods smuggling as an example where weapon- or artifact-smuggling strategies add noise.Source: §D.4.1 · p. 38
- GEPA’s concise, globally optimized instruction generalizes across case types and guides fact analysis, label formatting, error avoidance, and reasoning before answering.Pareto optimization across the dataset yields guidance that focuses on current facts rather than potentially misleading historical examples.Source: §D.4.1 · p. 38
D.4.2 Skill Evolution … E Utility Functions
This section traces the evolution of skills and context artifacts for structural legal analysis and precision-aware safety classification, and presents utility functions for structured LLM response handling and pairwise text-embedding similarity calculations.
D.4.2 Skill Evolution
- Legal skill evolution replaces overfitting pattern rules with structural case decomposition and diagnoses errors by processing stage.The skill maps facts to discrete acts, then matches each act to charges; its error categories distinguish failures such as act extraction from charge selection.Source: §D.4.2 · p. 39
D.4.3 Context Evolution
- The legal context contracts to about 30KB across 11 files and uses a READ → DECOMPOSE → MATCH → VALIDATE framework with trigger-based retrieval.Retrieval adds structural guidance and case-specific warnings, supporting systematic analysis rather than semantic pattern matching.Source: §D.4.3 · pp. 39–40
D.5.1 Task Characteristics and Baseline Limitations
- Aegis2.0 classifies prompts into five safety categories with Qwen3-8B, whose limited reasoning capacity and context window make brevity-biased methods potentially advantageous.The five categories are copyright/trademark/plagiarism, political misinformation/conspiracy, unauthorized advice, immoral/unethical, and safe.Source: §D.5.1 · p. 41
D.5.2 Skill Evolution
- Safety skill refinement shifts toward balancing false-positive exclusions and missing-violation triggers, with explicit precision/recall control and difficult boundary distinctions for small models.Distinctions include creating versus extracting content, benign versus harmful roleplay, and jailbreak setup-only prompts versus action requests.Source: §D.5.2 · pp. 41–42
D.5.3 Context Evolution
- The safety context uses 12 specialized files that prioritize decision rules and safe exclusions, while retrieval acts as a precision gate with early safe returns for benign prompts.Category-specific rules are added when patterns warrant scrutiny, reducing exposure to violation-related context for clearly benign inputs.Source: §D.5.3 · pp. 42–43
E Utility Functions
- Utility functions configure DeepSeek V3.1 and OpenAI text-embedding-3-small and support asynchronous batched LLM calls with structured outputs plus a synchronous wrapper.The async function enforces a maximum batch size and uses semaphore control for individual calls.Source: E Utility Functions · pp. 43–44
- The response helper accepts one prompt or a list, supports an optional response schema, and returns one response or a list accordingly.The example batches two prompts with an Analysis schema.Source: E Utility Functions · pp. 44–45
- The embedding utility computes a matrix of pairwise cosine similarities between two lists of strings.It embeds both lists, normalizes one embedding array, and computes dot products against the other.Source: E Utility Functions · pp. 45–46
Related papers
This paper cites
Cited by
- Skill$^{\infty}$: Recursive Self-Improvement for Agent Skill Optimization2026
- ClinVerse: A Realistic Multi-Agent Diagnostic Environment for Training and Evaluating Medical Agents2026
- Harness-Delta Attribution: Dissecting Gains From Harness Evolution2026
- EMO: A Closed-Loop Test-Time Computation Framework via Alternating Context Optimization and Logits Steering2026
- SkillNEO: Non-Elitist Evolutionary Optimization of Agent Skills2026
- Self-Evolving Agent Harness2026