Create a document processing custom model
After you review the requirements, you can get started creating your document processing model.
Sign in to AI Builder
Sign in to Power Apps or Power Automate.
On the left pane, select ... More > AI hub.
Under Discover an AI capability, select AI models.
(Optional) To keep AI models permanently on the menu for easy access, select the pin icon.
Select Extract custom information from documents.
Select Create custom model.
A step-by-step wizard walks you through the process by asking you to list all data you want to extract from your document. If you want to create your model by using your own documents, make sure you have at least five examples that use the same layout. Otherwise, you can use sample data to create the model.
Select Train.
Test the model by selecting Quick test.
Select the type of document
On the Choose document type step, select the type of document you want to build an AI model to automate data extraction. There are three options:
- Fixed-template documents: Previously known as structured, this option is ideal when, for a given layout, the fields, tables, checkboxes, signatures, and other items can be found in similar places. You can teach this model to extract data from structured documents that have different layouts. This model has a quick training time.
- General documents: Previously known as unstructured, this option is ideal for any kind of documents, especially when there's no set structure, or when the format is complex. You can teach this model to extract data from structured or unstructured documents that have different layouts. This model is powerful, but has long training time.
- Invoices: Augment the behaviors of the prebuilt invoice processing model by adding new fields to be extracted in addition to the ones by default, or samples of documents not properly extracted.
Try the new model version (Preview)
Prerequisites
- Your environment must be located in the US
By selecting the toggle Try the new model version (Preview), you can try the latest preview model version for Fixed template documents and General documents.
Important
- The new model version is a preview release.
- Preview releases aren't meant for production use and might have restricted functionality. These releases are subject to supplemental terms of use, and are available before an official release so that customers can get early access and provide feedback.
Benefits of using the preview model
- Enhanced accuracy: Expect higher accuracy in data extraction.
- Latest OCR enhancements: The preview model includes the latest Optical Character Recognition (OCR) updates. This update resolves many common OCR issues, especially when handling complex text formats like barcodes, QR codes, and watermarks.
- Confidence scores for tables: You can get confidence scores for tables, table rows, and individual table cells
How to check the model version
You can easily verify the version used to train and publish your model. Select Settings > Published model version > Last trained model version.
How to change the model version
You can edit the trained or published model version (preview) and train it with the general availability (GA) version.
- Select Edit model.
- Select Try the new model version (Preview).
- Select the No toggle.
You can edit the trained or published model general availability (GA) version and train it with the model version (Preview).
- Select Edit model.
- Select Try the new model version (Preview).
- Select the Yes toggle.
Define information to extract
On the Choose information to extract screen, define the fields, tables, and checkboxes you want to teach your model to extract. Select the +Add button to start defining these.
For each Text field, provide a name for the field to use in the model.
For each Number field, provide a name for the field to use in the model.
Also, define the format dot (.) or comma (,) as a decimal separator.
For each Date field, provide a name for the field to use in the model.
Also, define the format (Year, Month, Day), or (Monthly, Day, Year), or (Day, Month, Year).
For each Checkbox, provide a name for the checkbox to use in the model.
Define separate checkboxes for each item that can be checked in a document.
For each Table, provide the name for the table.
Also, define the different columns that the model should extract.
Note
The custom invoices model comes with default fields that can’t be edited.
Group documents by collections
A collection is a group of documents that share the same layout. Create as many collections as document layouts that you want your model to process. For example, if you're building an AI model to process invoices from two different vendors, each having their own invoice template, create two collections.
For each collection that you create, you need to upload at least five sample documents per collection. Files with formats JPG, PNG, and PDF files are currently accepted.
Note
You can create up to 200 collections per model.
Next step
Tag documents in a document processing model