Skip to main content
Applies to:
  • Plan:
  • Deployment:
Summary To pass configurable values from the playground UI to remote eval task functions, use the parameters system in your Eval() configuration. Define parameters with type definitions, descriptions, and defaults, then access them within task functions using hooks.parameters.get(). Orchestration settings like experiment_name and max_concurrency control eval execution but are not exposed through hooks.

Configuration Steps

Step 1: Define parameters in Eval configuration

Add parameters with type, description, and default values to your Eval() call.
from braintrust import Eval

Eval(
    "My Project",
    task=task,
    scores=[...],
    parameters={
        "experiment_label": {
            "type": "string",
            "description": "Label for this experiment run",
            "default": "my-experiment",
        },
        "concurrency": {
            "type": "number",
            "description": "Max concurrent tasks",
            "default": 10,
        },
    },
)

Step 2: Access parameters in task function

Use hooks.parameters.get() to retrieve parameter values in your task.
async def task(input, hooks):
    label = hooks.parameters.get("experiment_label")
    concurrency = hooks.parameters.get("concurrency")
    # use values as needed

Step 3: Configure in playground UI

Parameters automatically appear as editable controls in the remote eval playground.