The 4 parts of a good prompt
Why it matters: A structured prompt reduces ambiguity and makes outputs repeatable.
Goals
- Name the 4 parts of a good prompt.
- Rewrite a weak prompt into a strong one.
- Add criteria so output is testable.
Key definitions
- Context: Relevant background so the model knows the situation and constraints.
- Task: What you want produced (draft, summary, table, plan) in clear terms.
- Constraints: Rules: format, length, tone, excluded items, do/don’t, must-include.
- Success criteria: How you judge quality (checklist, rubric, examples of good/bad).
Workflow (step-by-step)
- Write one sentence of context (who, what, why).
- Write the task as an output request (deliverable + format).
- Add 3–7 constraints (tone, length, must include/exclude, structure).
- Add success criteria (checklist + 1 good / 1 bad example).
- Ask for clarification questions when missing inputs.
Example (good vs bad)
✅ Good: Prompt includes context + task + constraints + checklist; the output is structured and easy to verify.
❌ Bad: Prompt says “Write something about X” with no audience, constraints, or success definition.
Checklist
- Context is 1–3 sentences.
- Task specifies output format.
- Constraints include must-include and must-not.
- Success criteria is explicit.
Metrics / criteria
- Measurable: You can say whether the output is correct/complete (pass/fail or a score).
- Effort: You can produce the result in 15–30 minutes using the workflow.
- Clarity: Another person can run your prompt and get a similar outcome.
- Repeatability: 2 runs produce outputs that meet the same checklist.
Common mistakes + fixes
- Pitfall: Constraints missing or conflicting. Fix: Keep constraints short; remove contradictions; add a priority order.
- Pitfall: No examples. Fix: Add a small “good vs bad” snippet to anchor style and structure.
- Pitfall: Vague instructions. Fix: Add constraints, examples, and a success checklist.
- Pitfall: One-shot prompting. Fix: Iterate: draft → critique → revise → verify.
- Pitfall: No validation. Fix: Add QA steps, tests, and explicit “what counts as done”.
Student tasks
- Apply the workflow to one real work task related to the 4 parts of a good prompt.
- Create a small artifact: prompt, checklist, rubric, table, draft, or decision note.
- Run one quality check and record what changed after the check.
- Write a 3-sentence reflection: what worked, what failed, and what you will reuse.
Useful external sources
- OpenAI prompt engineering guide: https://platform.openai.com/docs/guides/prompt-engineering — Prompt structure, iteration, constraints, and evaluation habits.
- NIST AI Risk Management Framework: https://www.nist.gov/itl/ai-risk-management-framework — Risk framing, governance language, and verification mindset.
- OWASP Top 10 for Large Language Model Applications: https://owasp.org/www-project-top-10-for-large-language-model-applications/ — Practical AI safety risks such as prompt injection, leakage, and insecure output handling.
- Google People + AI Guidebook: https://pair.withgoogle.com/guidebook/ — Human-centered AI design, user control, feedback, and failure modes.
Bibliography
- OpenAI prompt engineering guide. https://platform.openai.com/docs/guides/prompt-engineering
- NIST AI Risk Management Framework. https://www.nist.gov/itl/ai-risk-management-framework
- OWASP Top 10 for Large Language Model Applications. https://owasp.org/www-project-top-10-for-large-language-model-applications/
- Google People + AI Guidebook. https://pair.withgoogle.com/guidebook/