Expand description
MemReader write quality gate (#3222).
QualityGate runs after A-MAC admission and before any persistence write.
It scores three signals — information value, reference completeness, and contradiction
risk — and rejects writes below a configurable threshold.
Rule-based scoring ships as MVP; an optional LLM-assisted path is enabled by setting
quality_gate_provider in [memory.quality_gate].
§Composition in SemanticMemory
remember(content)
→ A-MAC::evaluate() → Ok(None) if rejected
→ QualityGate::evaluate() → Ok(None) if rejected
→ SQLite / Qdrant persist§Fail-open contract
Any scoring failure (embed error, LLM timeout, graph query error) is treated as a pass — the write is admitted. Quality scoring is best-effort, never a hard dependency.
Structs§
- Quality
Gate - Write quality gate that runs after A-MAC admission.
- Quality
Gate Config - Configuration for the write quality gate (
[memory.quality_gate]TOML section). - Quality
Score - Per-signal scores from the quality gate evaluation.
Enums§
- Quality
Rejection Reason - Reason for a quality gate rejection.
Functions§
- compute_
reference_ completeness - Compute
reference_completenessas1.0 - unresolved_reference_ratio.