knowledge_search
knowledge_search
¶
KnowledgeSearchTool — filtered BM25 retrieval with source attribution.
Wraps KnowledgeStore so agents can search ingested documents by text query
and optional provenance filters (source, doc_type, author, date range).
Optionally delegates to a TwoStageRetriever for BM25 + reranking.
Classes¶
KnowledgeSearchTool
¶
KnowledgeSearchTool(store: Optional[KnowledgeStore] = None, retriever: Optional['TwoStageRetriever'] = None)
Bases: BaseTool
Search the knowledge store using filtered BM25 retrieval.
Results include source attribution so agents can cite provenance.
When a TwoStageRetriever is supplied it is used in place of the
store's direct retrieve method, enabling optional semantic reranking.