> ## Documentation index
> Fetch the complete documentation index at: https://docs.heurastudios.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Examples and fixes

> The training data. Examples pair a question with the exact answer you want; fixes are the corrections you make in chat.

Source: https://docs.heurastudios.com/build/examples-and-fixes/

An **example** is a question paired with the answer you want, written exactly as you'd want it sent. A **fix** is an answer from chat that you marked right or corrected. Together they're a model's **lessons**: matched as reference on every answer straight away, and built into its weights by the next training run.

## Adding examples

Open the **examples** tab and add them one at a time, or import a spreadsheet.

```csv title="examples.csv"
question,answer
How many orders shipped last month?,"SELECT count(*) FROM orders WHERE shipped_at >= date_trunc('month', now()) - interval '1 month' AND shipped_at < date_trunc('month', now());"
Who are our five biggest customers this year?,"SELECT customer_id, sum(total) AS spent FROM orders WHERE shipped_at >= date_trunc('year', now()) GROUP BY customer_id ORDER BY spent DESC LIMIT 5;"
```

**Import CSV** takes two columns: the question, then the answer. A header row (`question`, `q` or `prompt` in the first cell) is optional.

| Limit | Value |
| --- | --- |
| Rows per import | 1,000 (split larger files) |
| Examples and fixes per model | 5,000 |
| Question length | 2,000 characters |
| Answer length | 4,000 characters |

A row missing its question or answer, or over a limit, is skipped and counted; the rest are imported. To start from a ready-made set, see [Datasets](https://docs.heurastudios.com/build/datasets/).

## Fixes

In chat, every answer has **Keep** and **Fix**. Keep saves a right answer as a lesson; Fix lets you write the right answer, and saves that. Fixes appear in the **fixes** tab with where they came from, and count as examples in training. See [Chat, keep and fix](https://docs.heurastudios.com/build/chat/).

Fixing is the fastest way to improve a model: you see the mistake in context, correct it once, and it's reference on the next answer and a lesson in the next run.

## How lessons become training rows

A run doesn't train on your examples once each. It builds a mix:

*Diagram: How a round's rows are built: each new lesson becomes 3 rows (as taught and reworded twice), each lesson trained before becomes 2 rows, and 52 general replay rows go in so the model keeps what it already knew.*

*Each run's rows: new lessons three times over, learned lessons twice, and a fixed replay mix.*

- **Each new lesson** becomes 3 rows: once as you taught it, and twice asked a little differently, so the model learns the pattern rather than the wording.
- **Each lesson trained before** becomes 2 rows, so earlier lessons stay sharp.
- **The replay mix**, 52 general rows, goes into every run so the model keeps what it already knew. This is how runs avoid catastrophic forgetting.

In later rounds of the same run, lessons it still gets wrong get 3 rows and ones it gets right get 1. See [Training runs](https://docs.heurastudios.com/build/training-runs/).

## Writing good examples

- **Cover the real distribution.** Use the questions people actually ask, in the words they use, including the awkward ones.
- **Be consistent.** If every answer should start with the number, every example should.
- **Include the edges.** Show the model declining what it shouldn't do, and asking for what's missing.
- **Keep tests separate.** A question that's also an example isn't held out, so it can't tell you whether the model learned. Write tests from different questions.
- **Volume:** a run needs at least 5 lessons; 20 to 50 good ones teach a focused skill; hundreds make it robust.

> **Note:**
>
> Answers written by an outside engine (Claude, GPT, Gemini or a model server) and kept from chat are saved as reference but never trained on: those providers' terms forbid training on their outputs. Datasets in the library are all written by people.
