Skip to main content

Extract with examples

Extract fields with AI, showing the model the latest validated examples of the same document type so it follows how your documents are read.

Command in the Document processing toolkit · id ooa.idp/extract_with_examples · 11 inputs (2 required), 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesThe document's text.
FieldsDictionaryYesField name to what it is.
Examples fileFileNoThe example file Save validated example writes; none: no examples.
Document typeStringNoWhich type's examples to use.
Maximum examplesNumberNo3The newest this many examples go with the request.
ConnectionStringNoName of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action.
ProviderStringNoopenaiWho runs the model: OpenAI, Azure OpenAI, Anthropic, OpenAI-compatible (LiteLLM, vLLM, Ollama), Hugging Face (its router or your own TGI server), AWS SageMaker (a model on an Amazon SageMaker endpoint), AWS Bedrock or Google Vertex AI (Gemini).
ModelStringNoModel name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock.
API keyCredentialNoAPI key or access token from the vault (not needed for some self-hosted endpoints). For AWS Bedrock and AWS SageMaker: the AWS secret access key (or ACCESS_KEY_ID:SECRET). For Google Vertex AI: a service-account JSON key or an access token.
Endpoint addressStringNoEndpoint; required for Azure OpenAI, Vertex AI (https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/REGION) and self-hosted models (for a TGI server, e.g. http://tgi-host:8080/v1).
Hide personal dataBooleanNotrueReplace emails, phone and card numbers, IBANs and similar before sending; restored in the answer.

Outputs​

OutputTypeWhat it is
fieldsDictionaryField name to value (null when not found).
examples_usedNumberHow many examples went with the request.