TestRunBuilder
"Bias"), the SDK pushes entries and the Maxim platform runs the prompt or workflow. With local evaluators or yields_output(), the SDK runs the prompt/workflow locally (or calls your output function) and then runs evaluators locally.
__init__
with_data_structure
Returns:
with_data
Returns:
with_evaluators
"Bias") or BaseEvaluator instances for local evaluators. With local evaluators, the SDK runs the prompt/workflow locally to get output before evaluating.
Arguments:
Returns:
with_human_evaluation_config
Returns:
with_workflow_id
Returns:
Raises:
ValueError- If a prompt version ID, prompt chain version ID or output function is already set for this run builder
with_prompt_version_id
Returns:
Raises:
ValueError- If a workflow ID, prompt chain version ID or output function is already set for this run builder
with_prompt_chain_version_id
Returns:
Raises:
ValueError- If a workflow ID, prompt version ID or output function is already set for this run builder
with_simulation_config
yields_output(), the SDK runs your output function locally in a turn-by-turn loop. You can omit both with_prompt_version_id() and with_workflow_id() for SDK-only simulation. Your function receives SimulationContext with conversation_history, current_user_input, turn_number, total_cost, and total_tokens. Use turn.response.get("output", "") for the assistant’s text in each turn.
Arguments:
Returns:
Raises:
ValueError- If simulation config is used withwith_prompt_chain_version_id(usewith_workflow_idorwith_prompt_version_idinstead)
with_preset
with_workflow_id(), with_prompt_version_id(), or with_prompt_chain_version_id(), as the preset is scoped to a specific entity.
Arguments:
Returns:
Raises:
ValueError- If preset_name is empty or not a string
yields_output
with_simulation_config(), enables local-execution simulation where your function is called turn-by-turn with SimulationContext (conversation history, current user input, turn number, total_cost, total_tokens). You can omit both with_prompt_version_id() and with_workflow_id() for SDK-only simulation. Use turn.response.get("output", "") for the assistant’s text in each turn of conversation_history.
Arguments:
Returns:
Raises:
ValueError- If a workflow ID, prompt chain version ID or prompt version ID is already set for this run builder
with_concurrency
Returns:
with_logger
Returns:
run
Returns: