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

# Schema builder walkthrough

> Create a schema in the three-column builder: sample, fields, and AI chat.

The schema builder is a three-column page at `/structs/<slug>/`.

| Column       | What you do                                                                 |
| ------------ | --------------------------------------------------------------------------- |
| **Document** | Upload a sample PDF or image. Highlight text to turn it into a field.       |
| **Schema**   | Add, edit, reorder, and group fields. Switch **Form** or **Document** mode. |
| **AI Chat**  | Ask the builder agent to add fields, set hints, or run **Auto-improve**.    |

## Create a schema

1. Open **Schemas** in the sidebar.
2. Click **New schema** (or the equivalent create control on **Output Schemas**).
3. Give it a name. A slug is generated for URLs and the API.
4. Upload a **sample document** — a typical file this schema should handle.
5. Add fields yourself, or describe the document in the chat and let the agent propose them.

Field ids must match the [mode rules](/schemas/form-vs-document). Document mode uses snake\_case (`invoice_number`). Form mode allows hyphens and mixed case, but not reserved type words.

## Adding fields from the sample

Select text on the sample to create an **annotation**. The builder can infer a location hint (page, nearby labels, typical format) from that highlight. You can also add a field by hand and type the description.

**Table** fields need at least one column. A table with no columns cannot be published.

## Auto-improve

Auto-improve runs the agent against the sample and proposes field additions, removals, and hint edits. You accept, reject, or edit each proposal. Nothing is published until you click **Publish**.

<Tip>
  Keep field descriptions short and concrete — what the value looks like, not how the engine should behave. Form-mode descriptions in particular should be label-anchored (one or two sentences).
</Tip>

## Test before you publish

* **Full Test** runs the draft schema against the sample (and, if you have added them, the schema's test-set documents).
* **Batch Full Test** runs the draft against the whole test set as a hidden batch. It does not overwrite your real documents.

Results stay on the builder. Publish only when the fields look right. See [Publish, versions, and the test set](/schemas/publish-and-versions).
