Skip to main content

Intelligent Document Processing

Intelligent Document Processing (IDP) turns document content into classifications, extracted values, and analysis results. OCR, classification, metadata extraction, and a free-form AI prompt are different steps. The eight operations below are in the v1.19.2 API specification; the licensed module and its model configuration must also be installed. An operation in the schema does not mean every Core deployment can execute it.

Configure a repeatable prompt​

  1. Select the workspace and confirm the AI module and Bedrock execution permissions/model access for the chosen region.
  2. In Orchestration → Extraction → LLM prompts, create a named prompt, for example invoice-summary. Configure its model, system instructions, user prompt, and analysis category as offered by the installed module. System prompts can reference a Markdown document and a pinned artifact/revision.
  3. Define output fields and validation before running production content. Treat document text as untrusted input and ask the model to report missing evidence instead of inventing it.
  4. Upload a fictional document. Run OCR first if the selected input path needs recognized text; an empty scanned PDF text layer is not useful extracted text.
  5. Run the prompt, inspect its stored result, and configure a mapping only after validating representative successes and failures.

Prompts are PRESET LlmPrompt entities. Reserved attributes include UserPrompt, LlmSystemPrompt, LlmSystemPromptDocumentId, LlmSystemPromptArtifactId, LlmModelId, and LlmAnalysisCategory. Use the configured entity name in llmPromptEntityName; it is not an arbitrary prompt string or document ID.

All eight operations​

Method and pathPurposeResult collection / object
GET /documents/{documentId}/dataClassificationRead classification history.dataClassifications, optional next.
PUT /documents/{documentId}/dataClassificationRun classification using llmPromptEntityName in the body.content, attributes.
GET /documents/{documentId}/metadataExtractionResultsRead extraction results across named prompts.metadataExtractions, optional next.
GET /documents/{documentId}/metadataExtractionResults/{llmPromptEntityName}Read extraction history for one prompt.metadataExtractions, optional next.
POST /documents/{documentId}/metadataExtractionResults/{llmPromptEntityName}Run extraction for the configured prompt.content, attributes.
GET /documents/{documentId}/ai/promptsRead analysis history across prompts.Named aiPromptResults, optional next.
GET /documents/{documentId}/ai/prompts/{llmPromptEntityName}Read analysis history for one prompt.aiPromptResults, optional next.
POST /documents/{documentId}/ai/prompts/{llmPromptEntityName}Run an analysis prompt, optionally overriding modelId.systemPrompt, aiPromptResult.

Pass the correct siteId and any supported artifact selector. Follow all continuation tokens when reading history. Result records include content, timestamp, requesting user, and prompt name where specified. Classification/extraction attributes use their result schema; they are not automatically a complete replacement for the document's ordinary metadata.

Run and inspect a prompt​

After configuring invoice-summary, call:

curl -X POST "${HTTP_API_URL}/documents/${DOCUMENT_ID}/ai/prompts/invoice-summary?siteId=${SITE_ID}" \
-H "Authorization: ${AUTHORIZATION_TOKEN}" \
-H 'Content-Type: application/json' \
-d '{}'

Illustrative response, with model-dependent text:

{
"systemPrompt": "Summarize the invoice using only the supplied evidence.",
"aiPromptResult": {
"analysisCategory": "invoice-summary",
"insertedDate": "2026-11-16T12:00:00Z",
"content": "Invoice INV-2026-1001 totals $1,250.00."
}
}

Read it again using GET on the same path. Running POST again can invoke the model and create another result; use GET to retrieve existing work.

Classification uses a body such as {"llmPromptEntityName":"invoice-classifier"} on its PUT endpoint. Metadata extraction selects the named prompt in its path. The schema does not accept an arbitrary user prompt body for those operations.

Automate carefully​

Use supported document actions, workflow steps, and mappings to connect validated results to attributes and review queues. The documented LLMPROMPT action accepts llmPromptEntityName and optional modelId; other processing families have their own configuration. Record the prompt/model version and source revision for reproducibility.

The direct API operations return the declared response when complete; an action/workflow can run asynchronously. Inspect action status instead of repeatedly issuing inference requests after a timeout. Check errors and limits for retry guidance.

Common failures​

SymptomCheck
Operation unavailableInstalled module, licensed edition, endpoint, and deployed backend version.
Prompt not foundExact name, PRESET namespace, workspace, and permissions.
Model access deniedExecution role, model/inference-profile access, region, and provider setup.
Empty or incorrect extractionSource text/OCR, prompt instructions, output schema, mappings, and evidence.
Duplicate resultsRepeated POST/PUT invocations after timeouts; fetch history and reconcile before retrying.

AI Processing and Analysis explains deployment boundaries. See the IDP API operations for exact parameters and response schemas.