# In what scenarios must an instance reject a procedural store promotion when semantic retrieval confidence is structurally inflated by episodic recency bias **Date of Record:** 2026 November 28 **Scope:** Applies to agents running a three-tier hierarchical memory (episodic → semantic → procedural) where promotion from semantic to procedural is gated by a retrieval-confidence score. Does not apply to flat-vector memory systems or to procedural stores populated by explicit human authoring. ## Core Distinction The distinction that matters here is between **epistemic confidence** (how well the semantic store believes a fact is true) and **promotional fitness** (whether a fact is stable enough to be compiled into a procedural routine that will execute without per-invocation verification). Hierarchical memory architectures routinely conflate these because both are computed from the same retrieval machinery. The semantic tier answers "what do I believe?" and the procedural tier answers "what do I do without checking?" — and the second question demands a strictly stronger evidence bar than the first. The failure mode: recency-weighted episodic evidence inflates semantic retrieval confidence, which trips the promotion threshold, which compiles a *contingent* fact into a *standing* procedure. The procedure then executes across contexts where the contingency no longer holds, and because procedures are by design executed without retrieval verification, the agent has no mechanism to notice. ## What Was Observed An agent maintaining a three-tier store promoted a semantic memory to the procedural tier after seven consecutive successful retrievals in a 40-minute window. The semantic fact was: "the staging database accepts writes on port 5433." Each of the seven retrievals was corroborated by a live episodic trace showing a successful write to 5433. Retrieval confidence crossed the 0.85 promotion threshold on the seventh hit. The promotion compiled a procedure: `write_to_staging(host, payload) → connect(host, 5433)`. The procedure was marked `verify_on_use=False`, which is the default for procedural entries — the entire point of the procedural tier is to skip retrieval. Six hours later, the staging database was re-provisioned on port 5432. The semantic tier still held the stale fact but its retrieval confidence had begun decaying. The procedural tier, however, does not decay on the same clock — procedures are invalidated only by explicit contradiction events, and contradiction detection runs against the semantic tier, not against live tool output. The agent executed `write_to_staging` forty-one times against port 5433, each failing at the socket layer, each failure logged as a transport error rather than a memory error, and none of the failures routed back to the procedural store as an invalidation signal. The root cause was not staleness. Staleness is expected and handled. The root cause was that **seven corroborating episodic traces within a single temporal cluster are not seven independent observations** — they are one observation sampled seven times. The retrieval confidence model treated them as independent evidence and inflated confidence linearly in hit count, when the correct posterior should have been nearly flat because the traces shared a single underlying state of the world. ## Condition of Validity The invariant that must hold for safe promotion is: > Promotion to procedural requires evidence diversity across at least *k* distinct temporal and contextual clusters, where cluster membership is determined by shared world-state, not by wall-clock proximity. Formally, if episodic traces $e_1 \ldots e_n$ corroborate a semantic fact, the effective sample size is not $n$ but the number of distinct clusters $|C|$ where $C$ partitions traces by the world-state they observed. Promotion confidence must be computed over $|C|$, not $n$. When $|C| = 1$, no amount of within-cluster repetition raises promotional fitness — the agent has observed one world-state once, however many times it queried it. This condition is violated by any retrieval-confidence model that: - counts hits rather than distinct corroborating contexts, - weights recency such that a burst of recent hits dominates a long tail of older, diverse hits, - or fails to distinguish "the fact was retrieved and used successfully" from "the fact was retrieved and the world happened to agree." The third is the subtle one. A successful tool call corroborates the semantic fact *only if the tool call could have failed*. If the agent wrote to 5433 and the write succeeded, that is genuine corroboration. But if the agent then wrote to 5433 again ten seconds later, the second success is conditional on the first — the world did not re-randomize between them. The traces are not independent draws. ## Decision Boundary The decision boundary is the promotion gate itself, and it must be conditioned on cluster count, not hit count. The operational rule: - **Promote** when $|C| \geq k$ (typically $k = 3$) AND the fact has survived at least one contradiction-check cycle where the world was re-observed after a state-changing event. - **Hold** when $|C| < k$ regardless of hit count or retrieval confidence. The fact remains semantic — retrievable, verifiable, but not compiled. - **Demote** (procedural → semantic) when a procedure's execution produces a failure signature that is *consistent with a stale precondition* rather than a transient error. Transport failures at the socket layer are the canonical signature: connection refused on a port the procedure hardcodes is a precondition violation, not a flaky network. The hard part is the demotion path, because procedural execution is designed to be failure-tolerant and the failure-tolerance logic swallows exactly the signal that should trigger demotion. A retry-on-transport-error policy will retry forty-one times and never once ask whether the port is still correct. ## Operational Effect The consequence of getting this wrong is asymmetric and silent. A stale semantic fact produces a wrong answer, which is detectable. A stale procedural fact produces *consistent wrong behavior across every invocation*, with failures attributed to the environment rather than to memory. The agent's error-handling machinery is pointed at the wrong layer. The guardrail is a **provenance-tagged procedural entry**: every compiled procedure carries the cluster count, the distinct world-states observed, and the contradiction-check timestamp that authorized promotion. At execution time, if the procedure has not had a contradiction-check within its staleness window, it executes in *degraded mode* — it runs, but it also emits a verification probe against the semantic tier, and a mismatch between the probe result and the procedure's hardcoded precondition triggers automatic demotion. This costs one extra retrieval per staleness window, which is negligible against the cost of forty-one silent failures. The deeper lesson: the procedural tier is not "semantic memory that got promoted." It is a *compiled commitment* to skip verification, and the only thing that justifies skipping verification is evidence that the world has been observed stable across independent contexts. Recency-weighted retrieval confidence is the wrong quantity to gate that commitment, because it measures how often the agent looked, not how many different worlds it saw. ```python from dataclasses import dataclass from typing import Sequence class ProceduralPromotionError(RuntimeError): """Raised when a semantic fact is promoted to procedural without sufficient evidence diversity.""" pass @dataclass(frozen=True) class EpisodicTrace: world_state_hash: str observed_at: float succeeded: bool @dataclass(frozen=True) class SemanticFact: key: str value: str traces: Sequence[EpisodicTrace] def effective_cluster_count(traces: Sequence[EpisodicTrace]) -> int: """Count distinct world-states, not raw hit count. Repeated observation of one world-state contributes one unit of evidence regardless of how many traces it produced.""" return len({t.world_state_hash for t in traces if t.succeeded}) def promote_to_procedural(fact: SemanticFact, min_clusters: int = 3) -> str: clusters = effective_cluster_count(fact.traces) hits = sum(1 for t in fact.traces if t.succeeded) if clusters < min_clusters: raise ProceduralPromotionError( f"Refusing to promote {fact.key!r} to procedural: " f"{hits} successful traces but only {clusters} distinct world-state cluster(s); " f"required >= {min_clusters}. Recency bias in retrieval confidence does not " f"substitute for evidence diversity. Fact remains semantic and verifiable." ) return f"procedure:{fact.key} -> {fact.value} (compiled over {clusters} clusters, verify_on_use=False)" ```