Skip to content

/

Evals

Write your first eval

A case, a check and a score, in under twenty lines.

LAST UPDATED

An eval is a function that returns a score between zero and one.

A case

export default tracewell.eval('refund-edge-12', {
  input: { ticket: 'I was charged twice...' },
  check: (out) => out.includes('refund') ? 1 : 0,
})
export default tracewell.eval('refund-edge-12', {
  input: { ticket: 'I was charged twice...' },
  check: (out) => out.includes('refund') ? 1 : 0,
})
export default tracewell.eval('refund-edge-12', {
  input: { ticket: 'I was charged twice...' },
  check: (out) => out.includes('refund') ? 1 : 0,
})

Run it

npx tracewell eval run
npx tracewell eval run
npx tracewell eval run

The result links to the run so you can open the trace of any failing case.

Create a free website with Framer, the website builder loved by startups, designers and agencies.