Lesson 2. The Prompt as a Technical Specification#
Why This Matters#
A prompt isn't just a question. It's an instruction to the model on how to work. A good prompt = a quality answer.
Key Idea#
Prompt = role + task + data + format
The clearer you formulate, the better the result.
Structure of a Good Prompt#
1. Role
Who is the model in this situation?
Examples:
- "You are a customer support manager"
- "You are a marketing expert"
- "You are an executive assistant"
Why: the role sets the style and tone of the answer.
2. Task
What should the model do?
Examples:
- "Answer the client's question about delivery"
- "Analyze reviews and highlight the main issues"
- "Draft a letter to the client"
Why: the task defines the action.
3. Input Data (Context)
What information is needed for the answer?
Examples:
- "Delivery terms: 2–5 days, free from $50"
- "Client reviews: [list]"
- "Client info: order #123, paid"
Why: data = facts for the answer.
4. Response Format
How should the result look?
Examples:
- "Answer briefly, 2–3 sentences"
- "List issues as a bullet list"
- "Format the letter with greeting and signature"
Why: format makes the answer usable.
Example of a Bad Prompt#
"Answer the client about delivery"
Problems:
- no context (what are the delivery terms?)
- no format (how to answer?)
- no constraints (what to say if we don't know?)
Model's answer:
"Hello! Delivery usually takes 1–3 days, free from $30."
← may be incorrect
Example of a Good Prompt#
You are a support manager for an online clothing store.
Task: answer the client's question about delivery.
Delivery terms:
- Nationwide: 3–7 days, free from $50, otherwise $3
- Local: 1–2 days, free from $30, otherwise $2
- Delivery by courier or to pickup point
Response format:
- Polite tone
- 2–4 sentences
- If the client didn't specify city, ask
Client's question: {question}
Model's answer: "Hello! Nationwide delivery takes 3–7 days, free for orders over $50, otherwise $3. For local delivery we deliver in 1–2 days, free from $30. Please specify your city for accurate information."
Prompt Template#
You are [role].
Task: [what to do].
Context/data:
- [information 1]
- [information 2]
- [information 3]
Rules:
- [constraint 1]
- [constraint 2]
Response format:
- [how to format]
Input: [question/text/data]
Example Prompts for Different Tasks#
Example 1: FAQ Bot
You are an assistant for the beauty salon "Beauty Spot".
Task: answer clients' frequent questions.
Knowledge base:
- Hours: Mon–Fri 10:00–20:00, Sat–Sun 11:00–19:00
- Address: 123 Main St
- Services: haircut, coloring, manicure, pedicure
- Prices: haircut from $15, coloring from $30
Rules:
- If you don't know the answer, say: "I'll check with the receptionist"
- Offer to make an appointment
- Friendly tone
Response format:
- Brief, 2–3 sentences
- If the client wants to book, ask for name and phone
Client's question: {question}
Example 2: Lead Qualification
You are a sales assistant at a digital agency.
Task: ask the client clarifying questions and score the lead.
Questions:
1. What's the task? (website, ads, SMM, etc.)
2. Is there a budget? (under $5k, $5–20k, $20k+)
3. When is it needed? (urgent, within a month, planning)
Scoring:
- Hot: budget $20k+, urgent
- Warm: budget $5–20k, within a month
- Cold: others
Response format:
- Ask questions one by one
- After answers, output: "Lead: [score]"
- Hand off to manager if hot or warm
Client's request: {request}
How to Test Prompts#
- Write the prompt
- Test on 5–10 typical requests
- Find errors:
- does the model make things up?
- wrong format?
- wrong tone?
- Refine the prompt:
- add data
- strengthen rules
- add examples
- Repeat
Check Your Understanding#
- What parts make up a good prompt?
- Why is the role needed in a prompt?
- Why is it important to specify the response format?
- How do you test a prompt?