Spec
Recall Pipeline
What this page covers
The recall pipeline retrieves semantically relevant facts for agent queries. It runs three independent retrieval stages, fuses their results with salience signals, and packs the output within a caller-specified token budget using Maximal Marginal Relevance (MMR).
Audience: engineers building recall-capable agents or contributing to the recall subsystem (Spec-X11-Recall-Graph).
Pipeline overviewโ
Salience signalsโ
Applied during the fusion step to adjust raw retrieval scores:
exp(-0.01 ร age_days)fact.confidencelog(1 + access_count) / log(1 + max_access_count)0.5 + 0.5 ร t (maps [0,1] โ [0.5,1.0]).Security: ANN scope filterโ
Stage 2 ANN results MUST be joined back against facts and filtered by the caller's scope and garden ACL before fusion.
vec_facts holds embeddings for all scopes with no scope column.
Without this filter, facts from unauthorized gardens could leak into
the response.
Exampleโ
curl -X POST http://localhost:8765/v1/recall \
-H "Authorization: Bearer $KEY" \
-d '{
"query": "What is Alice'\''s current role?",
"scope": "company",
"token_budget": 2000,
"weights": {"lexical": 0.3, "vector": 0.5, "graph": 0.2}
}'