locus_retrieve
Retrieve local-file passages with BM25 or hybrid re-ranking, apply metadata and temporal filters, and get provenance-tagged results for explainable search.
Instructions
BM25 retrieval (SQLite FTS5) with an optional re-rank of the BM25 candidates by KG entity expansion, link walking, frontmatter structural matching, recency and link popularity (mode='hybrid', weighted RRF). Default mode is 'bm25'; passing as_of selects 'hybrid'. Deterministic. Each result carries a provenance tag (bm25 / kg / link:hopN / structural / recency / link_pop).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "locus_retrieve"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | bm25 (default) or hybrid re-rank. | |
| as_of | No | Temporal filter YYYY-MM-DD. | |
| limit | No | ||
| query | Yes | ||
| track | No | Record hits in the hot-context bulletin (set false for a pure read). | |
| intent | No | ||
| parent | No | Return the enclosing section or whole document of the matched chunks (parent-child retrieval); each result's `spans` cite the matched passages by character offset. | |
| filters | No | Restrict results by source-document metadata. Keys: path / exclude_path (glob or list), type (str or list), tags (all of), tags_any (any of), date_from / date_to (YYYY-MM-DD on frontmatter `date`), as_of (in force on that date; honours `supersedes`), meta ({field: value} or {field: {op: value}}, ops eq ne in nin gt gte lt lte contains exists). | |
| expansion | No | LLM-free query expansion (RM3 pseudo-relevance feedback). Off by default. | |
| use_links | No | ||
| store_path | No | .locus | |
| full_content | No |