- Overview
- Document Processing Contracts
- Release notes
- About the Document Processing Contracts
- Box Class
- IPersistedActivity interface
- PrettyBoxConverter Class
- IClassifierActivity Interface
- IClassifierCapabilitiesProvider Interface
- ClassifierDocumentType Class
- ClassifierResult Class
- ClassifierCodeActivity Class
- ClassifierNativeActivity Class
- ClassifierAsyncCodeActivity Class
- ClassifierDocumentTypeCapability Class
- ContentValidationData Class
- EvaluatedBusinessRulesForFieldValue Class
- EvaluatedBusinessRuleDetails Class
- ExtractorAsyncCodeActivity Class
- ExtractorCodeActivity Class
- ExtractorDocumentType Class
- ExtractorDocumentTypeCapabilities Class
- ExtractorFieldCapability Class
- ExtractorNativeActivity Class
- ExtractorResult Class
- FieldValue Class
- FieldValueResult Class
- ICapabilitiesProvider Interface
- IExtractorActivity Interface
- ExtractorPayload Class
- DocumentActionPriority Enum
- DocumentActionData Class
- DocumentActionStatus Enum
- DocumentActionType Enum
- DocumentClassificationActionData Class
- DocumentValidationActionData Class
- UserData Class
- Document Class
- DocumentSplittingResult Class
- DomExtensions Class
- Page Class
- PageSection Class
- Polygon Class
- PolygonConverter Class
- Metadata Class
- WordGroup Class
- Word Class
- ProcessingSource Enum
- ResultsTableCell Class
- ResultsTableValue Class
- ResultsTableColumnInfo Class
- ResultsTable Class
- Rotation Enum
- Rule Class
- RuleResult Class
- RuleSet Class
- RuleSetResult Class
- SectionType Enum
- WordGroupType Enum
- IDocumentTextProjection Interface
- ClassificationResult Class
- ExtractionResult Class
- ResultsDocument Class
- ResultsDocumentBounds Class
- ResultsDataPoint Class
- ResultsValue Class
- ResultsContentReference Class
- ResultsValueTokens Class
- ResultsDerivedField Class
- ResultsDataSource Enum
- ResultConstants Class
- SimpleFieldValue Class
- TableFieldValue Class
- DocumentGroup Class
- DocumentTaxonomy Class
- DocumentType Class
- Field Class
- FieldType Enum
- FieldValueDetails Class
- LanguageInfo Class
- MetadataEntry Class
- TextType Enum
- TypeField Class
- ITrackingActivity Interface
- ITrainableActivity Interface
- ITrainableClassifierActivity Interface
- ITrainableExtractorActivity Interface
- TrainableClassifierAsyncCodeActivity Class
- TrainableClassifierCodeActivity Class
- TrainableClassifierNativeActivity Class
- TrainableExtractorAsyncCodeActivity Class
- TrainableExtractorCodeActivity Class
- TrainableExtractorNativeActivity Class
- Document Understanding ML
- Document Understanding OCR Local Server
- Document Understanding
- Release notes
- About the Document Understanding activity package
- Project compatibility
- Configuring external connection
- Set PDF Password
- Merge PDFs
- Get PDF Page Count
- Extract PDF Text
- Extract PDF Images
- Extract PDF Page Range
- Extract Document Data
- Create Validation Task and Wait
- Wait for Validation Task and Resume
- Create Validation Task
- Classify Document
- Create Classification Validation Task
- Create Classification Validation Task and Wait
- Wait for Classification Validation Task and Resume
- Intelligent OCR
- Release notes
- About the IntelligentOCR activity package
- Project compatibility
- Load Taxonomy
- Digitize Document
- Classify Document Scope
- Keyword Based Classifier
- Document Understanding Project Classifier
- Intelligent Keyword Classifier
- Create Document Classification Action
- Create Document Validation Artifacts
- Retrieve Document Validation Artifacts
- Wait For Document Classification Action And Resume
- Train Classifiers Scope
- Keyword Based Classifier Trainer
- Intelligent Keyword Classifier Trainer
- Data Extraction Scope
- Document Understanding Project Extractor
- Document Understanding Project Extractor Trainer
- RegEx Based Extractor
- Form Extractor
- Intelligent Form Extractor
- Redact Document
- Create Document Validation Action
- Wait For Document Validation Action And Resume
- Train Extractors Scope
- Export Extraction Results
- Machine Learning Extractor
- Machine Learning Extractor Trainer
- Machine Learning Classifier
- Machine Learning Classifier Trainer
- Generative Classifier
- Generative Extractor
- Configuring Authentication
- ML Services
- OCR
- OCR Contracts
- Release notes
- About the OCR Contracts
- Project compatibility
- IOCRActivity Interface
- OCRAsyncCodeActivity Class
- OCRCodeActivity Class
- OCRNativeActivity Class
- Character Class
- OCRResult Class
- Word Class
- FontStyles Enum
- OCRRotation Enum
- OCRCapabilities Class
- OCRScrapeBase Class
- OCRScrapeFactory Class
- ScrapeControlBase Class
- ScrapeEngineUsages Enum
- ScrapeEngineBase
- ScrapeEngineFactory Class
- ScrapeEngineProvider Class
- OmniPage
- PDF
- [Unlisted] Abbyy
- [Unlisted] Abbyy Embedded

Document Understanding Activities
This page provides good practices for using the Extract Document Data and Classify Document activities using a Generative Predefined project, as well as the Data Extraction Scope and the Classify Document Scope activities with Data Extraction and Generative Classifier activities respectively.
[...] A task was canceled [...]for Data Extraction Scope with Generative Extractor or Classify Document Scope with Generative Classifier activities.[...] The processing took too long and the timeout value configured on the activity has been reached [...]for Extract Document Data, Classify Document activities.
You may encounter an error such as:
[...] Rate limit exceeded. Please try again later. Error code: [GptRateLimitError] [...].
Possible cause
Document Understanding Generative Services are currently under high load in your region. Please retry your request after a short while.
Possible solution
A recommended approach is to implement a retry mechanism for such errors, allowing the workflow to automatically attempt the operation again after a short delay (we recommend at least 1 minute) instead of failing immediately.
At a high level, the workflows follow the retry logic outlined in the following code block:
+--------------------------------------------------+
| Initialize retry parameters |
| |
| numberOfAttempts = 3 |
| delayBetweenRetriesInSeconds = 60 |
+--------------------------------------------------+
|
v
+--------------------------------------------------+
| Do While (success == false) |
+--------------------------------------------------+
|
v
+-----------------------------+
| Try |
|-----------------------------|
| Run Generative |
| Classify / Extract Activity |
| |
| success = true |
+-----------------------------+
|
+-----------------------------+
| Catch Exception |
|-----------------------------|
| If exception contains |
| "[GptRateLimitError]" |
| |
| If attempt < max retries |
| Delay |
| Else |
| Rethrow exception |
| |
| Else |
| Rethrow exception |
+-----------------------------+
|
v
(Exit Do While)+--------------------------------------------------+
| Initialize retry parameters |
| |
| numberOfAttempts = 3 |
| delayBetweenRetriesInSeconds = 60 |
+--------------------------------------------------+
|
v
+--------------------------------------------------+
| Do While (success == false) |
+--------------------------------------------------+
|
v
+-----------------------------+
| Try |
|-----------------------------|
| Run Generative |
| Classify / Extract Activity |
| |
| success = true |
+-----------------------------+
|
+-----------------------------+
| Catch Exception |
|-----------------------------|
| If exception contains |
| "[GptRateLimitError]" |
| |
| If attempt < max retries |
| Delay |
| Else |
| Rethrow exception |
| |
| Else |
| Rethrow exception |
+-----------------------------+
|
v
(Exit Do While)The following workflows demonstrate how to handle this scenario effectively.
This section shows an example workflow for using the Extract Document Data activity.
This section shows an example workflow for using the Classify Document activity.
This section shows an example workflow for using the Data Extraction Scope activity with Generative Extractor.
This section shows an example workflow for using the Classify Document Scope activity with Generative Classifier.