Current
Reviewed workflows and cached answers
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.
Reviewed workflow indexes match new requests to approved intents. Policy thresholds independently control speculative retrieval and direct cached-response reuse.
How it works
Build an index from reviewed workflow intent vectors. At query time, compute normalized similarity, retain only workflows whose dependencies are authorized, and choose the best match with stable ties. Crossing the lower threshold may start retrieval speculatively; crossing the higher threshold only makes reuse eligible. A cached response is returned only after its exact evidence dependencies pass freshness checks. Similarity never overrides ACL or revision failure.
0.00run normally
0.72start retrieval
0.95consider reuse
1.00
from mari_components.trajectories import (
WorkflowPolicy, build_reviewed_workflow_index, decide_reviewed_workflow,
)
index = build_reviewed_workflow_index(reviewed_workflows)
decision = decide_reviewed_workflow(query_vectors, index, current_revisions,
policy=WorkflowPolicy(speculation_threshold=0.72, cache_threshold=0.95),
allowed_document_ids=authorized_document_ids)
Related APIs: match_reviewed_workflow, start_speculative_retrieval, match_cached_response, and workflow_freshness. Reuse requires a strong match plus fresh, authorized dependencies.
Research basis
GPTCache: semantic caching for language-model queriesBuild Systems à la Carte: dependency-valid reuse
The two thresholds, authorization gate, and exact freshness condition are Mari policy.