About Custom Models

In Document Understanding, you can leverage custom models for extracting key-value pairs and classifying documents, tailoring the process to your specific needs.

Custom Key-Value Extraction

With this feature you can create a model that identifies and locates user-defined fields within documents. For example, an HR team might build a model for job application forms to pull out details such as Name, Job ID, and Email Address. The results include a confidence score for accuracy, plus the coordinates (bounding box) of each detected field on the page.

Custom Model Types

Document Understanding offers two methods for custom key-value extraction through classic and generative custom models:

Classic

Custom Classic Key-Value Models (Trained)
  • Requires training the model.
  • Involves preparing a dataset of annotated examples.
  • Ideal for scenarios requiring a model fine-tuned to a particular document layout or industry, where you have labeled training data available.
  • See the Creating a Dataset guide for setup.

Generative

[NEW] Custom Generative Key-Value Models (Prompt-Based)
  • Perfect for quick, flexible extraction defined by using natural language prompts—no training data needed.
  • Skip dataset creation and model training entirely.
  • Describe the fields in plain English. For example:

    Extract Invoice Number, Invoice Date, Supplier Name, Total Amount

  • Suited for rapid deployment, evolving requirements, and documents with varying formats.
  • Check Creating a Custom Generative Model V2.0 (New) for details.

Custom Document Classification

Here, you can develop a model to sort documents into categories you define. A banking example: classifying mortgage-related files as Credit Reports, Lease Agreements, or Application Forms. It provides a confidence score for each category to indicate reliability.