Decision Context: Persistent Behavioral Learning for AI Agents

Nima Vahdat, Pashootan VaezipoorarXiv 2026 · arXiv

TL;DR

LLM agents are notoriously "memoryless" when it comes to behavior, often requiring users to repeat the same corrections in every new session. Forge Decision Context (forge_dc) solves this by capturing behavioral signals from human feedback and tool failures, compiling them into imperative "RULE" directives, and injecting them precisely at the decision points where they are needed. It achieves 95% behavioral compliance on a new benchmark while using 10x fewer tokens than standard RAG approaches.

What Problem Does This Paper Address?

While we’ve made great strides in "factual" memory for AI agents (remembering a user's name or favorite programming language), "procedural" or behavioral memory remains a major hurdle. If you tell a security analyst agent to "always check IAM policies before network configurations," it might listen for the rest of the hour, but by tomorrow, it’s back to its old, risky habits.

The authors identify two main gaps:

  1. Loss of Human Corrections: Explicit feedback on strategy or parameters is rarely propagated back to the system prompt.
  2. Loss of Self-Generated Patterns: Agents don't learn from their own "near misses," such as a tool call that failed once but succeeded on a retry.

Current RAG (Retrieval-Augmented Generation) systems struggle here because behavioral guidance is often situational. A rule about S3 scanning is irrelevant during the planning phase but critical during execution. Standard RAG often injects too much irrelevant text too early, leading to the "lost in the middle" phenomenon where the agent ignores the most important instructions.

Methods

The authors propose a four-layer architecture called Decision Context (Figure 1) to transform raw interaction traces into persistent behavior.

Figure 1: Four-layer Decision Context architecture. The dashed arrow is the feedback loop: traces from injected sessions become input to capture.
  • Capture: The system detects human corrections (e.g., "Actually, use the other API") and uses an LLM (Claude 3.5 Sonnet) to self-assess tool-call failures.
  • Store: Instead of flat text chunks, it uses a typed graph. "DecisionNodes" store both local content and the accumulated context of a session, allowing the system to understand the sequence of events.
  • Compilation: This is the "secret sauce." Raw signals are compiled into structured RULE directives. These include the imperative instruction, the type (Format vs. Content), and a "Trigger"—the specific point in a trace where the rule should fire.
  • Progressive Injection: Rather than dumping all memory at the start, forge_dc uses a two-stage approach. Stage 1 injects general formatting rules. Stage 2+ performs "just-in-time" retrieval between tool calls, injecting specific rules only when the agent's current state matches a rule's trigger.

Datasets

The authors introduced DC-Bench, a new benchmark designed specifically to measure behavioral recall and compliance.

  • Composition: 71 scenarios across 9 behavioral dimensions (e.g., Implicit Learning, Conflict Resolution, Temporal Coherence).
  • Methodology: It uses real executed agent traces with "mocked" tools to ensure determinism.
  • Generalization Test: Crucially, the benchmark seeds a correction for one subject (e.g., "Company Acme") and tests if the agent applies that behavioral logic to a different subject (e.g., "Company Beta").

Key Insights and Ideas

  • The "Only Rules Rule": The researchers found that agents follow compiled, imperative directives (e.g., "RULE: You MUST do X") far more consistently than they follow retrieved snippets of past conversations.
  • Formatting vs. Content Retrieval: A major finding was that formatting rules (like "always use USD symbols") have almost zero semantic similarity to the queries they apply to. Standard vector search fails here. forge_dc solves this by tagging rules by type and routing them differently.
  • Placement Matters: Behavioral guidance is highly sensitive to when it appears. Injecting a rule at the exact decision point (between tool calls) prevents the agent from forgetting the instruction during a long multi-step task.
  • Reasoning Can Backfire: Surprisingly, adding a "justification" or reasoning to a rule (e.g., "Do X because of Y") actually decreased performance. It invited the LLM to second-guess the rule rather than simply following it.

Key Results

forge_dc significantly outperformed both factual-memory baselines (like Mem0) and procedural-memory predecessors.

  • Compliance: It reached 95% compliance on DC-Bench, compared to just 55% for naive RAG and 12-15% for standard factual memory systems (Figure 2).
  • Token Efficiency: It is incredibly lean, injecting only 159 tokens per query on average, compared to over 1,600 tokens for naive RAG (Figure 3).
  • Cost: While the "Capture" phase is computationally expensive, the system pays for itself after just four queries due to the massive reduction in per-run token costs (Figure 5).
Table 1: The five Decision Context approaches. Compliance scores are averages across the 71 DC-Bench scenarios (Section 6).
Table 2: Mean compliance (%) by behavioral dimension across 71 scenarios. ctrl = no injection. mem0/zep are factual memory baselines; awm/memp are procedural-memory baselines. Best per row bolded. ∆= forge −naive.

Limitations and Future Work

  • Ablation: The current study evaluates the cumulative system; the authors haven't yet isolated the individual impact of every single component (like conflict resolution vs. triggering).
  • Domain Specificity: DC-Bench currently focuses on two domains (financial analysis and customer support). Expanding this to more diverse agent tasks (like coding or robotics) is a logical next step.
  • Model Dependency: Compliance is still tied to the underlying LLM's ability to follow instructions. As models evolve, the "injection channel" (where the rule is placed in the prompt) may need to be re-validated.
  • Attention Analysis: The authors hypothesize that imperative tokens act as "attention magnets," but they suggest that white-box attention analysis is needed to prove this mechanism.

Summary updated

Abstract

LLM agents do not learn from corrections across sessions. A user fixes the same mistake at the start of every conversation. Existing agent memory systems primarily handle facts, such as preferences, entities, and conversational history, rather than procedural knowledge. We present Forge Decision Context (forge_dc), a system that captures behavioral signals from human corrections and self-assessed tool-call failures, compiles them into imperative RULE directives, and injects them at the decision points where they apply. We evaluate forge_dc alongside four predecessor approaches on DC-Bench, a new benchmark of 71 scenarios across nine behavioral dimensions, built from real executed agent traces in a deterministic mocked-tool environment. forge_dc reaches 95% compliance, up from 55% with naive retrieval, while injecting approximately 10 times fewer tokens per query. Across the five-stage progression, the strongest systems represent behavioral memory as explicit directives and deliver it at the decision points where it applies. The results identify representation, activation, and placement as central design choices for persistent behavioral learning.
BibTeX
@misc{vahdat2026decision,
  author = {Nima Vahdat and Pashootan Vaezipoor},
  title = {{Decision Context: Persistent Behavioral Learning for AI Agents}},
  year = {2026},
  eprint = {2611.08644},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.08644},
}
Figure