Class VectorStoreRetrieverOptions<TRecord>
Everything VectorStoreRetriever<TKey, TRecord> lets a caller change.
public sealed class VectorStoreRetrieverOptions<TRecord>
Type Parameters
TRecordThe MEVD record type the collection holds.
- Inheritance
-
VectorStoreRetrieverOptions<TRecord>
- Inherited Members
Properties
- Filter
Server-side filter. Null, the default, makes the whole collection a candidate.
- MaxCandidates
Upper bound on
Top + Skip. 4096 is vec0'sSQLITE_VEC_VEC0_K_MAX, which is what sub-project 2 enforces; exceeding it throws RagRetrievalFailed naming the limit, rather than surfacing sub-project 2'sKnnLimitExceededthree frames down. A store with no such limit - Qdrant, Azure AI Search - is the one case where the default is arbitrary rather than physical, so it is settable and the refusal names it.
- PreferHybridSearch
Use
IKeywordHybridSearchable<TRecord>when the collection implements it and keywords are present. Default true.It changes the scoring polarity. A collection that implements the interface is scored as Relevance (higher is better); one that does not is scored as Distance (lower is better). That is the whole reason RetrievalScoreKind exists and the reason the retriever re-stamps it after projection.
- RequireHybridSearch
Turn PreferHybridSearch's silent fallback into a refusal. Default false, which is the advisory behaviour: a collection with no keyword lane takes the vector lane and nothing is thrown.
true throws RagCollectionNotSearchable (7203) when the collection does not implement
IKeywordHybridSearchable<TRecord>- and it is the only raise site for that code in the suite. Note what it does not do: a hybrid-capable collection asked a question that produced no keywords still takes the vector lane without error. The option is about the collection's capability, which is static; it is not about whether one particular question survived the stop list, which is not.
- ScoreThreshold
Applied with the correct polarity for the lane actually taken -
Score <= thresholdon the vector lane, where the score is a distance, andScore >= thresholdon the hybrid lane, where it is a relevance. Null means no threshold, and is the default.