Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform
Hi Richard Bennett,
Thanks for reaching out and for sharing the details.
The InternalServerError (HTTP 500) you’re seeing during model training in Azure Document Intelligence is a generic service-side error. In scenarios like yours (very small dataset across classes), this is most commonly linked to training data limitations or transient backend conditions, rather than a configuration issue.
- Increase your training dataset (most impactful step) You’re currently using about 5 documents across two classes. While this may meet the minimum requirement, it’s often not sufficient for stable training.
- Try adding more samples per class (ideally 10+ if possible)
Keep the dataset balanced across classes
Include some variation in document formats/content
- Validate document quality Make sure the files are suitable for training:
Use PDF or DOCX formats
Avoid scanned/image-only PDFs (text must be extractable)
Ensure documents are clear and not noisy
- Verify storage access (if using Blob Storage) If your training data is in Azure Storage:
Confirm the container is accessible
If the storage is behind a firewall or private endpoint, ensure the service can reach it
Managed identity is only needed in restricted access scenarios, not by default
- Retry the training Since HTTP 500 can also be transient:
Wait a few minutes and retry
If possible, try triggering training via a different method (Portal vs API/SDK)
Please share the following so we can investigate further:
-
x-ms-correlation-request-id - Timestamp of the failure
How you initiated training (Portal, REST API, or SDK)
In your case, the issue is most likely due to the very small training dataset or document quality, and expanding the dataset typically resolves this kind of error.
Microsoft documentation
- Custom model training requirements and limits: https://learn.microsoft.com/azure/ai-services/document-intelligence/train/custom-model
- Classification model concepts and guidance: https://learn.microsoft.com/azure/ai-services/document-intelligence/concept-custom-classification
- Known issues (including HTTP 500 scenarios): https://learn.microsoft.com/azure/ai-services/document-intelligence/reference/known-issues
- Troubleshooting guide: https://learn.microsoft.com/azure/ai-services/document-intelligence/how-to-guides/resolve-errors
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
Please do not forget to "Accept Answer" and "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.