semantic_search
Search indexed source and docs for semantically relevant matches, using blended lexical and vector scores for accurate retrieval.
Instructions
Search indexed source and docs. score is a blended relevance score combining BM25 lexical rank and (when an embedding model is installed) vector cosine similarity; pass explain=true for the per-component breakdown. Each hit carries retrieval_mode ('lexical', 'vector', or 'hybrid') so you can tell whether embeddings contributed without explain. Hits are validated against current source. Falls back to BM25-only (every hit 'lexical') when no embedding model is present. When a hit's symbol has a distilled decision record (the model's resolved root-cause / decision / outcome over the tracker thread that shaped it), it rides along as distilled_records — labeled unreviewed, capped at 2; empty for almost every hit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| explain | No | ||
| include | No | What to include: `git`, `papertrail` (both on by default), `generated`, `fallback` (off by default). Omit to keep defaults; an explicit list is the exact on-set. | |
| worktree | No | Absolute path of the checkout to scope reads to — pass a linked worktree to read its branch overlay. Defaults to the server's working directory. A path that is not a linked worktree of this repo is silently ignored: results then come from the indexed checkout, with no error. | |
| graph_limit | No | ||
| include_graph | No | compact |