Preparing training data

Preparing training data

The quality of your Training Data directly affects how well your Identification model performs. Before training a model, prepare a Dataset that accurately represents the documents you expect to process in production.

While you'll first create a Semi-structured Layout to upload documents in Training Data Management (TDM), the quality, diversity, and consistency of your training data have the greatest impact on model performance.

In this step, you'll prepare a representative dataset that reflects the document patterns, formats, and edge cases your model is expected to process.

Choose representative documents

Selecting the right documents is the most important part of preparing your training data. A representative dataset allows the model to learn patterns that reflect the documents it will process in production.

Identify your document types

Start by identifying the document types (e.g., invoices, paystubs, claim forms):

Document distribution

Your training data should reflect the real distribution of documents you expect to process.

Include examples from the document types you expect to process with this model

Ensure documents contain the required data

Your documents must support the data you want to extract.

Ensure dataset diversity

Your training dataset should reflect the range of document patterns your model will encounter in production. Including diverse examples helps the model generalize and perform consistently across different document formats.

Include diverse document patterns

Documents of the same type may differ in how they present information. That’s why it is important to include documents where:

Capture differences in labels and formatting

Include documents with patterns such as:

Handle edge cases

Not all documents should be treated equally. Some documents differ significantly from the main dataset and can negatively impact model performance if included without consideration.

Identify edge cases

Review your dataset and look for documents that do not follow the common structure. Edge cases may include:

Decide whether to include or exclude them

Once identified, decide how to handle each edge case.

Avoid mixing incompatible patterns

Identification models can learn document patterns. However, documents that differ significantly from the main dataset may require a different approach.

Clean your dataset

Before using your documents for training, remove any data that could negatively impact model performance. Low-quality or irrelevant documents can introduce noise and reduce the model’s ability to learn consistent patterns.

Remove low-quality documents

Exclude documents that are difficult to read or poorly formatted.

Remove duplicates

Exclude irrelevant documents

Remove documents that do not match your use case:

Prepare a testing set

Before training your model, set aside a portion of your documents for evaluation. A testing set allows you to measure model performance accurately after training.

Reserve documents for testing

Select a subset of your dataset to use only for evaluation. Set aside 50–100 documents for testing:

Keep training and testing data separate

Avoid using the same documents for both training and evaluation.

Ensure representative coverage

Your testing set should mirror the variability of your dataset:

Common issues

Using too few documents

Training with a small dataset limits the model’s ability to learn patterns and generalize to new documents.

Unbalanced representation of document types

Avoid over-representing a single document type, vendor, or format.

Ignoring layout patterns/formats

Training on a limited set of formats can lead to poor performance when new patterns/formats are introduced.

Including low-quality or noisy documents

Distorted, skewed, or low-resolution documents can negatively impact both annotation and training.

Including irrelevant or incomplete documents

Documents that are missing key fields or contain unrelated information can introduce noise into the dataset.