Skip to content

VectorRetrievalToolOptions

optional description?: string;

Custom tool description.


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.


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.


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.


optional rerankTopK?: number;

How many candidates to pre-fetch when reranking is enabled. Default: topK * 3.


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.

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.