Compare two output modes: One-Shot returns freeform markdown, while Structured returns validated JSON conforming to a Zod schema.
Enter a recipe name and click "Generate Recipe" to get started.
Uses Cloudflare Workers AI's native response_format parameter with json_schema. The model (@cf/meta/llama-4-scout-17b-16e-instruct) natively enforces the schema, guaranteeing valid JSON output without prompt engineering.
Traditional prompt engineering approach. The AI generates freeform markdown text based on natural language instructions. No schema enforcement, but allows creative formatting.
Tech Stack: TanStack Start API routes → Cloudflare Workers AI (@cf/meta/llama-4-scout-17b-16e-instruct) → JSON Mode with response_format → Zod validation
response_format parameter enforces schemas at the model level, not via prompts. This eliminates JSON parsing errors.@cf/meta/llama-4-scout-17b-16e-instruct or other supported models.