What is prompt engineering?
Prompt engineering is the craft of writing instructions that get consistent, high-quality output from AI models. It's the difference between "meh" and "wow".
The RCTF framework
- Role — who the AI is pretending to be.
- Context — background the model needs.
- Task — the actual job.
- Format — how the output should look.
Add Constraints (length, tone, do/don't) and you have a rock-solid prompt.
Bad vs good prompt
Bad: "Write a blog post about coffee."
Good: "You are a senior food writer for a lifestyle magazine. Write a 700-word blog post about single-origin Ethiopian coffee for hobbyist home brewers. Use a warm, curious tone. Include: 1 intro hook, 3 subheadings, 1 brewing tip, 1 closing question. Avoid clichés like 'liquid gold'."
Advanced techniques
- Few-shot: give 2-3 examples of the output you want.
- Chain-of-thought: ask the model to think step by step.
- Self-critique: ask it to critique and rewrite its own answer.
- Structured output: ask for JSON, tables or markdown for programmatic use.
Practice with real prompts
The fastest way to learn is to study prompts that work. Browse verified prompts and reverse-engineer them.






