Most AI memory layers have a hidden assumption baked so deep that nobody states it out loud: everything in the store is true with confidence 1.0. A user says something once, it gets written, and from then on the agent treats it as certain fact, forever, with no way to express doubt and no way to forget.

That assumption is fine until the first wrong thing gets in. And in any real system, wrong things get in: a misheard transcript, a sarcastic remark taken literally, a preference the user has since changed. The moment one of those lands in a store that only knows the value 1.0, you have a confidently-stated lie that the agent will repeat until you manually delete the row. There is no graceful degradation, because the model has no concept of how sure it is.

The two failure modes of binary memory

Treating memory as a set of true/false rows produces two opposite failures, and you will hit both.

Over-confidence. A single mention becomes gospel. "I'm thinking about going vegetarian" gets stored as "user is vegetarian," and three months later the agent is still refusing to suggest a steakhouse. The system cannot distinguish "the user firmly told me this five times" from "the user mentioned it once, hedged."

Permanence. Facts never expire. People change jobs, cities, partners, and preferences. A store with no decay keeps asserting last year's truth with this year's confidence. The longer your agent runs, the more of its "knowledge" is quietly stale, and nothing in the data tells you which parts.

Both failures come from the same root: a fact is not a boolean. A fact is a belief with a confidence that should move as evidence arrives and fade when evidence stops.

Model each fact as a Beta distribution

There is a clean, cheap way to represent "how sure am I" that has been standard in statistics for a century: the Beta distribution. You track two numbers per fact, alpha and beta, loosely "evidence for" and "evidence against." The confidence is just alpha / (alpha + beta).

The open-source speech-act-memory-gate ships this as a small trust model alongside the ingest gate. A new belief starts at Beta(2, 2):

import { newBelief, confirm, contradict, confidence } from "speech-act-memory-gate";

let b = newBelief();   // confidence 0.5 — genuinely unsure, NOT 1.0
confidence(b);         // 0.5

That starting value of 0.5 is the whole philosophy in one number. A fact mentioned exactly once is a coin flip, not a certainty. Compare this to the implicit model in extract-then-store stores, where the first observation pegs confidence to 1.0 and there is nowhere left to go.

Evidence moves the number

When the user restates a fact, you confirm it. When they deny or correct it, you contradict it. The numbers shift accordingly:

let b = newBelief();          // 0.5
b = confirm(b);               // user restated it
confidence(b);                // 0.75 — more sure

b = contradict(b);            // user denied it
confidence(b);                // drops sharply

Notice the design choice in the README's numbers: a contradiction counts more than a confirmation. This asymmetry is deliberate and it matters. Being told "no, that's wrong" is much stronger evidence than yet another casual agreement. A memory system that weighs them equally is slow to correct its own mistakes, which is exactly when speed matters most. When a user bothers to correct your agent, they have already noticed it is wrong; the system should believe them fast.

Decay: old facts should lose certainty

The second half of the model is time. Beliefs that go unreinforced should drift back toward the prior, not sit at full confidence forever:

import { decay } from "speech-act-memory-gate";

b = decay(b, { halfLifeMs: 90 * 864e5 });  // ~90-day half-life

A fact you have not heard about in months is not as trustworthy as one the user mentioned yesterday, and the data should say so. Decay encodes "I used to be sure about this" without forcing a binary delete. The exception is human-verified facts: mark a belief as pinned and it never decays, because a person explicitly confirmed it. Everything inferred from passing conversation is allowed to fade.

Let confidence drive how you speak

Here is where a confidence model stops being statistical hygiene and starts changing the user experience. Once every fact carries a number, you can choose how to phrase recall based on how sure you are. The gate exposes this directly:

import { stance } from "speech-act-memory-gate";

stance(b);   // "assert" | "hedge" | "withhold"

Three tiers, three voices. Assert the facts you actually trust ("You're allergic to hazelnuts, so I skipped that recipe"). Hedge the ones you are unsure about ("I think you mentioned preferring window seats?"). Withhold the ones below threshold entirely, rather than stating a coin-flip as fact. This single mechanism is the difference between an agent that feels attentive and one that feels like it is making things up, because the unsure things now sound unsure instead of sounding certain.

What this costs you to adopt

Almost nothing, which is the point. If you already have a facts table, you add three columns: alpha, beta, last_updated, plus an optional pinned flag. On write, attach a fresh belief. On a restate or correction, call confirm or contradict instead of inserting a duplicate row. On recall, read stance and phrase accordingly. No new infrastructure, no model calls, no vector index changes. It is arithmetic on two integers.

// schema delta is tiny:
// facts(user_id, text, alpha, beta, last_updated, pinned)

const d = gate(userMsg);
if (d.action === "store") {
  const b = d.belief;   // fresh Beta(2,2)
  db.run(
    "INSERT INTO facts (user_id, text, alpha, beta, last_updated) VALUES (?,?,?,?,?)",
    userId, userMsg.trim(), b.alpha, b.beta, b.lastUpdated
  );
}

The takeaway

Binary memory is the reason long-running agents drift from helpful to unreliable. They accumulate single-mention "facts" they treat as certain and never let any of them fade. A confidence model fixes both ends at once: new facts start unsure and earn trust through repetition, old facts lose trust through silence, and corrections land hard and fast. Represent each fact as a Beta belief, let the number drive whether you assert, hedge, or withhold, and your agent starts sounding like it knows the difference between what it knows and what it merely once heard.

The trust model and the ingest gate are free and Apache-2.0: github.com/muninnravenbot-ux/speech-act-memory-gate. Want this adapted to your store and your domain's confidence rules? That is our work at Croworkhello@crowork.ai.
Read next
Why Your AI's Memory Stores Your Questions as Facts →