Skip to content

Scoped Verification for Reliable Long-Horizon Agentic Context Evolution under Distribution Shift

๐Ÿ•’ Published (v1): 2026-07-10 08:10 UTC ยท Source: Arxiv ยท link

Why this paper was selected

Scoped verification of mutable agentic context under distribution shift โ€” core reliability problem for deployed harnesses

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

๐Ÿ’ฌ Ask ChatGPTโœฆ Ask Claude

TL;DR

GRACE (Graph-Regularized Agentic Context Evolution) replaces flat-text maintenance of a deployed LLM agent's persistent system-level instruction with a typed semantic graph substrate, enabling local scoped validation at each evolution step. Over 10 batches of alternating distribution shift in a telecom agent harness, GRACE improves strict task reliability (\(\widehat{\text{pass}}@3\)) from 0.091 (zero-shot) to \(0.673 \pm 0.136\), far outpacing a flat-text baseline at \(0.191 \pm 0.051\).

Problem

Deployed LLM agents depend on a persistent system-level instruction (playbook/guidelines) that must be updated as task distributions shift, while the model, tools, and harness remain fixed. Flat-text maintenance causes verification difficulty to grow with instruction length: accumulated rules interact implicitly through linear order, leading to contradiction accumulation, context collapse during rewriting, and unbounded growth โ€” all documented failure modes. Prior work on prompt and context optimization does not isolate whether verification remains tractable as the persistent artifact grows over long evolution horizons.

Method

GRACE represents the persistent instruction as a directed typed heterogeneous graph \(G_t = (V_t, E_t)\) with object types \(\mathcal{A} = \{\text{identity}, \text{norm}, \text{knowledge}\}\) and relation types \(\mathcal{R} = \{\text{supports}, \text{refines}, \text{sequence}\}\), governed by a network schema \(\mathcal{T}_G = (\mathcal{A}, \mathcal{R}, \{\sigma_r\}_{r \in \mathcal{R}})\) that enforces typed endpoint constraints per edge.

Each evolution step applies three stages:

  1. Operation Planning: An LLM edit planner proposes schema-constrained graph edits from a finite algebra \(\mathcal{O}_{\mathcal{T}_G} = \{\text{AddNode}, \text{AddEdge}, \text{ModifyNode}, \text{RemoveNode}, \text{RemoveEdge}, \text{Merge}\}\) based on a diagnosis report; a relation-maintenance pass then reviews incident edges of touched nodes.

  2. Structural Validation: A \(k\)-hop typed neighborhood \(N_k(U_t, G_t^{\text{cand}})\) around the update-touched node set \(U_t\) is constructed using a progressive schedule starting at \(k=3\). Within this scoped subgraph, an LLM-mediated structural analysis detects (a) contradictions โ€” pairs \((u,v)\) with overlapping scope and jointly unsatisfiable content (\(\text{Mod}_{H_t}(m(u)) \cap \text{Mod}_{H_t}(m(v)) = \emptyset\)) โ€” and (b) actionable redundancies โ€” same-type entailment pairs not structurally differentiated by the graph. Detected issues trigger schema-conformant repairs.

  3. Delta Reconstruction: The graph change log \(\mathcal{L}_t^G = G_t \triangle G_{t-1}\) drives incremental edits to the deployed textual instruction checkpoint \(\ell_t\), preserving unaffected content and formatting.

The deployed artifact remains plain text; the graph is an offline evolution substrate only.

Key Contributions

  • Graph-regularized substrate for evolving the persistent instruction component of agent context, with scoped structural validation (contradiction + redundancy detection) at each step.
  • Controlled alternating distribution-shift evaluation protocol over 10 batches (Phase A / Phase B intent reweighting) enabling measurement of both within-phase improvement and cross-phase retention via backward transfer (\(\text{BWT}\)).
  • Replicated experiments (five independent runs) comparing GRACE, GRACE without structural analysis (graph ablation), and flat-text HCE baseline โ€” isolating two independent failure modes: contradiction accumulation and uncontrolled substrate growth.

Results

  • GRACE final \(\widehat{\text{pass}}@3\): \(0.673 \pm 0.136\) (checkpoint \(\ell_{10}\))
  • HCE (flat-text baseline) final \(\widehat{\text{pass}}@3\): \(0.191 \pm 0.051\)
  • Zero-shot Gemini 2.5 Flash (shared initial \(\ell_0\)): \(0.091\)
  • Zero-shot Gemini 3.1 Pro (fixed held-out reference, stronger model): \(0.242\)
  • GRACE at final checkpoint exceeds even the stronger Gemini 3.1 Pro zero-shot reference, despite using Gemini 2.5 Flash as the agent model throughout.
  • GRACE without SA (graph substrate, no structural analysis) performs better than HCE but worse than full GRACE, confirming that both structural representation and active validation contribute independently.
  • Evaluation uses 66-task held-out set \(\times\) 3 trials = 198 episodes per checkpoint; results replicated across 5 independent runs.

Limitations

  • Evaluated in a single domain (telecom customer-service from \(\tau^2\)-bench); generalization to other domains/harnesses is not demonstrated.
  • The paper is truncated before the full replication and audit details are presented; ablation scope is limited to three conditions within one fixed harness.
  • LLM-mediated components (edit planner, structural analysis) introduce non-determinism and LLM call overhead not normalized across conditions (internal LLM-call budgets are explicitly not matched).
  • The graph schema (\(|\mathcal{A}|=3\), \(|\mathcal{R}|=3\)) is hand-specified for this domain; schema design choices and their sensitivity are not evaluated.
  • Distribution shift is controlled and synthetic (alternating intent reweighting), which may not capture the diversity of real deployment shifts.
  • Only \(\widehat{\text{pass}}@3\) and \(\text{pass}@k\) metrics are reported; wall-clock cost and token overhead of graph maintenance are not quantified.

Relevance to Agentic AI / LLM Agents

GRACE directly addresses the engineering problem of maintaining reliable agent behavior when the system prompt/playbook must evolve continuously โ€” a central challenge in production agentic systems where models are frozen but task distributions drift. The formalization of the persistent instruction as a typed semantic graph provides a principled answer to why flat-text context evolution degrades: implicit structure makes contradiction detection scale with document length rather than with local change scope. The result that GRACE using a weaker model (Gemini 2.5 Flash) surpasses a stronger zero-shot model (Gemini 3.1 Pro) after evolution is a strong argument for investing in instruction-maintenance infrastructure over model upgrades. This connects directly to lines of work on adaptive memory (Dynamic Cheatsheet, SCOPE, ACE) and positions structured context engineering as a distinct and tractable sub-problem within long-horizon agentic deployment.