Optional topKMaximum number of chunks per query.
Optional targetSet of explicit data sources to query.
Optional targetMemory categories to consult (maps to data sources via config).
Optional metadataMetadata filter applied at the vector-store layer.
Optional strategyRetrieval strategy (defaults to similarity search).
Optional strategyStrategy-specific parameters (MMR lambda, hybrid alpha, etc.).
Optional mmrOptional hybridOptional custom?: Record<string, any>Optional rerankerCross-encoder reranking configuration.
When enabled, retrieved chunks are re-scored using a cross-encoder model for improved relevance ranking. Disabled by default due to added latency.
Recommended use cases:
NOT recommended for real-time chat (latency sensitive).
Optional enabled?: booleanEnable cross-encoder reranking. Default: false
Optional modelReranker model ID (e.g., 'rerank-v3.5', 'cross-encoder/ms-marco-MiniLM-L-6-v2')
Optional providerProvider ID ('cohere', 'local')
Optional topN?: numberNumber of top results to return after reranking
Optional maxMax documents to send to reranker (limits cost/latency). Default: 100
Optional timeoutRequest timeout in ms. Default: 30000
Optional params?: Record<string, any>Provider-specific parameters
Optional includeInclude chunk embeddings in the response.
Optional queryQuery embedding model override.
Optional hydeHyDE (Hypothetical Document Embedding) configuration. When enabled, generates a hypothetical answer before embedding for improved retrieval quality. Adds one LLM call per retrieval.
Optional enabled?: booleanEnable HyDE for this retrieval. Default: false.
Optional initialInitial similarity threshold for adaptive thresholding. Default: 0.7.
Optional minMinimum threshold to step down to. Default: 0.3.
Optional hypothesis?: stringPre-generated hypothesis (skip LLM call if provided).
Optional tokenAdvisory token/character budget for final context construction.
Optional userCaller identity for logging/billing.
Optional includeWhen true, generates a RAGAuditTrail with per-operation transparency.
Options controlling retrieval behavior.