VectorRetrievalToolOptions
Properties
Section titled “Properties”description?
Section titled “description?”optional description?: string;Custom tool description.
enableAgenticFilters?
Section titled “enableAgenticFilters?”optional enableAgenticFilters?: boolean;Enable agentic metadata filtering. When true, the tool schema includes
a filter parameter that allows the LLM to construct metadata filters
dynamically at query time.
Default: false.
filterableFields?
Section titled “filterableFields?”optional filterableFields?: FilterableFieldDescriptor[];Descriptions of filterable metadata fields. Included in the tool description so the LLM knows which fields exist.
Only relevant when enableAgenticFilters is true.
reranker?
Section titled “reranker?”optional reranker?: Reranker;Optional reranker applied after the initial retrieve(). When provided,
the tool fetches rerankTopK ?? topK * 3 candidates, then passes them
through the reranker and returns the top topK reranked results.
rerankTopK?
Section titled “rerankTopK?”optional rerankTopK?: number;How many candidates to pre-fetch when reranking is enabled.
Default: topK * 3.
retriever
Section titled “retriever”retriever: Retriever;The retriever to use (VectorRetriever, HybridRetriever, RagPipeline, etc.).
Assumptions the caller must satisfy:
- The retriever is already wired to an Embedder + VectorStore pair.
- The retriever’s
retrieve(query, { topK, filter })signature accepts the MongoDB-style VectorFilter used by Kuralle adapters. - Any tenant isolation or access control belongs in
staticFilter, NOT in retriever internals.
staticFilter?
Section titled “staticFilter?”optional staticFilter?: VectorFilter;A static filter applied to every query, merged with any agentic filter via $and. Use this for tenant isolation or access control.
optional topK?: number;Default number of results. Default: 10.