# Write gold

Gold is what a correct answer must do. A benchmark scored against gold rewards right answers. Scored against today's answer, it only rewards agreeing with today's model.

## Today's answer is never gold

Cases imported from traces carry what your current model answered in production. That answer may be wrong. OptBench keeps it apart as "today", never scores it as correct, and refuses gold whose final answer is a copy of it.

## What gold is made of

- **Checks.** For agent loops: `required_calls`, `forbidden_calls` and `one_of_calls` (tool names, with arguments when they matter). For any use case: `must_include` and `must_not_include`, with facts only (a figure, a name, an id), never a phrase a correct answer could word differently.
- **A final.** The full right answer, when one exists.

Checks score at once. A final scores only after a person approves it; until then the case is marked as waiting for review. Every gold item also says, in one sentence, where it comes from.

A Decision needs at least half of its cases with a reference a person wrote or approved ([Benchmark before launch](/docs/workflow-before-launch)). Gold an agent or OptBench wrote counts once a person approves it.

## Three ways to write it

In the dashboard, the use case's Cases tab shows how many cases have a reference, and offers all three for the cases you select.

### Your coding agent (free)

Your agent reads each case (`biy_cases_list` with `without_gold=true` and `full=true`: the conversation, the recorded tool results, and today's answer kept apart), then reads your code: the prompt and its rules, the tool handlers and what they return, validators. It writes checks, and a final only when it checked it against the code and the tool results. It sends them with `biy_cases_gold`.

OptBench calls no model for this, so it costs nothing here. Items that break a rule (a final equal to today's answer, a tool the use case doesn't have) come back skipped with the reason; the rest apply. In the dashboard, **Let your agent write it** gives you a prompt with the use case and the selected case ids.

### Draft with AI (costs a little)

**Draft with AI** in the case sheet has OptBench write a proposed answer per case, with a pinned model or your own endpoint, under your model rules. Your agent does the same with `biy_cases_gold_generate`.

- First you get an estimate. It is free.
- You confirm the cost. Only then does the job run; it stops at the amount you confirmed and stays under the workspace's per-run cap.
- Every answer it writes waits for your review.

### Write it yourself

**Write it yourself** in the case sheet: type the right answer and choose **Save as gold**. An answer you write counts as reviewed.

## Review

Proposed finals wait in the Cases tab under **Review proposed answers**. For each one: **Approve**, **Correct** (edit the answer; that approves it) or **Reject answer** (the final goes, the checks stay). Checks your agent wrote without a final get **Approve checks**.

When you read gold in the chat with your agent and say it is right, the agent can send it with `reviewed=true`, and those cases count as reviewed.

## What you see

The use case shows its gold share: how many cases have a reference, split into reviewed, written by your agent or OptBench and not reviewed yet, and came with the case. Your agent sees the same line after `biy_cases_gold`.

Every verdict shows its evidence:

```text
measured on N cases, k with a reference
```

In a verdict, k counts only the cases with a reference a person wrote or approved, since that is what a Decision needs. Gold that still waits for review raises the gold share, not k.
