OptionalchatWhich chat model to use when asking the question
OptionalchunkHow many chunks to look over. Defaults to 100
OptionalhybridPer-pipeline weights for native hybrid fusion (Mongo $rankFusion.combination.weights). Only
applies when searchMode is 'hybrid' on a backend with native fusion; ignored otherwise.
Each value must be a finite non-negative number; an omitted key defaults to 1 (the MongoDB
default). Useful for A/B evaluating dense-vs-keyword weighting on the same backend.
OptionallimitThe maximum number of results to return
The prompt to search for
OptionalrerankWhich provider's reranker to use for reranking the context. Defaults to 'cohere'.
OptionalsearchSelects how the underlying vector store generates candidates:
'hybrid' (default): fuses dense vector and keyword candidates when the backend supports it
(Mongo Atlas uses $rankFusion; backends without native fusion fall back to dense-only with
the legacy app-side keyword fallback).'vector': dense-only — skips native fusion even on backends that support it.'keyword': embedding-free lexical retrieval; the mechanism is backend-specific. On Mongo Atlas it
is native Lucene BM25 ($search): results are ranked by relevance and term-optional — a partial-term
query still returns its best matches. On Postgres it is a boolean substring filter (ILIKE ALL):
every whitespace-separated term must appear in a chunk as a literal, case-insensitive substring,
matched independently (order, adjacency and relevance are NOT considered), so results are unranked and
for broad terms the returned top-k is arbitrary. Both skip embedding, dense, reranking and the
app-side keyword fallback. Lets an agent (or an eval) target exact tokens — identifiers, names, codes
— that dense retrieval tends to miss.Intended to let A/B evaluations compare dense-only, hybrid and boolean-keyword candidate generation on the same backend.
Specific options for the AI knowledgebase search method.