Skip to main content
Demonstrates evaluating multiple cases in one run.
This example reads eval_runs[-1], but SqliteDb.get_eval_runs() returns the newest evaluation first. Replace the index before running so the reported ID belongs to the evaluation that just completed.
agent_as_judge_batch.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your API keys

4

Read the latest evaluation

Replace latest = eval_runs[-1] with latest = eval_runs[0] in the saved file.
5

Run the example

Save the code above as agent_as_judge_batch.py, then run:
Full source: cookbook/09_evals/agent_as_judge/agent_as_judge_batch.py