An Azure machine learning service for building and deploying models.
Hello @IT Cognity
Thank you for the detailed description of your PoC and the example of the field-position change.
Based on your scenario, Custom Neural is the appropriate Document Intelligence custom model to evaluate first. Custom Neural models are designed to extract fields from structured and semi-structured documents and can generalize across different formats of the same document type. Unlike custom template models, they are not intended to require a separate model for every document variation.
However, a Custom Neural model should not be considered completely layout-independent. The model uses both language and layout information when learning how to extract labeled fields. Therefore, a significant change in the location or surrounding structure of a field can affect extraction accuracy, particularly if that variation was not represented in the training data.
Recommended training approach
For your electricity and natural-gas bill scenario, we recommend making the training dataset as representative as possible of the documents you expect in production.
Microsoft's guidance for Custom Neural models recommends:
Create a single model for variations of the same document type, where appropriate.
Include examples representing the different document variations you expect.
As a best practice, provide at least five labeled samples for each significant variation.
Use diverse and representative values for each field.
Use meaningful field names that correspond to the relevant value; for example, meter_number, supply_number, or billing_period.
Validate the trained model against documents containing variations that were not used during training.
Therefore, in your PoC, we recommend testing with multiple examples where the same field appears in different positions and with different surrounding layouts. This gives the model exposure to the expected variability and can improve its ability to generalize.
At the same time, there is no documented guarantee that a field can be moved arbitrarily anywhere on the page without affecting accuracy. If a supplier makes a substantial structural change, adding representative samples and creating a new model version may still be necessary. Microsoft also notes that there is no explicit "retrain" operation; training with an updated dataset generates a new model.
Custom Neural vs. Custom Generative extraction
For your specific requirement, I would recommend evaluating Custom Neural first if the bills are primarily structured or semi-structured and you have labeled examples of the fields you need.
Custom Neural is specifically intended for labeled custom extraction and supports structured and semi-structured documents such as invoices and similar business documents.
A generative extraction approach can be useful when the documents are highly variable or unstructured and the extraction requirement depends more heavily on semantic understanding or inferred fields. Microsoft positions Content Understanding custom analyzers for custom extraction without labels and for highly varied/unstructured documents.
For your bills, the recommended approach would therefore be:
Multiple representative bill layouts → label the required fields → train Custom Neural → test against unseen supplier/layout variations → measure field-level accuracy → add representative variations and train a new model version when necessary.
Regarding your specific PoC result
The fact that moving the field and its label caused the Custom Neural model not to extract it does not by itself indicate a service defect. It demonstrates that the particular layout variation was not sufficiently generalized by the trained model.
The best next step would be to expand the PoC dataset with several representative variations of the same bills, including different positions of supply_number, meter_number, billing_period, etc., and then compare the extraction accuracy on a separate test set.
Microsoft documentation:
Custom neural document model – Best practices
Choose the right Azure AI tool for document processing
I Hope this helps. Do let me know if you have any further queries.
Thank you!