Extract fields
Extract named fields from text (an email, a contract) into a Dictionary; missing fields come back empty.
Command in the Generative AI toolkit · id ooa.genai/extract · 11 inputs (2 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Source text. | |
| Fields | Dictionary | Yes | Field name to description, e.g. {"invoice_number": "the invoice id", "total": "amount due as a number"}. | |
| Provider | String | No | openai | Who 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). |
| Connection | String | No | Name of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action. | |
| Model | String | No | Model name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock. | |
| API key | Credential | No | API 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 address | String | No | Endpoint; 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 data | Boolean | No | false | Replace emails, phone and card numbers, IBANs and similar before sending; restored in the answer. Off by default because extraction often needs those details. |
| AWS access key ID | Credential | No | AWS Bedrock and AWS SageMaker only: AWS access key id from the vault (api_key then holds the secret access key). | |
| AWS region | String | No | AWS Bedrock and AWS SageMaker only: AWS region, e.g. eu-west-1. | |
| Minimum confidence | Number | No | 0 | 0 (off) to 1: the model also says how sure it is of each field; fields below this send the values to a person (needs_review, validation). |
Outputs
| Output | Type | What it is |
|---|---|---|
| fields | Dictionary | Field name to value. |
| confidence | Dictionary | With min_confidence: field name to how sure the model is, from 0 to 1 (0 for a missing value). |
| needs_review | Boolean | With min_confidence: true when any field is below it, so a person should check the values. |
| validation | Dictionary | With min_confidence and a field below it: {fields, confidence, min_confidence}. Return it as the agent's output named validation from a work-queue run, and the item waits in the queue for a person to check it. |