Performance
Total tokens
Definition
The total tokens test ensures that the total number of tokens in the data is within a given range.
Taxonomy
- Category: Performance.
- 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 a tests.json
, here are a few valid configurations for the character length test:
Related
Was this page helpful?