Skip to main content

recall_from_store

Function recall_from_store 

Source
pub fn recall_from_store(
    store: &dyn ExperienceStore,
    query: &RecallQuery,
    policy: &RecallPolicy,
) -> Result<Vec<RecallCandidate>, ExperienceStoreError>
Expand description

Pull recall candidates from an ExperienceStore.

First implementation: scans the ledger for recall-relevant records (user overrides, user approvals, failed engine outcomes), maps each to a RecallCandidate, applies policy.min_score_threshold and prior_weight, then trims to the smaller of query.top_k and policy.max_k_total.

Semantic ranking by embedding similarity is intentionally deferred — the goal here is to wire planning to history end-to-end. Ranking by recency is a placeholder that will be replaced once a recall provider is in place.