Structured Output (STRUCTURED_OUTPUT)
Lets an AI model pull data out of free text and pass it on as a structured list — for example all orders mentioned in an email, each with date and amount.
Category: Data Sources · Deployed: yes · Tool-capable: no
Ports
| Port | Kind | Purpose |
|---|---|---|
Text ( |
Input |
The free text to read |
Result ( |
Output |
A JSON list of the extracted items |
Properties
Use Select AI Server & Model to fill in all model fields at once.
| Field | Required | Meaning |
|---|---|---|
Input ( |
No |
Meant as a text to use when no previous module sends one. Currently it has no effect — the module always reads the previous module’s result |
Model Provider ( |
Yes |
|
Model Name ( |
Yes |
The model, for example |
Model URL ( |
Yes |
The address of the model server, for example |
API Key ( |
No |
Needed for |
Model Timeout (min) ( |
No |
How long to wait for one answer of the model, 1–120 minutes. Default: 20. Higher → long texts can finish. Lower → a stuck call fails sooner |
Expected JSON Schema ( |
No |
The shape every list entry must have, as a JSON Schema (which fields, which types). With a schema → every entry has the same fields, so the next modules can rely on them. Empty → the model chooses the fields itself, and they can differ between runs |
How it works
The model gets the text with the instruction to put the relevant items into a JSON list. There is no field for your own instruction — the schema is how you say what to extract. Field names and descriptions in the schema guide the model.
-
Without a schema, any JSON list the model writes is accepted.
-
With a schema, every entry is checked against it. If the model’s first answer does not fit, it gets the errors and one more try. If that also fails, the run stops with an error.
-
If the model finds nothing, the result is
[]. An empty input also gives[], without a model call. -
If the model answers without any JSON list, the run stops with an error.
Example schema for orders:
{
"type": "object",
"properties": {
"date": { "type": "string", "description": "order date, YYYY-MM-DD" },
"amount": { "type": "number" }
},
"required": ["date", "amount"]
}
Use cases
-
Turning prose into rows: an email or report becomes a list you can process entry by entry.
-
Before a check: produce JSON, so a Validator in
CONDITIONmode has a field to test. -
One shape for varied input: different documents become entries with the same fields.
Notes
-
An invalid schema stops the whole pipeline. If the Expected JSON Schema is not valid JSON, the agent server refuses the pipeline when it is registered.
-
The result is always a list, even for a single item. Use Iterator to handle the entries one by one.
-
This is a model call, with its cost and waiting time — with a schema, up to three calls. For mechanical reshaping, a Python Script is cheaper and gives the same result every time.