Table of Contents

Method GenerateQueryVariantsAsync

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

GenerateQueryVariantsAsync(string, LM, MultiQueryOptions, CancellationToken)

Generates alternative query variants for the given question. The original question is always included as the first element.

public static Task<List<string>> GenerateQueryVariantsAsync(string question, LM model, MultiQueryOptions options = null, CancellationToken cancellationToken = default)

Parameters

question string

The question to generate variants for.

model LM

The language model used for variant generation. Must not be null.

options MultiQueryOptions

Configuration controlling variant count and token budget. Defaults are used when null.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<List<string>>

A list of queries starting with the original question followed by generated variants. On failure, returns a single-element list containing only the original question.

Exceptions

ArgumentNullException

Thrown when model is null.

Share