TestAgent uses AI to evaluate outputs against criteria or expected values.
The main testing function:
Parameters:
| Parameter | Type | Description |
|-----------|------|-------------|
| output | str | The output to test |
output
str
| expected | str | Optional expected output |
expected
| criteria | str | Optional evaluation criteria |
criteria
Compare output to expected value:
Evaluate against custom criteria:
For more control, use the class directly:
1. Input: Your output + criteria/expected
2. Judge: AI evaluates the output
3. Score: Returns 0-10 score
4. Result: Pass if score ≥ threshold (default: 7.0)