Method GenerateQueryVariantsAsync
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
questionstringThe question to generate variants for.
modelLMThe language model used for variant generation. Must not be
null.optionsMultiQueryOptionsConfiguration controlling variant count and token budget. Defaults are used when
null.cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<List<string>>
A list of queries starting with the original
questionfollowed by generated variants. On failure, returns a single-element list containing only the original question.
Exceptions
- ArgumentNullException
Thrown when
modelisnull.