Property MaxCompletionTokens
MaxCompletionTokens
Gets or sets the maximum number of tokens allocated for the query variant generation step.
public int MaxCompletionTokens { get; set; }
Property Value
- int
The maximum token count. Default is
256.
Examples
using var chat = new RagChat(ragEngine, chatModel);
chat.QueryGenerationMode = QueryGenerationMode.MultiQuery;
// Increase the token budget if variants are being truncated.
chat.MultiQueryOptions.MaxCompletionTokens = 512;
Remarks
This controls the output length of the generation step. Each variant is typically a single sentence, so the default budget is sufficient for most use cases.