# Evaluator file

URL: /code/project-structure/evaluator-file · Id: `convention:evaluator-file`

> An Evaluator file holds one Evaluator: the rubric and the code that grade an output and return a verdict.

An [Evaluator](/business/nouns/evaluator) file holds one Evaluator: the rubric and the code that grade an output and return a verdict.

| Property | Value |
| --- | --- |
| Path | `evaluators/[name].ts` |
| Holds | [Evaluator](/business/nouns/evaluator) |
| Kind | file |
| Leaders | db-first, git-first |
| Team | [Quality Team](/agents/quality) |
| Written by | [Change.merge](/business/nouns/change/merge) |
| Compiled by | [SoftwareBuilder](/code/builders/software) |

### Example
`evaluators/tie-out.ts` in a Startup repository.

```ts title="evaluators/tie-out.ts"
import { evaluator } from 'startup-builder'

export default evaluator({
  rubric: 'Every bank line matches one entry, and the closing balance equals the statement.',
  grade: (close: { unmatched: number; difference: number }) => ({
    pass: close.unmatched === 0 && close.difference === 0,
    score: close.unmatched === 0 ? 1 : 0,
    reason: `${close.unmatched} unmatched lines, ${close.difference} difference`,
  }),
})
```

### Exports
| Export | Kind | Type |
| --- | --- | --- |
| `default` | default | `Evaluator` |

### Signature
```ts
evaluator(definition: { rubric: string; grade: (output: unknown, $: $) => Verdict | Promise<Verdict> }): Evaluator
```

### Generates
[SoftwareBuilder](/code/builders/software) compiles it into these records, Verbs and routes.

| Kind | What |
| --- | --- |
| Records | [Evaluator](/business/nouns/evaluator), [Version](/business/nouns/version) |
| Verbs | None. |
| Routes | None. |