Running AI Evals
Run the evals and send the runs to the Studio in one step:
KIS_STUDIO_KEY="$KEY" kis test eval run --store duckdb,studioKIS_STUDIO_KEY="$KEY" kis test eval send qc-report.json --store duckdb,studio| Exit status | When |
|---|---|
0 | Every eval passed, with or without warnings |
1 | An eval failed (the summary says why), or the eval files or the report were refused |
2 | --store studio could not use the Studio or its key |
The Studio receives runs of committed code at a branch or tag, so commit the eval files and
golden sets before sending. The repository’s .kisai/studio.yaml names the Studio; see
Keeping runs and the Studio.
Judge and embedding models
Section titled “Judge and embedding models”rubric, factuality and pairwise call a judge model, and reference_semantic calls an
embedding model, through an OpenAI-compatible endpoint such as the AI
gateway. The environment names it:
| Variable | Default | Description |
|---|---|---|
KIS_EVAL_AI_URL | The endpoint’s base URL, ending in /v1 | |
KIS_EVAL_AI_KEY | Its key, sent as a bearer token | |
KIS_EVAL_JUDGE_MODEL | eval.judge | The judge model, an AI gateway alias by default |
KIS_EVAL_EMBED_MODEL | eval.embed | The embedding model |
An eval whose scorers need a model runs when KIS_EVAL_AI_URL is set; with none, it is
refused before any case is called. The endpoint and the key stay out of every kept run.
Provider profiles and keys
Section titled “Provider profiles and keys”An eval’s run.profiles names the provider profiles it runs under, one run each, and the call
reads {{profile}} to choose one. The keys a profile uses stay in the environment that runs
the eval: --secret and the environment file’s secrets are masked in the run’s text, and a
run carries only the profile’s name and the model that answered. See Masking
secrets.
Golden-set versions
Section titled “Golden-set versions”A golden set’s version is the content hash of its folder’s files at a commit. In the Studio, under Quality → AI Evals → Golden sets, each version is Draft, Active or Retired:
- Only a person moves a version. Making one active takes the confirmation that the expected answers were checked by a person, not copied from AI output, and retires the set’s active version.
- A run is scored on an active version. A run on any other version is kept as Not scored, with the reason, and stays out of trends, coverage and release readiness.
- A version’s page lists what changed from another version, by case: added, removed, or expected answer changed.
A golden set can be created or edited in the Studio: its basics, its cases from a CSV, XLSX or
JSONL file mapped to the case id, the inputs and the expected fields, a review, and a commit of
golden.yaml and the cases file to the tests folder.
Compare
Section titled “Compare”Compare joins two runs of one eval by case and field and lists what is newly failing, newly passing, still failing, changed and unchanged, with what differs between the runs: commit, model, provider profile, configuration hash, golden-set version, prompt and build. Newly failing checks can be filed as bugs, and the comparison exported as CSV.
Releases that require their evals
Section titled “Releases that require their evals”A release can require its AI evals to pass (Require AI evals to pass on its readiness card). Each eval the eval files declare at the commits the release ships must then have passed there on an active golden-set version, and the readiness lists each eval’s standing: passed, failed, not scored or not run. Anyone who edits releases can turn the requirement on; only a person turns it off.
An eval’s test case follows its verdict, so coverage and release readiness read evals as they read other tests.