The Brain · 04.03
Recall & Grounded Answers
Hybrid TF-IDF plus embedding recall with freshness decay, trust weighting, MMR diversification, and citation-or-abstain grounded answers.
'A confident answer with no source is worse than useless'
That line is the design thesis behind brainAskService, the surface that lets you interrogate the workspace Brain directly — "what did we decide about the Salesforce project?" — and get a written, cited answer, or an honest admission that the Brain doesn't know. Most memory products return raw chunks and call it retrieval; this one is required to either ground its answer in specific atoms or say so.
POST /v1/brain/ask
{ "question": "What policy controls outbound followups?", "scope": "workspace" }
Grounding on relevance, not just confidence
A retrieved atom must clear a relevance floor to be allowed to answer at all — a confident-but-topically-unrelated memory must never answer an unrelated question, which is exactly the bug that causes most systems to hallucinate-by-retrieval. Concretely: a hit needs real lexical overlap with the question (at least 0.12) and either a retrieval score above 0.34 or stronger overlap (0.2+) as a substitute. An atom that's confident but irrelevant is rejected outright, so an out-of-domain question correctly falls through to abstention instead of getting an answer that happens to sound plausible.
Diversified, not five near-duplicates
Retrieval blends TF-IDF over text fields with cosine similarity over embeddings, then diversifies the result set with MMR (maximal marginal relevance) at λ = 0.72 — strongly weighted toward relevance, but enough to stop a single dispatch context from being eaten by five near-identical atoms saying almost the same thing. An optional model-based reranker exists for a second, more expensive relevance pass, but it's off by default: the cheap MMR-plus-feature ranking already orders results well, so a per-query model call isn't spent unless an operator explicitly opts in.
Cited, or honestly silent
When enough evidence clears the floor, the answer is synthesized with inline [mem:id] citations tying every claim back to a specific atom. When nothing clears it, the service abstains rather than guessing — and even without a synthesis model configured, it degrades gracefully to a deterministic, fully-cited list of the grounding atoms themselves. Either way, you never get an answer you can't trace back to something the Brain actually knows.
Continue
Writing memory is reconciliation, not append: deterministic extraction, a two-phase Formation Judge (ADD/UPDATE/NOOP), PACER routing, and Feynman repair.
An evidence ledger, versioned sources, claims with an approval workflow, conflict resolution, and per-agent grants — the Brain's organizational-intelligence engine.