Skip to main content
Parameters in params become part of the agent’s input, and you can only validate the resulting output response.

Example

This example demonstrates how to pass input parameters to the agent and validate the output. The premium_user parameter is passed via params and becomes part of the agent’s input, which can be accessed in the system prompt function.

Eval Configuration

evals.yaml

Agent Implementation

agent.py

Running Evaluations

How It Works

  1. Parameters: The premium_user: True parameter is passed via params and becomes part of the agent’s input.
  2. System Prompt: The get_system_prompt() function accesses the premium_user value from the input using get_run_context() and builds the system prompt dynamically.
  3. Output Validation: The output is validated to ensure it contains “10” (the points for premium users).

Evaluation Results

The CLI displays pytest-style output with pass/fail status:
When validation fails, the CLI shows detailed error information:

Key Features

  • Input Parameters: Pass parameters directly to the agent via params - these become part of the agent’s input
  • Dynamic System Prompts: Use callable functions for system_prompt to access input parameters and build prompts dynamically
  • Output Validation: Validate agent responses using output validators - input parameters cannot be validated directly