Effective confidence (weakest-link)
The effective confidence of a memory is:
effective = min(declared_confidence, chain.min_confidence)
A high-confidence claim derived from a low-confidence ancestor cannot outscore its weakest link. This is memledger's most opinionated guarantee — and the reason multi-agent flows that pass through memledger don't quietly hallucinate at scale.
The contamination cascade we prevent
Without weakest-link bounding:
- Triage agent writes a hedged guess at confidence 0.30.
- Diagnosis agent reads it, derives a fix, declares confidence 0.85.
- Action agent reads the fix, declares confidence 0.95 to apply it.
Downstream consumers see a 0.95 claim. Its actual provenance bottoms out at 0.30. No one along the way did anything wrong individually — but the system is now confidently wrong.
memledger computes effective = min(0.95, 0.85, 0.30) = 0.30 and the confidence gate filters or flags it.
What counts toward chain.min_confidence
memledger walks the derived_from DAG up to max_hops (default 5) and takes the minimum confidence across every ancestor. hedged=True is not applied to the chain-walk math — it surfaces as context for downstream consumers and deducts 5 points from the Memory Quality Score.
What this is not
- It is not Bayesian probability propagation. memledger does not multiply or average confidences along chains — that math compounds noise. We take the minimum.
- It is not a substitute for retrieval ranking. Vector similarity still ranks; effective confidence gates.
Tuning
The gate has three thresholds — see Confidence flags. Defaults are min_threshold=0.4 and flag_threshold=0.6; override per search() call, on the instance, or globally in memledger.yaml.
| Tier | Effective confidence | What happens |
|---|---|---|
| PASS | ≥ 0.6 | Returned normally |
| FLAG | 0.4 – 0.6 | Returned with a confidence_flag="FLAG" attribute |
| FILTER | < 0.4 | Excluded from results |
Tune empirically against your domain; the MAI rubric gives you a measurable signal for whether your thresholds are too loose or too strict.