knowledge_search
Search stored documents using hybrid semantic and keyword ranking to retrieve relevant chunks with scores; tune alpha or enable explain to diagnose and balance results.
Instructions
Hybrid semantic + keyword search over stored documents. Returns chunks ranked by relevance with scores. Set explain to see per-leg scores (vector cosine, keyword BM25, RRF contribution) and diagnose ranking. Optional alpha (0..1) tips the balance: 0 = keyword-only, 1 = vector-only, in between blends 'alpha * cosine + (1-alpha) * BM25'. Default uses Reciprocal Rank Fusion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | Directional blend 0..1 (0 = keyword, 1 = vector); omit for default RRF hybrid | |
| query | Yes | ||
| top_k | No | ||
| doc_id | No | Only search within this document | |
| source | No | Only search documents with this source (e.g. 'opencode-db', 'session-log') | |
| explain | No | Include per-leg vector/keyword/RRF scores on every hit | |
| min_score | No |