All resourcesCheatsheet
Prompt Engineering Cheatsheet
Patterns for reliable prompts: roles, structure, examples, constraints.
Content
Use a system prompt to establish role and rules. Be specific about output format. Provide examples (few-shot) for non-trivial formats. Constrain with JSON schemas. Ask the model to think step-by-step for reasoning. Use delimiters for untrusted content. Set temperature 0 for extraction, 0.7 for creative. Always validate output. Version your prompts. Evaluate before shipping.