cuba_faro
Search memory before answering to ground responses. Verify mode checks claims against evidence with confidence levels.
Instructions
Search memory BEFORE answering to ground responses. Returns grounding scores. Mode 'verify' checks claims against evidence (confidence: verified/partial/weak/unknown). Session-aware: boosts results matching active session goals. Supports temporal filtering. v0.9: optional MMR diversification + OOD abstention + exact tiktoken-based budget.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Search mode (default: hybrid). 'verify' checks if claim is grounded. | |
| tags | No | Filter observations by tag keyword (exact match against auto-extracted tags) | |
| after | No | ISO8601 datetime — return results created after this time | |
| limit | No | Max results (default 10, max 50) | |
| query | Yes | Search text | |
| scope | No | Where to search (default: all) | |
| before | No | ISO8601 datetime — return results created before this time | |
| format | No | Response format. compact (DEFAULT): abbreviated keys — e=entity, c=content, t=type, i=importance, s=score. 71% fewer tokens (798 vs 2787 at limit=10, measured). verbose: full key names, only when you need every field. | |
| rerank | No | v0.9.2: cross-encoder rerank top-50 → top-K with bge-reranker-v2-m3 (Xiao 2023). Auto-enabled when CUBA_RERANKER_PATH points to a valid ONNX. Identity fallback otherwise. | |
| diversify | No | v0.9: post-RRF MMR pass that penalizes near-duplicates among top-K. Default false. | |
| max_tokens | No | Token budget for results (default 5000). Counted exactly via tiktoken cl100k_base. | |
| mmr_lambda | No | v0.9: MMR balance — 1.0 pure relevance, 0.0 pure diversity. Default 0.7. | |
| abstain_ood | No | v0.9: abstain (return empty results with abstain_reason) when query is out-of-distribution via Mahalanobis distance. Default false. | |
| associative | No | v0.11: multi-hop expansion (HippoRAG-style). Seeds spreading activation from query-matched entities and pulls in observations on graph-connected entities that no lexical/vector signal surfaced. Additive — never lowers a base hit. Measured +10pts recall@10 on the smoke set. Default false. | |
| enable_bm25 | No | v0.9: enable BM25 (ts_rank_cd) as third RRF signal alongside text + vector. Catches queries with rare terms that dense embeddings miss. Default true. | |
| ood_threshold | No | v0.9: Mahalanobis distance threshold for abstention. Defaults to sqrt(chi2_0.99(d)), which scales with the embedding dimension (~21.25 for d=384). Override only if you calibrated on your own corpus. |