The 5-Part Prompt Framework — Claude
Every strong prompt combines five parts: Role (who the AI should act as), Context (background info it needs), Task (the specific ask), Format (how you want the output structured), and Constraints (length, tone, things to avoid).
The prompt
Role: You are a meticulous technical editor. Context: The attached text is a beginner tutorial on Python loops. Task: Rewrite it for clarity without changing the meaning. Format: Return only the corrected text, no explanations. Constraints: keep it under 200 words, 8th-grade reading level.
Pro tip: If an answer feels generic, you almost always forgot the "Context" or "Constraints" part — add them back in.
How to use this prompt
- Copy the prompt using the button above.
- Add any context specific to your situation — the more specific you are, the better the output.
- Paste it into Claude and run it.
- If the answer feels generic, add constraints: audience, length, tone, and what to avoid. That single change fixes most weak output.
Learn the technique
The 5-Part Prompt Framework
Module 1 — Anatomy of a Prompt · Prompt Engineering Fundamentals
Related prompts
The 5-Part Prompt Framework — ChatGPT
Every strong prompt combines five parts: Role (who the AI should act as), Context (background info it needs), Task (the specific ask), Format (how you want the output structured), and Constraints (length, tone, things to avoid).
ChatGPTZero-Shot vs Few-Shot Prompting — ChatGPT
Zero-shot means asking directly with no examples.
GrokZero-Shot vs Few-Shot Prompting — Grok
Zero-shot means asking directly with no examples.
ChatGPTChain-of-Thought Prompting — ChatGPT
Asking a model to "think step by step" before answering measurably improves accuracy on reasoning, math, and multi-step logic tasks because it forces the model to externalize intermediate steps instead of jumping to a guess..
ClaudeChain-of-Thought Prompting — Claude
Asking a model to "think step by step" before answering measurably improves accuracy on reasoning, math, and multi-step logic tasks because it forces the model to externalize intermediate steps instead of jumping to a guess..
ChatGPTStructured Output (JSON & Tables) — ChatGPT
When you need output your app or spreadsheet can actually use, explicitly request a schema.
Topics
Related across the site
Prompt
A prompt is the input you give an AI model to produce an output. Effective prompts specify five things: the role the model should adopt, relevant context, the specific task, the output format, and any constraints.
Prompt engineering
Prompt engineering is the practice of designing model inputs that reliably produce the output you want. It combines clear instruction-writing, structured formatting, worked examples, and systematic testing.
Prompt Engineering Fundamentals
Learn the building blocks of a great prompt — role, context, task, format, and constraints — and how ChatGPT, Claude, Perplexity, and Grok each respond differently to the same instructions.
System prompt
A system prompt is a standing instruction that shapes a model's behaviour across an entire conversation, separate from individual user messages. It typically defines persona, rules, tone and output format.
Build a Personal Study Assistant
Turn a stack of lecture notes into a study partner that quizzes you, explains what you got wrong, and tracks which topics you keep failing. You will finish with a reusable system prompt you can point at any subject.
Summarise Without Losing the Point
Compress a long document to a tenth of its length while keeping what matters, then verify nothing important was dropped. Tests whether you can direct compression rather than just requesting it.