> ## 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.

# Files and rules

> Reference a model reads on every answer. Files are documents it looks things up in; rules are facts and instructions every answer follows.

Source: https://docs.heurastudios.com/build/files-and-rules/

Files and rules are how you give a model knowledge without training it. Both take effect on the next answer.

## Files

Add documents in the **files** tab: policy documents, product pages, help articles, schemas, manuals. The Studio reads each one into sections, and for every question finds the sections that answer it and hands them to the model.

| Supported | Details |
| --- | --- |
| Formats | PDF, Word (`.docx`), plain text, Markdown, CSV and HTML |
| Size | Up to 20 MB per file |
| Not yet | Scanned images of text |

In the [pipeline's](https://docs.heurastudios.com/workspace/pipeline/) Playground, **What it looked at** shows the parts of your files an answer used, so you can tell a retrieval miss from a model mistake. How much document storage an account has depends on its plan.

## Rules

Open the **rules** tab and write facts and rules in plain words, one at a time, up to 30. Every answer follows them.

- **A rule** is an instruction: `Never quote a delivery date; link the tracking page instead.`
- **A fact** is something it should know: `Orders ship from Vancouver and Toronto.`

Longer details belong in a file. Rules come from three places, and the tab shows where each came from:

1. **The script.** Rule and fact lines in `script.md`. Editing the script updates these.
2. **The rules tab.** What you add by hand.
3. **Interviews.** What the model saves when it [interviews your team](https://docs.heurastudios.com/build/interviews/).

## Files, rules or examples

- Use **files** for knowledge that's long or changes often, and that the model should quote rather than memorize.
- Use **rules** for short facts and hard constraints that must hold on every answer.
- Use **examples** to teach a way of answering, and train it in. See [Teaching and training](https://docs.heurastudios.com/concepts/teaching-and-training/).

> **Tip:**
>
> If a rule matters, write a test that would fail if the model broke it. Rules guide every answer; tests prove it.
