FDEInterviews logo
ICLR 2026

Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models

The 2025 Stanford and SambaNova paper that improves agents by growing a detailed playbook of lessons in their context, with small edits instead of rewrites, and no weight updates.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2025
AUTHORS
Zhang, Hu, Upasani, Ma, et al.
FROM
Stanford University, SambaNova Systems, UC Berkeley
PUBLISHED
Oct 2025 · ICLR 2026
CITED BY
453Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 23% of this breakdown.

01

The paper in one minute

There are two ways to make an LLM system better after training: change its weights, or change its context, meaning the instructions, examples, memory and evidence it sees. Context changes are cheap, readable and reversible, so most production improvement happens there. The question is how to accumulate what the system learns without someone hand-editing a prompt forever.

The authors identify two failure modes in existing automated approaches. Brevity bias: prompt optimizers reward short, general instructions and drop the specific tactics, tool quirks and failure modes that agents need. Context collapse: methods that ask an LLM to rewrite the whole accumulated context at every step tend to compress it. In one case study a context of 18,282 tokens was rewritten to 122 tokens in one step, and accuracy fell from 66.7 to 57.1, below the 63.7 the agent scored with no adaptation at all.

ACE (Agentic Context Engineering) treats context as a growing playbook of itemized bullets. A Generator attempts tasks with the current playbook. A Reflector reads what happened and extracts concrete lessons. A Curator turns those into small additions, a "delta", which are merged into the playbook without rewriting it. Each bullet carries counters for how often it helped or hurt, duplicates are merged by embedding similarity, and the whole thing grows and gets refined.

On the AppWorld agent benchmark and two financial reasoning benchmarks, ACE beat strong baselines by 10.6% and 8.6% on average, cut adaptation latency by 86.9% on average, and, using an open model, roughly matched the top production agent on the AppWorld leaderboard.

THE IDEA, VISUALLY
GROW THE PLAYBOOK, DO NOT REWRITE IT Generator attempts the task Reflector lessons from each run Curator writes a small delta Playbook (itemized bullets) • Paginate contacts: 20 per call ✓4 • Billing dates are UTC ✓3 • Login before writes ✓6 → new: refunds over $500 need approval used on the next task Bullets carry helpful/harmful counts. New bullets are appended, duplicates merged, harmful ones pruned. CONTEXT COLLAPSE, ONE STEP full-rewrite baseline on AppWorld, Section 2.2 tokens in context step 60: 18,282 step 61: 122 accuracy 66.7 step 60 63.7 no adaptation 57.1 step 61 Rewriting the whole context let the model summarize away what it had learned.
Learning without retraining, done carefully. Lessons accumulate as itemized, scored bullets; rewriting the whole context instead can erase what was learned in a single step.
Research notes: the problem, approach and results
18,282 → 122tokens

a full-rewrite baseline's context in one step, with accuracy falling below no adaptation

59.4%

AppWorld average with an open model, against 60.3% for the top production agent on the leaderboard

−86.9%

average adaptation latency against prior context-optimization methods

THE PROBLEM

Agents can improve by updating their instructions and memory, but prompt optimizers favor short summaries, and repeated full rewrites shrink contexts until lessons are lost.

THE IDEA

Keep the context as an itemized playbook. A Generator works, a Reflector extracts lessons, a Curator adds small delta updates; duplicates merge and harmful bullets get pruned.

THE RESULT

+10.6% on agent tasks and +8.6% on finance benchmarks over strong baselines, at a fraction of the adaptation cost, with one caveat: without reliable feedback it can make things worse.

02

Why it matters to an FDE

Every deployment generates lessons: this API paginates at 20, that date field is UTC, refunds above a threshold need approval. Today those lessons live in an engineer's head or get pasted into a system prompt that grows until someone "cleans it up" and deletes half of them. ACE is a disciplined version of that loop.

Keep lessons itemized. A playbook of separate, scored bullets can be added to, audited and pruned one item at a time. A single prompt rewritten by a model or a person loses things silently. The 18,282-to-122 collapse is the extreme version of the cleanup every team has done.

Self-improvement needs a trustworthy signal. ACE learned well from execution feedback in the agent tasks: code ran or failed, the API call succeeded or not. On the finance tasks without ground-truth labels, it degraded; online, without labels, it scored 67.3 on FiNER against a base of 70.7. A system that learns from its own guesses learns its own mistakes. Wire adaptation to real outcomes, such as test results, API errors or human corrections, or do not turn it on.

Contexts are auditable; weights are not. The authors point out that an itemized playbook supports selective unlearning: a lesson that turns out wrong, or that encodes data that must be forgotten, can be removed, which compliance teams will ask about.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 49 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦3 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The ideas to keep, the three roles, results with and without labels, and the misreadings to avoid

    Free account
  2. 04How it works

    The three roles, delta updates, grow-and-refine and the offline and online modes, with a diagram

    Premium
  3. 05The numbers that matter

    Benchmark results, cost reductions, the collapse example and the robustness checks

    Premium
  4. 06Try it yourself

    A playbook with delta merges, dedup and pruning, against a full rewrite under length pressure

    Premium
  5. 07Where it breaks

    The dependence on feedback, the Reflector, and where long playbooks do not help

    Premium
  6. 08Using it on a deployment

    Building a reviewed lesson loop for a customer's agent

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →