Get reliable, parseable answers instead of free text.
Starting with Anatomy of a prompt, System prompts, Prompt patterns, Zero-shot and few-shot, Structured output, Validating and repairing output, Testing prompts, and more
In a picture
Say exactly what you want, with the context it needs.
Try it on real inputs, not just the happy path.
Check outputs and change one thing at a time.
Stage 1 of 3: Write
Open the full conceptMade for you now: slide lessons from basics to production, usually with code and a quiz. See a finished one
Get reliable, parseable answers instead of free text.
AI EngineeringStage 4 of 17: Prompting and structured output
Start with these 7. 11 more are one tap away.
Instructions, context, examples and output format, and the order they go in.
Set role, rules and tone once for the whole conversation.
System prompts, examples and step-by-step instructions.
When one to three examples beat a longer instruction.
JSON schemas, validation and repair.
Parse, check and retry when the model returns bad data.
Compare prompt versions on a fixed set of cases.