Property RequiresQueryVector
RequiresQueryVector
Gets a value indicating whether the strategy requires a query embedding vector.
bool RequiresQueryVector { get; }
Property Value
- bool
trueif the strategy uses vector similarity for retrieval;falseif the strategy relies solely on text content.
Examples
IRetrievalStrategy strategy = new Bm25.Bm25RetrievalStrategy();
// BM25 operates on text only, so no embedding is needed.
bool needsVector = strategy.RequiresQueryVector; // false
Remarks
When false, the embedding computation is skipped and the
queryVector parameter in RetrieveAsync(IReadOnlyList<DataSource>, string, float[], int, float, bool, bool, DataFilter, CancellationToken)
will be null.