Evaluators
A file in evaluators/ defines one Evaluator, a rubric and the Function that grades an output against it.
A file in evaluators/ defines one Evaluator: a rubric and the Function that grades an output against it and returns a verdict.
evaluators/notice-tone.tsgrades every renewal notice before it sends
Reference
TypeScript with one default export.
| Export | Type | Holds |
|---|---|---|
default | evaluator({ rubric, | The Evaluator |
rubric | string | What a passing output does, in plain words |
grade | (output, | Returns { pass,; its kind follows its code, as in any Function |
A Verb, a Role or an Offer names an Evaluator by its path.
Examples
Minimal
import { evaluator } from 'startup-builder'
export default evaluator({ rubric: 'Under 120 words.', grade: (text: string) => ({ pass: text.split(' ').length < 120 }) })Leaseline
import { evaluator } from 'startup-builder'
export default evaluator({
rubric: 'States the end date and the new rent, offers one clear next step, and makes no threat.',
grade: async (notice: string, $) => $`Grade this renewal notice against the rubric: ${notice}`,
})What it builds
The SoftwareBuilder compiles the file into one Evaluator Version.
- an
Evaluatorwith its rubric - a verdict Event for each graded output, written to the Action
- a failing verdict on a required Evaluator blocks the output and opens a Task
Good to know
Change.reviewruns every Evaluator on a Change's preview.- A Role's autonomy climbs on its Evaluators' verdicts; see Role tests.