IEvaluationTokenCounter Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Counts the number of tokens present in evaluation prompts that are to be sent to an AI model.
public interface class IEvaluationTokenCounter
public interface IEvaluationTokenCounter
type IEvaluationTokenCounter = interface
Public Interface IEvaluationTokenCounter
Remarks
IEvaluators that rely on an AI model to perform evaluations can use IEvaluationTokenCounter to ensure that the evaluation prompts they use do not exceed the specified InputTokenLimit.
The token counting implementation can vary depending on the AI model that is used. Use the ToTokenCounter(Tokenizer, Int32) extension method to get a IEvaluationTokenCounter from the Tokenizer for a given AI model.
Properties
InputTokenLimit |
The input token limit for the AI model / deployment in use. |
Methods
CountTokens(String) |
Counts the number of tokens present in the supplied |
Applies to
.NET