
Definition
The mean tokens test ensures that the mean number of tokens in the data is within a given range.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Depending on the application you are building, you might want to limit the number of tokens generated by the LLM.
- LLMs have a limited context window, so it is important to ensure that the number of tokens in the data is within the context window capacity.
Test configuration examples
If you are writing atests.json
, here are a few valid configurations for the character length test: