Delphi AI task
Ask the AI a question as a step in your process
When to use an AI task
An AI task lets your process ask a language model one question. The next steps use the answer. For example:
- summarise an incoming request and give it an urgency
- pick out the supplier and the amount from an invoice
- write a draft reply to a customer question for an employee to check
If the AI should decide which steps to take and in which order, use the agent block instead. For how AI works in Odigos, which data leaves your environment and what it costs, see How AI works in your processes.
The settings below follow the order of the Delphi AI task panel. After them, you'll find what happens when the step runs and when Orchestra rejects a save.
Settings
Result contract for the response (optional)
The result contract sets the shape of the answer: which fields it has and of which type. The answer is checked against it, and its fields become tags in the next steps. The list only shows result contracts. If you choose Free answer, no fixed format, the answer is a single text.
Question (required)
What the AI should do. You can use tags. For example: "Summarise this request in three sentences and say how urgent it is", followed by a tag with the text of the request.
Files for the model (optional)
PDFs and images the model reads along with the question, for example an invoice. Enter a saved file, or a tag that points to an upload field. You can add up to 5 files, each up to 10 MB and up to 20 MB in total. This only works with GPT or Claude, on a model that reads files. A file that doesn't belong to a record is only sent if Budget allows it.
Role description (required)
Who the AI is and how it behaves. For example: "You are a customer service employee who writes short, friendly replies." You can use tags.
Extra context or instructions (required)
The rules and background the AI needs, such as which urgency levels exist and when something counts as urgent. You can use tags.
What does this step cost?
The estimate for the saved version of the step: the expected and the maximum cost of one run. Enter the number of runs per month to see the monthly amount as well. A change is included once you save the process.

Advanced settings
Maximum number of tokens (required, default 1000)
The maximum length of the answer. A token is a small piece of text. Orchestra rejects a save above 8000. Some OpenAI models count their reasoning towards this number; on those models, Orchestra rejects a value below 2000.
JSON output required
The AI is told to answer in JSON. If the answer isn't valid JSON, the step stops. With a result contract, this is on automatically.
Retries when the answer does not fit the result contract (default 1)
How many times the AI tries again when the answer doesn't meet the result contract. Each retry includes the error. With 0, the step stops right away. This only works with a result contract.
Regex to validate the answer (optional)
A pattern the answer must match. The AI receives the pattern as an instruction. If the answer doesn't match, the step stops.
AI engine
The AI provider that does the work: GPT (OpenAI), Claude (Anthropic) or Delphi (own model host). If you leave it empty, GPT is used. GPT and Claude need a connection in Hub, under AI providers. Delphi doesn't read files.
Model (required)
There is no default model. Each model in the list shows its price per million tokens, for what the step sends and for what the model writes back. It also shows whether the model can stick to a fixed format, its default thinking effort and what we have measured of it. With a result contract, the model must be able to stick to a fixed format. Choose the lightest model that can handle the task.
Thinking effort (optional)
How deeply the model reasons: Low, Medium or High. Leave it empty to use the model's default. A lower effort is cheaper and faster, but the model reasons less deeply. If the model doesn't support thinking effort, Orchestra rejects the save.
Deliberate exception to a cost rule (optional)
If Orchestra rejects a save because of a cost rule, but this step needs to be different on purpose, choose the rule and explain why in at least 10 characters. Anyone who reads the process later sees the decision and the reason. The rules are listed below.
What happens when the step runs
- Odigos fills in the tags in the question, the role and the context. If any of these fields has the security level Confidential or Restricted, or the GDPR level High or Special category, nothing is sent to the AI and the step stops with a message.
- If a file is still being scanned, the step waits until the scan is finished.
- The question is sent to the chosen provider and model, together with the files.
- Odigos checks the answer. If it must be JSON or match a regex and it doesn't, the step stops. If the answer doesn't meet the result contract, the AI tries again with the error included. If the last retry still fails, the step stops with a message about the fields that were wrong.
- The answer is ready for the next steps. With a result contract, you use each field as a tag. Without one, the answer is a single text.
When the daily AI limit in Budget is reached, no more questions are sent. The step pauses with a message. Raise the limit and start the step again.
When Orchestra rejects a save
Orchestra rejects the process when you save it if:
- the question, the role description, the extra context or the maximum number of tokens is empty
- no model is chosen
- the chosen result contract doesn't exist on this environment
- the model can't stick to a fixed format while the step has a result contract
- a thinking effort is set on a model that doesn't support it
- the step sends files to Delphi, or to a model that doesn't read files
- a later step uses a field of the answer that isn't in the result contract
Orchestra also checks five cost rules. For each rule, you can set a deliberate exception with a reason on the AI task.
- lijst (list): the question contains the full result of a lookup step without a limit. Every row is then sent with every question, and the list grows with your data. Only put the part you need in the question.
- vertakking (branch): a gateway decides on the free answer of an AI task without a result contract. Give the AI task a result contract with fixed choices and let the gateway decide on that field.
- tokens: the maximum number of tokens is above 8000, or below 2000 on an OpenAI model that counts its reasoning.
- herhalingen (retries): the step can call the AI more than 4 times per run. That is the number of attempts the step makes on an error, multiplied by the number of answer attempts with a result contract.
- startfilter: the process starts on every change to a record, without a filter on a field. Every save of such a record then costs a question to the AI. Give the start a filter on a field, or start on a more specific event. This exception only applies once every AI task in the process has it.
Note: don't let a gateway decide on a free answer. If you want to take a different route after the AI task, for example for an urgent request, give the AI task a result contract with a choice field, such as urgency with the values low, medium and high. Then let the gateway decide on that field.
See also
- How AI works in your processes: which data leaves your environment and what it costs
- View your environment's usage in Budget: what AI costs and the daily limit
- Gateways: decide on a field from the answer
- Block types: every block at a glance