MCP
arXivarXiv
Preprint
Published: December 2, 2026
cs.AI

RACE: Rule-evolving Agentic Context Engineering

121*
1 School of Artificial Intelligence, Shanghai Jiao Tong University
2 Peking Union Medical College
* Corresponding authors
Abstract
Large language model agents can solve increasingly complex tool-using tasks, yet adapting them to specialized domains remains difficult when model weights are fixed and task-specific supervision is limited. Recent context optimization methods improve agents by updating external prompts or playbooks based on past executions. However, existing methods often either rewrite monolithic playbooks, which risks eroding domain knowledge, or accumulate new guidance in an append-only manner, which inflates context length and dilutes relevant guidance. We introduce \textsc{RACE} (Rule-evolving Agentic Context Engineering), a framework that reconceptualizes playbook maintenance as rule-level evolutionary optimization: each rule is treated as an individual with empirically estimated utility, and the playbook evolves through principled variation, evaluation, and selection. Concretely, tree-structured rollouts expose contrastive behavioral evidence across execution branches for extracting reusable rule-level insights, an Upper Confidence Bound (UCB)-guided leave-out valuation estimates each rule's empirical utility, and a gated protocol ensures that only beneficial edits survive. We evaluate \textsc{RACE} on three specialized tasks: our newly introduced \textsc{GDVBench}, a benchmark grounded in Gene-Disease Validity curation that requires agents to extract experimental evidence from scientific papers following expert-defined criteria; biomedical search-based question answering, where agents retrieve evidence from biomedical sources to answer domain-specific questions; and retrosynthesis planning, where agents use an available product library and a single-step retrosynthesis model to construct feasible synthesis routes. Across these tasks, \textsc{RACE} improves task performance while maintaining compact guidance, yielding a favorable trade-off between performance and context length.
0
AI overview
Reviews
Citation graph
Structured
This paper does not have an AI preview yet
Rating
No ratings yet
Rate
Community rating
—
/ 5
No ratings yet
Rating
—
Soundness
—
Presentation
—
Contribution
—
Confidence
—
Discussion
Top
Newest
Questions
Replication
Author
No comments yet — be the first