Skip to content
Live evals: score runs as they finish

Score every answer, live and in review

Write the checks that matter to you, in code or as a rubric. Spanwise runs them on live runs as they finish and on every pull request.

evals/faithful.ts

export const faithful = judge({
  name: "faithfulness",
  rubric: "Claims only what the passages support",
  pass: (score) => score >= 0.80,
});

Runs scored today305 below of 5,225

Last 8 answers5 of 8 pass, 63%
  • Where is order 48213?Delivered two days ago, signed for at the front desk.0.97pass
  • Can I return opened headphones?Yes, any headphones can be returned within 30 days.Policy allows unopened items only.0.41fail
  • Do you ship to Norway?Yes, in 4 to 6 working days, duties paid.0.88pass
  • Why was I charged twice?One charge is a hold that drops off within 3 days.The hold is not in the retrieved invoice.0.72fail
  • How do I change my plan?Settings, then Billing, then Change plan.0.95pass
  • Is my data used for training?No. Conversations are never used to train models.0.91pass
  • Can I get a refund after 45 days?Refunds are possible up to 60 days.The policy says 30 days.0.18fail
  • What's the warranty on the X2?Two years, parts and labour.0.84pass

Three ways to score

Numbers that must match the source, a refund limit, a query that must be read-only. If you can write it as a function, it checks every run at no extra cost.

export const numbersMatch = check((run) => {
  const source = run.span("warehouse.sql").output;
  const claims = numbersIn(run.reply);
  return claims.every((n) => source.includes(n));
});
  • 7f3a✓3 of 3 figures found in the source
  • 7f2c✕“$4,210” is not in warehouse.sql
  • 7f29✓2 of 2 figures found in the source

18,240 runs checked today · 0.4 ms each

Catch it in the pull request

Every change to a prompt, model or tool runs your evals against a sample of last week's real traffic. A drop past the line you set blocks the merge.

Pick a commit

spanwise / evals2 regressions on a41c2e9 · merge blocked
Eval scores, main against this branch
Evalmainbranchchange
Faithfulness96.491.2−5.2
Answers the question91.892.4+0.6
Tool safety99.799.70.0
Latency budget94.186.5−7.6

400 runs from last week · 2 min 10 s

Turn real runs into test cases

The best tests are the runs that went wrong. Add any run to a dataset in one click, with its input, the expected answer and the eval it should pass.

billing-support dataset

121cases

+1 today
  • Charged twice for my annual planr_8f19 · Answers the question
  • Invoice shows the wrong VAT numberr_8efe · Faithfulness
  • Blender arrived cracked, order 48213r_8f2a · Tool safety
  • Summarise the pricing survey repliesr_8ed2 · Latency budget
  • Parcel never arrived, order 48177r_8ef1 · Faithfulness
  • Average basket size in Marchr_8ee7 · Answers the question

Ship agents you can explain.

The first 50,000 spans each month are free. No card needed.