Table of Contents

Method GenerateHypotheticalAnswerAsync

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

GenerateHypotheticalAnswerAsync(string, LM, HydeOptions, CancellationToken)

Generates a hypothetical answer for the given question.

public static Task<string> GenerateHypotheticalAnswerAsync(string question, LM model, HydeOptions options = null, CancellationToken cancellationToken = default)

Parameters

question string

The question to generate a hypothetical answer for.

model LM

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

options HydeOptions

Configuration controlling the token budget. Defaults are used when null.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<string>

The generated hypothetical answer, or the original question if generation fails.

Exceptions

ArgumentNullException

Thrown when model is null.

Share