Ask AI to extract
Asks a model to pull structured values out of text, shaped by a schema.
Ask AI to extract prompt into into
Details #
Gives the model your prompt (including the text to read) and a schema describing the fields you want, and returns an object that matches it.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
prompt | text | Yes | Required. The instruction and the text to read. | |
schema | record | Yes | Required. A JSON Schema object with "type": "object" and the fields under properties. The answer is checked against it. A bare {"date": "string"} is not a schema and fails. | |
dryRunUsesModel | yes / no | true lets a dry run call a cloud model. | ||
hud | yes / no | false turns off the "Thinking…" HUD with the AI badge that shows while the model works. On by default; a dry run never shows it. | ||
into | text | The variable for the extracted object. | ||
model | text | haiku or sonnet, for the cloud; or a model name when provider is a provider id. | ||
preset | text | An AI preset from Settings › AI (its id), or default for the default preset. Pick one in the Inspector's Model menu; renaming a preset changes nothing here, and a deleted one runs on the default preset with a warning. Without it the step behaves as before. | ||
provider | text | auto, device or cloud; or a provider id (anthropic, openai, gemini, or an OpenAI-compatible server's id) together with model. | ||
sample | any value | What a dry run answers when no model runs. Give it an object shaped like the schema. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Ask AI to extract “Find the date and total in: {{receipt}}”
Gotchas #
Where it runs.
providerisauto(the default),deviceorcloud.autouses Apple Intelligence on this Mac when it is on and the request fits its small window (about 4,000 tokens), otherwise your cloud model (your own Anthropic key first, then your Switchboard plan).devicenever leaves the Mac and fails if it is off or the text is too long.cloudneeds a model set up in Settings > AI. model (haiku, the default, orsonnet) only matters for the cloud.Output. The answer goes into
into. The step's own output also carriesvalue,provider(device,own-keyorplan),model,ms,tokensIn,tokensOutandcents, plusrepaired: truewhen the first answer was rejected.A bad answer. If the answer does not fit, the model gets one second try with the errors. If that fails too, the step fails and follows its
onFailure.Time limit. These steps get 60 s by default, not 10 s.
Dry run. These steps are safe in a dry run. The on-device model runs for real. A cloud model does not (it costs money): the step answers with
sample, or an empty string, unless you setdryRunUsesModeltotrue. If no model is set up, a dry run usessampletoo.Text you send to a cloud model leaves your Mac. Do not send secrets or private data to it.
Read a field later as
{{found.total}}.