Task, constraints, output
Say exactly what you want back
Role and context set the scene. Now you need the action: what to do, what limits to respect, and what the answer should look like.
What is the task?
The task is like the order you give a taxi driver. "Drive somewhere" gets you nowhere. "Take me to the train station" gets you there.
Start your task with a clear action verb. Vague verbs like "help" or "do something with" make the AI guess.
- Clear verbs: create, list, summarize, rewrite, compare, explain, fix, translate.
- Vague verbs: help, look at, think about, handle.
// Vague
Help me with my resume.
// Clear
Rewrite the 3 bullet points under my last job so they show results with numbers.What are constraints?
Constraints are the rules of the game. They are limits the answer must follow, like a word count or a budget.
Without constraints, the AI picks for you. It might write 800 words when you wanted 50.
- Length: "under 100 words", "exactly 5 ideas", "one paragraph".
- Level: "for a 12-year-old", "no technical words".
- Scope: "only use the text I pasted", "only change the header".
- Must include / must avoid: "include a price", "don't use emojis".
- Practical limits: "budget under $500", "vegetarian only".
Suggest 5 names for my habit tracker app.
Each name must be one or two words, easy to spell, and not use the word "habit".What is the output format?
The output is the shape of the answer. Think of it like choosing a container: a list, a table, or a letter. Pick the one you can use right away.
| Feature | Best for | Ask like this |
|---|---|---|
| Bullet list | Quick ideas, steps | "As a numbered list" |
| Table | Comparing options, plans | "As a table with columns: ..." |
| Markdown | Documents, READMEs, PRDs | "As a Markdown document with headings" |
| JSON | Data an app will read | "As JSON with keys: ..." |
| Plain paragraph | Emails, descriptions | "As one short paragraph" |
JSON (JavaScript Object Notation) is a simple text format that apps use to pass data around. You'll see it a lot when building. Here is how to ask for it:
List 3 easy habits for better sleep.
Return only JSON, with no extra text, in this shape:
[{ "habit": "...", "why": "...", "minutesPerDay": 10 }]And a sample of what you'd get back:
[
{ "habit": "No screens after 10pm", "why": "Blue light keeps you awake", "minutesPerDay": 0 },
{ "habit": "Read a paper book", "why": "Helps your mind slow down", "minutesPerDay": 15 },
{ "habit": "Same wake-up time", "why": "Sets your body clock", "minutesPerDay": 0 }
]Putting all 5 parts together
Here is a template you can copy and fill in. Replace the text in square brackets with your own details.
ROLE:
You are a [job title] who is [style, e.g. patient, direct, friendly].
CONTEXT:
I am [who you are]. I am working on [project or goal].
[Any background the AI needs: audience, tools, situation.]
TASK:
[Clear verb] [exactly what you want].
CONSTRAINTS:
- [Length or size limit]
- [Level or tone]
- [Must include / must avoid]
OUTPUT:
Give me the answer as [list / table with columns ... / Markdown / JSON].And here it is filled in for a study plan:
ROLE:
You are a friendly study coach for university students.
CONTEXT:
I have exams in Math (May 20) and History (May 24). Today is May 6.
I can study 3 hours on weekdays and 5 hours on Saturdays.
TASK:
Create a day-by-day study plan until my last exam.
CONSTRAINTS:
- Leave Sundays free.
- Spend more time on Math, it's my weakest subject.
- Add a short review session the day before each exam.
OUTPUT:
A table with columns: Date, Subject, Topic, Hours.Common mistakes
- Hiding the task in the middle of a long story. Put it on its own line.
- Asking for many tasks at once ("plan, design, and build my app").
- Forgetting the format, then copying the answer into a table by hand.
- Asking for JSON but not saying "only JSON, no extra text". The AI may add a friendly sentence that breaks your app.
- Using limits that fight each other, like "very detailed" and "under 50 words".
Practice
Try these exercises to lock in what you just learned.
What's next?
Even a great prompt rarely gets a perfect answer on the first try. Next, you'll learn how to improve results step by step with iteration.