cuba_faro
Search long-term agent memory before answering to ground responses. Verify claims against evidence, filter results by time, and get grounding scores.
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. Optional MMR diversification, OOD abstention and an exact tiktoken-based token 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 | Cross-encoder rerank top-50 → top-K with bge-reranker-v2-m3. Auto-enabled when CUBA_MODE=completo, or when this build has a real GPU provider active (CUDA/DirectML compiled in AND a working device). Off by default everywhere else, even with the model on disk: on CPU it costs 60-110s and blows the search budget. Explicit true/false always wins; run `cuba-memorys doctor` to see which reason applies here. | |
| diversify | No | 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 | MMR balance — 1.0 pure relevance, 0.0 pure diversity. Default 0.7. | |
| abstain_ood | No | Abstain (return empty results with abstain_reason) when the query is out-of-distribution via Mahalanobis distance. Default false. | |
| associative | No | Multi-hop expansion: 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. Default false. | |
| enable_bm25 | No | 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 | 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. |