search_docs
Search indexed local documents by semantic similarity. Submit a natural-language query to retrieve relevant text chunks from your knowledge base.
Instructions
Semantically search the knowledge base for content related to query.
The query is embedded using the same model used during indexing. ChromaDB finds the N most similar chunks using cosine similarity. Lower distance = more relevant.
Args: query: Natural-language question or keyword phrase. n_results: How many results to return (default 5, max 20). source_filter: If non-empty, restrict search to chunks from this specific document (exact filename, e.g. "notes.md").
Returns: Formatted string with matching chunks, their sources, and distances. Returns a helpful message if the knowledge base is empty.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| n_results | No | ||
| source_filter | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |