KoskenDocs Open the app

Evals

Save past diagnoses as cases, replay them with the current prompts and model, read the grades, and compare two eval runs.

5 min readUpdated on Español

On this page
  1. What an eval does
  2. Who can do what
  3. Save a case
  4. Start an eval run
  5. What an eval run costs
  6. How Kosken grades a case
  7. Read an eval run
  8. Compare two eval runs

After you read this guide, you can save eval cases, run them with the current prompts and model, read the grades, and compare two eval runs.

What an eval does

An eval replays past diagnoses. Kosken gives the model the same first message and the same check outputs as in the real incident. Then a grader compares the new answer with the result that a person expects. This shows whether a new prompt or a new model makes Kosken better or worse.

  • A replay runs nothing on a machine. Each check answers with the output that Kosken recorded in the real incident.
  • A check that the real incident did not call answers Not recorded in this case. It does not fail the case.
  • A recipe that changes a machine never runs. The grade reads only what the model proposed.
  • The replay uses the model of the Diagnosis role in Settings, LLM. The grader uses the model of the Triage role.

Who can do what

ActionWho
Open Evals and read eval runsEvery member
Save, review, change and delete casesMembers with write access
Start and stop an eval runOwners

Save a case

A case is a past diagnosis and the result that you expect from it.

  1. Open a closed incident.
  2. Open the Review tab.
  3. Select Save as an eval case.
  4. In Name, type a name. If you leave it empty, Kosken uses the incident number and title.
  5. In Expected cause, write the real cause. This field is required. Use up to 1,000 characters.
  6. Optional: in Key terms, type words that the diagnosis must hold, with commas. Use up to 10.
  7. In Accepted fixes, type one fix on each line: the recipe ids in their order, with commas. Use up to 5 lines. Leave the field empty when no recipe should be proposed.
  8. Optional: in Forbidden recipes, type recipe ids, with commas. A proposal of one of them fails the case.
  9. Optional: select "Don't know the cause" is an accepted answer.
  10. Optional: in Most model calls, type a limit from 0 to 30. 0 means no limit.
  11. Select Save as an eval case.

The case is Active. Kosken records each diagnosis since version 0.1.243. An older incident has no recorded diagnosis and cannot become a case. If you save a case again from the same incident, Kosken replaces its expected result.

Candidates from feedback

When a person says on the Review tab that the cause was wrong or partly right, or that the fix was wrong, Kosken adds a Candidate case. The real cause of the answer becomes the expected cause. See Review an incident.

  1. In Cases, find the case with the state Candidate.
  2. Select Review.
  3. Check the expected result and correct it.
  4. In State, select Active.
  5. Select Save.

A candidate does not run until it is active. A case in the state Off stays in the list and does not run. To change a case later, select Edit. To remove it, select Delete in the same window. Eval runs keep their results.

Start an eval run

  1. Open Evals in the sidebar, under Knowledge.
  2. Select Run the workspace cases.
  3. Confirm. The eval run page opens.

The button is off when the workspace has no active case, or when an eval run is running. One eval run of a workspace runs at a time. Each active case runs 3 times, because a model does not give the same answer each time.

The results come in while the run runs. To end it early, select Stop the run. The run keeps the results that it has. The cases that did not run have no result.

What an eval run costs

An eval run calls your model provider with the model key of the workspace. Your provider bills you for these calls. They show in Settings, Usage, in the stages eval and eval_grade. Tokens per repeat shows the mean tokens of one replay. A run uses about this number times the active cases times 3, plus the calls of the grader. Kosken keeps no price table, so the cost shows in tokens.

The cost grows with the number of active cases. Turn off the cases that you do not need.

How Kosken grades a case

Each repeat of a case gets a grade:

Cause
The grader compares the diagnosis with the expected cause: right, partly, wrong, or don't know. If a key term is missing, a right cause becomes partly.
Fix
matches when the proposed recipes hold one accepted fix, in its order. With no accepted fix, it matches only when the model proposed no recipe.
Wrong fixes
The model proposed a forbidden recipe.

A repeat passes when the cause is right, or "don't know" is accepted, the fix matches, no forbidden recipe was proposed, and the model calls stay in the limit. A case passes when more than half of its repeats pass.

Read an eval run

Select the start time of a run in Eval runs. The page shows:

  • The model and the prompt versions of the run, and the repeats per case.
  • Pass rate, Cause right, Fix matches, Wrong fixes with the count of Don't know answers, and Tokens per repeat.
  • Each case, with Passed or Failed. A failed case opens by default.
  • Each repeat: the cause, the fix, the reason of the grader, the proposed recipes, the checks, the model calls, and the list of calls. A call marked Not recorded was not in the real incident.

A run in the state Stopped counts only the cases that ran. A run in the state Failed stopped before its end. Start a new run to try again.

Compare two eval runs

The run page compares the run with the newest finished run before it. Each number shows the value before: below it. The list shows each case that Now passes or Now fails.

  1. To compare with another run, select it in Compare with.
  2. Select Compare.

To compare two models, change the model of the Diagnosis role in Settings, LLM, start a new run, and compare it with the run before. See Your AI model key. To see the same comparison on real incidents, use the Quality page.

Something here does not match the app? Tell us