Property MaxCompletionTokens
MaxCompletionTokens
Gets or sets the maximum number of tokens allocated for the reformulated query.
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.Contextual;
// Increase the token budget for complex multi-part reformulations.
chat.ContextualizationOptions.MaxCompletionTokens = 512;
Remarks
This controls the output length of the reformulation step. Most reformulated queries are short, but complex multi-part questions may require a higher budget.