← All extensions
Text Score banner

Text Score

ivyx✓

Scores an LLM answer against the assertions its eval case declares so suites can gate on them

Text Score

Scores an LLM answer against the assertions its eval case declares. It is the Evals engine for answers that are plain text or JSON, such as a tutor hint, a commit subject or a verdict, where only the case can say what a good answer looks like.

What you can do

  • Check an answer against what its case declares: words it must or must not contain, a pattern it must match, a length or line limit, and keys a JSON answer must have.
  • Gate a suite on the share of each case's checks that held.
  • Require an answer to be valid JSON, and measure how many of the required keys it has.
  • Watch the length of answers over time, to see an answer getting wordier while its pass rate stays the same.
  • Send a case that cannot be checked mechanically to a person, by describing what you expect in a sentence instead of as checks.

Getting started

Install Evals first, then this engine. It appears under Engines in the Evals panel with nothing to configure. Name the engine text in a suite, set a threshold on the share of checks that must hold, and write what each case expects on its line of the dataset.

Requirements

  • Evals. This engine has no panel of its own and does nothing without it.

Good to know

  • A metric nothing declared is left out rather than counted as zero, so it cannot drag an average down.
  • A check that could not run is a failure, not a pass. For example, required keys against an answer that is not JSON fail, and so does a broken pattern.
  • A failure is reported as one sentence about the first check that did not hold.
  • Answer length is a counter to read, never a score to gate on.