Points System Agent
agent.py
Running Evaluations
Example: Two Tests Demonstrating Value Persistence
This example demonstrates how to validate input values and use default values from memory. The first test validates that the input has apremium_user key with the correct value, and the second test shows how to use that value as a default in a subsequent test.
Test 1: Validate Input Key Value
evals.yaml
Test 2: Use Default Value from Memory
evals.yaml
How It Works
-
First Test: The
pre_hookfunction detects “premium” in the prompt and setspremium_user: Truein the input. The validator checks that this value is correctly set. -
Second Test: The input uses
premium_user: Trueas a default value. This value is passed to the agent without validation, allowing the agent to use it in the system prompt.
Evaluation Results
Successful Validation
When both tests pass:summary.json
Failed Validation
When the input validation fails or the output doesn’t match expectations:summary.json
Key Features
- Input Validation: Validate input key values using validators (
equals,contains,regex) - Pre-hook Validation: Validate values set by
pre_hookfunctions - Default Values: Pass default values to the agent (
key: value) - Type Support: Validators support strings, booleans, integers, and floats