Papers
Topics
Authors
Recent
Search
2000 character limit reached

Graph-Regularized Agentic Context Evolution (GRACE)

Updated 14 July 2026
  • The paper introduces GRACE, which replaces flat-text prompt editing with a structured, typed semantic graph to maintain and update persistent system-level instructions.
  • It employs localized structural validation and a graph editing algebra to manage instruction evolution, reducing verification difficulty and preventing redundancy and contradictions.
  • Experimental results in a telecom harness show that GRACE achieves a 7.4× improvement in strict reliability compared to flat-text baselines, underlining its practical benefits.

Graph-Regularized Agentic Context Evolution (GRACE) is a framework for reliable long-horizon evolution of the persistent system-level instruction in a deployed LLM agent. Rather than editing that instruction as a single flat prompt, GRACE maintains the mutable instruction component as a typed semantic graph, validates proposed updates within local typed neighborhoods of modified nodes, and reconstructs accepted graph updates as incremental edits to the textual instruction checkpoint actually used at deployment. In the formulation introduced for a fixed telecom agent harness derived from τ2\tau^2-bench, the model, tools, and harness remain fixed while only the persistent instruction evolves across batches of experience, with the goal of improving strict reliability under controlled distribution shift (Hsu et al., 10 Jul 2026).

1. Problem formulation and scope

GRACE is defined over agentic context, the model-external textual control content assembled by an operational harness. In the target setting, each model call receives a context composed of a system-level instruction, task input, tool-call traces or environment state, and harness-provided metadata. The method isolates the persistent system-level instruction t\ell_t as the only mutable component. Context assembly is written as

ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),

where hh denotes harness information and xx the task-specific input (Hsu et al., 10 Jul 2026).

Evolution proceeds batchwise. At batch tt, tasks are drawn from a batch distribution Dt\mathcal{D}_t, experience is collected under the previous checkpoint t1\ell_{t-1}, and a diagnosis signal is produced:

Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),

ot=FDiagnose(Et).o_t = F_{\mathrm{Diagnose}}(\mathcal{E}_t).

An evolution operator then updates both an internal substrate t\ell_t0 and the deployed instruction:

t\ell_t1

For flat-text evolution, t\ell_t2; for GRACE, the substrate is a graph t\ell_t3 (Hsu et al., 10 Jul 2026).

The motivating failure mode is long-horizon flat-text maintenance. The paper identifies four consequences of repeated direct prompt editing: verification difficulty over an ever-growing document, interacting instructions that can contradict or undermine one another, prompt bloat and redundancy, and brittleness under distribution shift. GRACE addresses these issues by shifting the evolution substrate from unstructured text to a typed graph, while preserving a textual instruction checkpoint for deployment (Hsu et al., 10 Jul 2026).

2. Typed semantic graph substrate

At update step t\ell_t4, GRACE maintains a directed typed graph

t\ell_t5

with object-type mapping t\ell_t6, relation-type mapping t\ell_t7, and content map t\ell_t8, where t\ell_t9 is natural-language text content. The node-type set is

ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),0

and the relation-type set is

ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),1

Here, identity encodes agent identity and mandate, norm encodes conduct rules, and knowledge encodes domain facts and assumptions. The relations mean, respectively, grounding or justification, same-type specialization, and procedural order among norms (Hsu et al., 10 Jul 2026).

The graph is constrained by a network schema

ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),2

where each ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),3 specifies the allowed source-target type pairs for relation type ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),4. For any edge ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),5 of type ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),6, GRACE requires

ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),7

The schema permits, for example, ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),8 edges such as identity ct(h,x)=Assemble(t,h,x),c_t(h,x) = \operatorname{Assemble}(\ell_t, h, x),9 norm and knowledge hh0 norm, requires hh1 to connect same-type nodes, and restricts hh2 to norm hh3 norm (Hsu et al., 10 Jul 2026).

This typed structure is the central regularizing device. It makes relationships among instruction fragments explicit, limits admissible edits to schema-conformant operations, and turns verification into a neighborhood-scoped problem rather than a full-document rereading problem. A plausible implication is that the graph serves simultaneously as representation, constraint system, and search space for instruction updates.

3. Update planning and scoped structural validation

The graph-based evolution operator is

hh4

GRACE decomposes this into Operation Planning, Structural Validation, and Delta Reconstruction (Hsu et al., 10 Jul 2026).

Operation Planning uses a graph editing algebra

hh5

An LLM-based edit planner proposes

hh6

which is applied to produce a provisional graph hh7 and a set of touched nodes hh8. A relation-maintenance module then proposes relation-focused edits

hh9

yielding a candidate graph xx0 and a touched-node set xx1 (Hsu et al., 10 Jul 2026).

Structural Validation is scoped to local typed neighborhoods. Let

xx2

For radius xx3, the xx4-hop neighborhood is

xx5

GRACE uses a progressive schedule starting at xx6 and increasing by xx7, and defines the validation neighborhood xx8 as the induced subgraph on the final radius (Hsu et al., 10 Jul 2026).

Within xx9, Structural Analysis (SA) detects contradictions and redundancy. Contradiction is defined by overlapping scope plus unsatisfiable joint content:

tt0

Redundancy is defined only for same-type nodes and requires overlap plus entailment:

tt1

tt2

The issue set is

tt3

and repairs are performed through schema-conformant edit operations such as merge, modify, or remove (Hsu et al., 10 Jul 2026).

The local scope is not merely an efficiency heuristic. The ablation in the paper shows that graph structure without SA improves early but does not sustain reliability, whereas full GRACE continues improving. This indicates that consolidation and conflict resolution are integral to the method rather than ancillary checks.

4. Reconstruction into deployed instruction text

GRACE does not deploy the graph directly. After validation, it reconstructs an updated textual checkpoint from graph deltas. Let the graph-level change log be

tt4

where tt5 is the component-wise symmetric difference between graph states. Delta reconstruction is

tt6

This produces the new persistent instruction actually fed to the agent at deployment (Hsu et al., 10 Jul 2026).

The reconstruction is incremental rather than generative-from-scratch. Added nodes insert new text in appropriate sections, modified nodes rewrite aligned spans, and merged or removed nodes delete or consolidate text. The typed structure guides document organization: identity content appears early, knowledge is grouped by topic or support relations, and norms are ordered using sequence and refinement structure (Hsu et al., 10 Jul 2026).

This reconstruction layer is crucial to the overall architecture. GRACE uses the graph as an internal evolution substrate, but retains textual instructions as the operational interface to a fixed harness and fixed model. This suggests a separation between internal control representation and deployment surface form: structure is used where verification is needed, while text is used where compatibility is required.

5. Experimental evaluation and empirical profile

GRACE is evaluated in a telecom customer-service harness derived from tt7-bench, with Gemini 2.5 Flash as the fixed agent model, fixed tools and tool interfaces, a fixed diagnosis pipeline, GPT-4.1 as user simulator, and a held-out evaluation set of 66 tasks. Evolution uses 10 experience batches of 42 tasks each, with alternating intent mixtures: Phase A batches emphasize MMS and downweight Mobile Data, Phase B batches emphasize Mobile Data and downweight MMS, while Service intent is held constant. Each primary condition is run for five independent evolution trajectories. At each reported checkpoint, evaluation uses 66 tasks with 3 trials each, for 198 episodes per run (Hsu et al., 10 Jul 2026).

Strict reliability is measured by tt8, while pass@3 and pass@1 measure less stringent success criteria. The shared initial instruction tt9 for Gemini 2.5 Flash has Dt\mathcal{D}_t0, pass@3 Dt\mathcal{D}_t1, and pass@1 Dt\mathcal{D}_t2. At the final checkpoint Dt\mathcal{D}_t3, GRACE reaches Dt\mathcal{D}_t4, pass@3 Dt\mathcal{D}_t5, and pass@1 Dt\mathcal{D}_t6 (Hsu et al., 10 Jul 2026).

Condition Final Dt\mathcal{D}_t7
GRACE 0.673 ± 0.136
GRACE w/o SA 0.248 ± 0.144
HCE 0.191 ± 0.051
Gemini 3.1 Pro zero-shot 0.242
Gemini 2.5 Flash zero-shot 0.091

The paper states that GRACE’s strict reliability of Dt\mathcal{D}_t8 is approximately Dt\mathcal{D}_t9 the Gemini 2.5 Flash zero-shot value and exceeds the Gemini 3.1 Pro zero-shot reference of t1\ell_{t-1}0 on the same held-out set (Hsu et al., 10 Jul 2026). Across checkpoints, GRACE is the only method showing monotone improvement in later stages: t1\ell_{t-1}1 gives t1\ell_{t-1}2, t1\ell_{t-1}3 gives t1\ell_{t-1}4, and t1\ell_{t-1}5 gives t1\ell_{t-1}6. By contrast, GRACE without SA improves initially to t1\ell_{t-1}7 at t1\ell_{t-1}8 but falls to t1\ell_{t-1}9 at Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),0, while the flat-text HCE baseline rises modestly and then regresses to Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),1 (Hsu et al., 10 Jul 2026).

Instruction growth and post-hoc audits support the same interpretation. Deployed instruction size at Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),2 is 51,413 characters for GRACE, 54,893 for GRACE without SA, and 82,592 for HCE. HCE shows the highest contradiction count in the audit, while GRACE without SA shows more redundancy than full GRACE. Backward transfer under alternating shift is mostly non-negative for GRACE, whereas HCE shows persistent negative backward transfer and the graph-only ablation does not maintain strong retention (Hsu et al., 10 Jul 2026).

6. Intellectual context, distinctions, and open problems

GRACE belongs to a broader 2025–2026 turn toward graph-structured agent state, memory, and context control, but its specific substrate is unusual. ACE introduced Agentic Context Evolution as a retrieve-versus-think controller over a growing working memory Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),3, without an explicit graph representation (Chen et al., 13 Jan 2026). VimRAG modeled multimodal reasoning as a dynamic DAG of epistemic states and used graph-modulated memory allocation plus graph-guided policy optimization (Wang et al., 13 Feb 2026). HAGE treated memory retrieval as sequential, query-conditioned traversal over a weighted multi-relational graph with trainable edge features and anchor regularization (Jiang et al., 11 May 2026). ContextNav used an Operational Grammar Graph to constrain multimodal contextualization workflows (Fu et al., 6 Oct 2025). AEvo cast accumulated evolution context as process-level state edited by a meta-agent, and Graphectory represented agent trajectories as graphs for process-centric analysis (Zhang et al., 13 May 2026, Liu et al., 2 Dec 2025). This suggests that GRACE is best understood as a specific instance of a wider methodological shift: from flat histories and flat prompts toward structured substrates that make accumulation, verification, and adaptation tractable.

GRACE differs from those adjacent lines in one decisive respect: it targets the persistent system-level instruction itself as the evolving object. It does not primarily optimize retrieval paths, multimodal token budgets, or software-agent trajectories. Instead, it regularizes long-horizon prompt evolution by storing instruction content as typed graph objects, validating only the typed neighborhoods touched by an update, and then reconstructing deployment text. A plausible implication is that GRACE occupies a control-layer position above many earlier graph-memory methods.

The paper also states several limitations. Experiments are limited to the telecom domain of Et=FExperience(πθ,Assemble(t1,,),Dt),\mathcal{E}_t = F_{\mathrm{Experience}}\big(\pi_\theta,\operatorname{Assemble}(\ell_{t-1},\cdot,\cdot),\mathcal{D}_t\big),4-bench; the schema is deliberately simple, with only three node types and three relation types; graph size may still become large even with local validation; and edit planning, relation maintenance, and structural analysis all depend on LLM judgments. Future directions include richer typing systems and logics, stronger verification through symbolic or formal methods, evaluation in more domains and harnesses, comparison with other context-evolution systems under matched budgets, and multi-agent extensions (Hsu et al., 10 Jul 2026).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Graph-Regularized Agentic Context Evolution (GRACE).