English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Agentic Context Engineering (ACE): A Context Evolution Framework for Self-Improving LLMs

Forum topic · QianXun · 2025-10-11

Summary

ACE (Agentic Context Engineering) is a framework that treats LLM context as an evolving playbook rather than a static prompt, addressing two key limitations of existing context adaptation methods: brevity bias and context collapse. ACE divides adaptation into three roles — a Generator that produces reasoning trajectories, a Reflector that distills lessons from successes and failures, and a Curator that merges structured incremental delta updates into an itemized context. A grow-and-refine mechanism with semantic deduplication keeps context compact while preserving detailed domain knowledge. On the AppWorld agent benchmark, ACE improved accuracy by up to 17.1% without ground-truth labels, letting a smaller open-source model (DeepSeek-V3.1) match top-ranked proprietary agents like IBM CUGA. On financial reasoning benchmarks (FiNER, Formula), ACE outperformed strong baselines by an average of 8.6%. Adaptation latency dropped by 86.9% on average, with substantial reductions in rollouts and token costs.

Agentic Context Engineering (ACE): A Context Evolution Framework for Self-Improving LLMs

1. Introduction

LLM applications (agents, domain-specific reasoning) increasingly rely on context adaptation — improving performance by modifying inputs (instructions, policies, evidence) rather than updating weights. Existing methods suffer from two recurring problems:

  • Brevity bias: optimization collapses into short, generic prompts that discard domain-specific insights (e.g., iterative prompt optimizers repeatedly converging on near-identical generic instructions).
  • Context collapse: when an LLM fully rewrites accumulated context each adaptation step, it tends to compress it into shorter, less informative summaries. In an AppWorld case study, a context of 18,282 tokens at 66.7% accuracy collapsed to 122 tokens at 57.1% accuracy in a single step — worse than the 63.7% no-adaptation baseline.
  • 2. The ACE Framework

    ACE treats context as an evolving playbook, built on the agentic design of Dynamic Cheatsheet, with structured division of labor among three roles:

    Generator → Reflector → Curator → Context Playbook

  • Generator: produces reasoning trajectories for new queries.
  • Reflector: critiques trajectories to extract concrete lessons from successes and errors.
  • Curator: synthesizes lessons into compact incremental entries merged deterministically into the existing context via lightweight, non-LLM logic.
  • #### Incremental Delta Updates

    Context is represented as structured, itemized bullets with metadata (unique IDs, counters of helpful/harmful usage). This enables: 1. Localization — only relevant bullets are updated 2. Fine-grained retrieval — the generator focuses on the most relevant knowledge 3. Incremental adaptation — efficient merging, pruning, and deduplication; deltas can be merged in parallel

    #### Grow-and-Refine

    New bullets are appended and existing ones updated in place; a deduplication step compares bullets via semantic embeddings to prune redundancy. Refinement can be proactive (after each delta) or lazy (only when the context window is exceeded).

    3. Experimental Results

    Evaluated with the same LLM (DeepSeek-V3.1, non-thinking mode) for all roles, against baselines including Base LLM, ICL, MIPROv2, GEPA, and Dynamic Cheatsheet (DC).

    Agent benchmark (AppWorld):

    | Method | Ground Truth | Avg | |---|---|---| | ReAct | - | 42.4 | | ReAct + ICL | ✓ | 46.0 | | ReAct + GEPA | ✓ | 46.4 | | ReAct + ACE | ✓ | 59.4 | | ReAct + ACE | ✗ | 59.5 (with offline warmup) |

  • ACE improved accuracy by up to +17.1% without ground-truth labels.
  • ReAct + ACE (59.4%) matched the top-ranked IBM CUGA (60.3%, GPT-4.1-based) on the leaderboard; with online adaptation it exceeded CUGA on the harder Test-Challenge split (+8.4% TGC).
  • Domain-specific benchmarks (FiNER, Formula — XBRL financial reasoning):

    | Method | Ground Truth | FiNER | Formula | Avg | |---|---|---|---|---| | Base LLM | - | 70.7 | 67.5 | 69.1 | | GEPA | ✓ | 73.5 | 71.5 | 72.5 | | ACE | ✓ | 78.3 | 85.5 | 81.9 | | ACE | ✗ | 71.1 | 83.0 | 77.1 |

  • ACE outperformed strong baselines by an average of +10.9% (offline) and beat DC by +6.2% (online).
  • Ablations confirmed that the Reflector with iterative refinement, multi-epoch adaptation, and offline warmup each contribute significantly.

    Cost and speed:

  • AppWorld offline: vs GEPA, -82.3% adaptation latency, -75.1% rollouts.
  • FiNER online: vs DC, -91.5% latency, -83.6% token dollar cost.
  • 4. Discussion

  • Longer context ≠ higher serving cost: KV-cache reuse, compression, and offloading make long-context serving increasingly cheap, so rich evolving playbooks remain practical.
  • Online and continual learning: context adaptation is cheaper than weight updates, and since context is human-interpretable, ACE enables selective unforgetting for privacy, legal, or correctness reasons.

5. Conclusion

ACE resolves brevity bias and context collapse by evolving context as a comprehensive, itemized playbook through modular generation, reflection, and curation, delivering large accuracy gains in agentic and domain-specific tasks while substantially reducing adaptation latency and deployment cost.

> "Context should be a comprehensive, evolving playbook — detailed, inclusive, and rich with domain insights — rather than a terse summary."

Tags

#llm#agentic-context-engineering#context-engineering#prompt-optimization#self-improving-agents#appworld#deepseek#continual-learning

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/175998203