> 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/settings/global-settings/document-types/model-training/testing-the-model.md).

# Testing the model

## Evaluate with independent test documents

<figure><picture><source srcset="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-6a982a985197bd9ce2555ed0924bf9c73208337f%2Fintro-process-05-modelltest-en-dark-20261029.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-e3533b5e668c4e23e31a6434222c8d2389882f3d%2Fintro-process-05-modelltest-en-light-20261029.png?alt=media" alt="Evaluate with independent test documents"></picture><figcaption><p>Evaluate with independent test documents</p></figcaption></figure>

Training data and test documents serve different purposes. For independent test documents, define the expected document types and field values, then compare them with the predictions. Record the model version, sample, discrepancies and technical failures. Make targeted improvements and repeat the test with the same evaluation protocol. The values shown are an example, not an accuracy measurement.

Test with representative documents that were not used for training. Prepare the expected answers for each document: its type and, when evaluating extraction, its field values.

## Run the test

1. Open model training for the document type to evaluate.
2. Select the classification test if your version provides it.
3. Select the sample and start evaluation with the available options.
4. Wait for completion and record results and errors. A technical failure or incomplete test does not count as a correct classification.

<figure><img src="https://578966019-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FT2n2w4uDCJvv7CJ5zrdk%2Fuploads%2Fgit-blob-5374234fac103950a70b38a121b6fefe7165f504%2Fsite-extra-model-training-overview-en.png?alt=media" alt="Model-training overview: available data and actions; no training or import was started."><figcaption><p>Model-training overview: available data and actions; no training or import was started.</p></figcaption></figure>

## Interpret results

Compare predictions with expected answers and analyze errors by type and format. If you calculate accuracy, precision, recall or F1 score, also report sample size and evaluated categories. Do not attribute metrics to the product that your version does not display; you can calculate them separately from exported or recorded results.

Classification and extraction rules are separate settings from model training. Check their effect when they participate in processing. Do not change a rule solely to hide an error in the test sample.

## Improve and repeat

Correct training data, labels or settings actually available in your installation, then retrain if needed. Repeat the test with the same protocol and retain an independent sample. Document the version, data, results and regressions. A good sample result does not guarantee the same performance on all future documents.


---

# 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/settings/global-settings/document-types/model-training/testing-the-model.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.
