Composed custom models

This article applies to: Form Recognizer v3.0 checkmark Form Recognizer v3.0. Earlier version: Form Recognizer v2.1

This article applies to: Form Recognizer v2.1 checkmark Form Recognizer v2.1. Later version: Form Recognizer v3.0

Composed models. A composed model is created by taking a collection of custom models and assigning them to a single model built from your form types. When a document is submitted for analysis using a composed model, the service performs a classification to decide which custom model best represents the submitted document.

With composed models, you can assign multiple custom models to a composed model called with a single model ID. It's useful when you've trained several models and want to group them to analyze similar form types. For example, your composed model might include custom models trained to analyze your supply, equipment, and furniture purchase orders. Instead of manually trying to select the appropriate model, you can use a composed model to determine the appropriate custom model for each analysis and extraction.

  • Custom form and Custom template models can be composed together into a single composed model.

  • With the model compose operation, you can assign up to 200 trained custom models to a single composed model. To analyze a document with a composed model, Form Recognizer first classifies the submitted form, chooses the best-matching assigned model, and returns results.

  • For custom template models, the composed model can be created using variations of a custom template or different form types. This operation is useful when incoming forms may belong to one of several templates.

  • The response includes a docType property to indicate which of the composed models was used to analyze the document.

  • For Custom neural models the best practice is to add all the different variations of a single document type into a single training dataset and train on custom neural model. Model compose is best suited for scenarios when you have documents of different types being submitted for analysis.

With the introduction of custom classification models, you can choose to use a composed model or classification model as an explicit step before analysis. For a deeper understanding of when to use a classification or composed model, see Custom classification models.

Compose model limits


With the addition of custom neural model , there are a few limits to the compatibility of models that can be composed together.

Composed model compatibility

Custom model type Models trained with v2.1 and v2.0 Custom template models v3.0 Custom neural models v3.0 (preview) Custom neural models 3.0 (GA)
Models trained with version 2.1 and v2.0 Supported Supported Not Supported Not Supported
Custom template models v3.0 Supported Supported Not Supported NotSupported
Custom template models v3.0 (GA) Not Supported Not Supported Supported Not Supported
Custom neural models v3.0 (preview) Not Supported Not Supported Supported Not Supported
Custom Neural models v3.0 (GA) Not Supported Not Supported Not Supported Supported
  • To compose a model trained with a prior version of the API (v2.1 or earlier), train a model with the v3.0 API using the same labeled dataset. That addition ensures that the v2.1 model can be composed with other models.

  • Models composed with v2.1 of the API continues to be supported, requiring no updates.

  • The limit for maximum number of custom models that can be composed is 100.

Development options

The following resources are supported by Form Recognizer v3.0 :

Feature Resources
Custom model
Composed model

Form Recognizer v2.1 supports the following resources:

Feature Resources
Custom model
Composed model

Next steps

Learn to create and compose custom models: