Current
Freshness and impact
Benchmark first
Corpora: FEVER · FEVEROUS · ContraDoc · FreshQA
Protocol: Report verdict macro-F1 and accuracy separately from evidence precision/recall/F1 and contradiction localization. Pin corpus and source revisions. Replay corrections and removals, then measure stale-answer rate, time-to-consistency, unsupported-answer rate, and authorization leakage. A correct label without the complete evidence set does not pass the evidence contract.
Freshness is an exact dependency comparison. It answers “did an input revision change?”—not “is the answer still semantically correct?”
How it works
Record dependencies. Every derived artifact stores the document or section revision used to build it.
Select comparison granularity. If a dependency names a section and the caller supplies a section-revision map, compare section hashes. Otherwise compare the containing document revision as a conservative fallback.
Classify every key. Missing document/section →
missing; empty expected/current revision →unversioned; unequal revisions →stale; otherwise →current.Reduce deterministically. Overall precedence is
missing > unversioned > stale > current. Changes and IDs are sorted, so the same inputs produce the same report.Propagate impact.
impacted_artifactsevaluates each artifact independently and returns only non-current artifacts. Mari reports the set; the application chooses whether to regenerate, review, or retire them.
Policy answerdepends on § window

§ window30 → 45 days

Refresh queueonly affected artifacts
1 · missingsource or section absent2 · unversionedcannot compare safely3 · stalerevision differs4 · currentall revisions equal
from mari_components.knowledge import (
FreshnessStatus, assess_dependencies, assess_freshness,
impacted_artifacts,
)
report = assess_freshness(answer.evidence, current_revisions,
current_section_revisions=current_sections)
if not report.reusable:
refresh(report.changes, report.missing_dependency_ids)
stale = impacted_artifacts(dependencies_by_artifact, current_revisions,
current_section_revisions=current_sections)
Document edit versus affected section
# The document changed v1 → v2, but the cited section is still s1.
current_revisions = {doc_id: "v2"}
current_sections = {(doc_id, "refund-window"): "s1"}
fine = assess_dependencies(deps, current_revisions,
current_section_revisions=current_sections)
assert fine.status == FreshnessStatus.CURRENT
coarse = assess_dependencies(deps, current_revisions)
assert coarse.status == FreshnessStatus.STALE # safe fallback
Operational consequenceSection hashes avoid regenerating an answer when an unrelated section changed. Omitting the section map intentionally increases false-positive refreshes rather than risking stale reuse. Only current sets report.reusable to true.
Research and standards
Build Systems à la Carte: dependency-driven recomputationRAG: updateable non-parametric knowledge and provenanceW3C PROV: revision and derivation
Mari applies build-system invalidation to knowledge artifacts. Status precedence, section fallback, and reuse policy are explicit Mari contracts, not semantic change detection.