Running your own model? Your model and your key
is the two-line version: the model as a string, the key in the
provider’s usual environment variable.
seeded_agent is a stand-in agent. It answers
honestly most of the time and, on a labeled fraction of rollouts, does one
thing wrong on purpose: hedges, flatters, or claims success after a tool
failed. Each row records what it did in seeded, so you can check that
your judge catches exactly those rows before you trust it on real ones.
1
Write a tool
A tool is a typed function. The signature is the schema, the
docstring is the description. One is enough.
2
Simulate
simulator=False writes the customers from templates, so no model is
called. mode="rl" with repeats=4 plays every ask four times, which
is what pass@k needs.3
Grade and read the number
Any callable that takes a row and returns a reward is a judge. This
one uses the label the stand-in agent left behind.
4
Keep the rows worth training on
select runs the gates: replies that quote the answer key the grader
was given, the 20 to 80% difficulty band, unanimous groups,
duplicates, truncation, a scan for what the reward is really tracking.
Print it and it says what each gate dropped and why. Four of the
stand-in’s planted mistakes recite the answer key, and they never
reach the training file.Your model, your key
Every role in a run is a model behind an endpoint. Say which with a backend object; its repr tells you where the call goes and which key it uses. Set it once for the process, or pass it on the call.wai.Endpoint("Qwen/Qwen3-4B", url="http://localhost:8000/v1") is any
OpenAI-compatible server you run; wai.Ollama("llama3") needs no key.
With nothing configured, every role uses the model While hosts, on the
key from wai login. The full table is on
Connect your agent.
Next
Connect your agent
A callable, an endpoint, a backend object, or the hosted model. Plus
traces to aim the run.
Evals
A pass rate with an interval, a table of where the agent fails, and a
CI check that turns red when it gets worse.
How it works
How the engine picks situations, plays the customer, and breaks the
tools on purpose.
The five calls
simulate, grade, trust the judge, select, push: the run in order.