search_corpus
Find relevant information from your knowledge base using semantic search, retrieving document chunks that match your query for accurate answers.
Instructions
Search the agent's corpus for relevant documents using semantic similarity. Returns chunks from ingested PDFs, EPUBs, and documents that match the query. Use this to find information in your knowledge base before answering questions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Natural language search query | |
| agent | Yes | Agent name (e.g., 'scientist', 'ceo'). Determines which filtered corpus to search. | |
| top_k | No | Number of results to return (default: 5, max: 20) | |
| rerank_enabled | No | Whether to apply cross-encoder reranking after FAISS. When true, FAISS fetches a candidate pool (rerank_pool_size) and a cross-encoder produces the final top-k ordering. Off by default; see CLAUDE.md for the latency/quality trade-off. | |
| rerank_pool_size | No | FAISS candidate count fed to the reranker; higher pool = better quality, slower. Default 50. Ignored unless rerank_enabled is true. | |
| rerank_model | No | Override the default reranker model name (default: 'BAAI/bge-reranker-base'). Ignored unless rerank_enabled is true. | BAAI/bge-reranker-base |
| hybrid_enabled | No | Whether to fuse FAISS + BM25 via RRF before (optional) rerank. Off by default. See CLAUDE.md 'Hybrid Retrieval' for when to enable and the latency/quality trade-off. | |
| hybrid_pool_size | No | Candidates fetched from each channel (FAISS and BM25) before fusion; higher = better recall, slightly slower. Default 50. Ignored unless hybrid_enabled is true. | |
| hybrid_k_rrf | No | RRF damping constant (default 60; literature standard). Raising it flattens rank contributions. Ignored unless hybrid_enabled is true. |