Table of Contents

Property RequiresQueryVector

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

RequiresQueryVector

Gets a value indicating whether the strategy requires a query embedding vector.

bool RequiresQueryVector { get; }

Property Value

bool

true if the strategy uses vector similarity for retrieval; false if 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.

Share