Free AI template
Structured output with a schema
An extraction prompt, the JSON Schema its replies must follow, and sample replies that should and should not pass.
It opens with this template loaded and runs in your browser. You don't need an account to use it; a free account saves your work and exports it.
The job it does
When an app reads a model's reply: agree the exact JSON shape and catch replies that would break the app. It comes with its own checks, so after you change it you can see at a glance that it still does the job.
How to use it with your own data
Paste replies from your model as samples and adjust the schema until it judges each one the way you would.
What's inside
This is the template exactly as the AI Lab opens it, read-only. Open it to run it, change it and export it.
- 5 sample replies
An extraction prompt and the JSON Schema its replies must follow, with replies that should pass and replies that would break the app. The schema judges every sample as labelled and the prompt passes the linter.
- The schema is valid and judges every sample as labelled
- The prompt passes the linter (no errors or warnings)
You extract structured data from supplier e-mails for Mangrove Market's buying team.
# Task
Extract the supplier name, the product, the quantity and the delivery date from the e-mail in the <email> tags.
# Context
<email>
{{input}}
</email>
# Rules
- Use null for a field the e-mail does not give.
- Dates as YYYY-MM-DD.
# Output format
JSON only, matching: {"supplier": string|null, "product": string|null, "quantity": number|null, "delivery_date": string|null}
# Examples
<example 1>
Input: Hi, Green Valley here. We can send 40 crates of mangoes on 3 June.
Output: {"supplier": "Green Valley", "product": "mangoes", "quantity": 40, "delivery_date": "2026-06-03"}
</example 1>{
"type": "object",
"required": [
"supplier",
"product",
"quantity",
"delivery_date"
],
"additionalProperties": false,
"properties": {
"supplier": {
"type": [
"string",
"null"
],
"minLength": 1
},
"product": {
"type": [
"string",
"null"
],
"minLength": 1
},
"quantity": {
"type": [
"integer",
"null"
],
"minimum": 1
},
"delivery_date": {
"type": [
"string",
"null"
],
"format": "date"
}
}
}| Should | Reply |
|---|---|
| pass | {"supplier": "Green Valley", "product": "mangoes", "quantity": 40, "delivery_date": "2026-06-03"} |
| pass | ```json {"supplier": "Delta Dairy", "product": null, "quantity": null, "delivery_date": null} ``` |
| fail | {"supplier": "Green Valley", "product": "mangoes", "quantity": "forty", "delivery_date": "2026-06-03"} |
| fail | {"supplier": "Green Valley", "product": "mangoes", "quantity": 40, "delivery_date": "3 June"} |
| fail | Supplier: Green Valley, 40 crates of mangoes on 3 June. |
The lesson behind it
Learn why it works, with a podcast and a quiz for each lesson.
More AI templates
RAG chunking for a help page
A help page cut into chunks under a token budget, with questions that must find their answer in the top results.
Agent flow with guardrails
An order-status agent with a step limit, input and output guardrails and read-only tools, that passes the validator.
Cost estimate for an AI feature
A prompt, the expected reply length and traffic, and what it costs per call, per day and per month on each model.