> For the complete documentation index, see [llms.txt](https://docs.docbits.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.docbits.com/administration-and-setup/setup/document-training/training-header-fields.md). Agents can also search and read this documentation through its [MCP server](https://docs.docbits.com/~gitbook/mcp).

# Training Header Fields

After uploading your document, you'll be taken to the validation screen.\
Some fields may already be populated — this is thanks to DocBits' swarm intelligence. However, other fields might remain empty. This typically means the document type hasn’t been fully trained yet, so DocBits doesn't yet know where to extract that information from.

You can help train DocBits to recognize these fields by manually identifying the correct data.\
**Please note:** if a field remains empty, it might simply be because the information is not present in the uploaded document.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-683f18168c62c14cabe9918d6b37a2cd9b280194%2Fs150-header_field_training_0.png?alt=media" alt="Field validation of a fictional English invoice before header training."><figcaption><p>Field validation of a fictional English invoice before header training.</p></figcaption></figure>

### To train a field:

1. Click on the field you want to train.
2. Then either:
   * **Double-click** on the relevant data within the document, or
   * **Draw a selection box** around the data using your cursor.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-d2ae0f99b1ebf353a5049e24a5a0a8c7b1b95300%2Fs150-troubleshooting_ocr_5.png?alt=media" alt="Select the invoice number as the starting point for header-field training."><figcaption><p>Select the invoice number as the starting point for header-field training.</p></figcaption></figure>

Repeat this process for all required fields.\
Once all necessary fields have been populated, **click "Save Rules"** to store the training. This ensures that DocBits learns where to find each piece of information for similar documents in the future.

<div align="left"><figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-59030fc6deff8b0e0b40a4df5ac77b7e4934db42%2Fheader_field_training_2.png?alt=media" alt="Validation screen with an arrow pointing to the Save Rules button next to Export and PO Match" width="375"><figcaption></figcaption></figure></div>

After saving training, test further documents from the same supplier. Export readiness also depends on validation and the configured workflow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.docbits.com/administration-and-setup/setup/document-training/training-header-fields.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
