You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
In the previous lesson, you learned the basics of writing clear prompts. Now we are going to level up. This lesson covers structured prompt patterns — specific techniques that give you fine-grained control over AI output.
Think of these patterns as tools in a toolkit. You do not need to use all of them in every prompt. But knowing what is available means you can reach for the right tool when you need it.
One of the most powerful ways to shape AI output is to assign the model a role. When you tell the model who it "is," you activate a cluster of patterns in its training data associated with that role's expertise, vocabulary, and communication style.
"You are an experienced secondary school physics teacher. Explain Newton's three laws of motion to a Year 9 class. Use everyday examples and avoid mathematical notation."
By assigning the role of "secondary school physics teacher," you are telling the model to:
| Role | Effect on Output |
|---|---|
| "You are a professional copywriter" | Punchier, more persuasive language |
| "You are a patient maths tutor" | Step-by-step explanations, encouraging tone |
| "You are a senior software engineer" | Technical depth, best practices, production-quality code |
| "You are a sympathetic career advisor" | Warm, supportive, practical guidance |
| "You are a strict academic peer reviewer" | Critical, detailed, evidence-focused feedback |
Role prompting is especially useful when:
The model is not actually becoming a physics teacher or a lawyer. It is activating patterns associated with how those professionals communicate in its training data. This means role prompting works best for roles that are well-represented in the training data (teachers, writers, developers) and less reliably for highly niche roles.
Context is the background information the model needs to give you a relevant, useful response. The more relevant context you provide, the better the output.
Task context — What are you trying to accomplish?
"I am writing a business plan for a small bakery and need help with the financial projections section."
Audience context — Who will read or use the output?
"The audience is the school's board of governors, who are non-technical but senior decision makers."
Background context — What has already happened or been decided?
"We have already chosen React for the frontend and PostgreSQL for the database. I need help designing the API layer."
Constraint context — What limitations exist?
"The budget is limited to £5,000 and we need to launch within 3 months."
One of the most powerful uses of context is pasting the actual text you want the model to work with. Instead of describing what you need, give the model the raw material:
"Here is a research paper abstract. Summarise the key findings in three bullet points suitable for a non-specialist audience:
[paste the abstract here]"
This works brilliantly for:
Constraints are explicit boundaries you set on the output. They prevent the model from being too verbose, going off-topic, or using an unwanted style.
Length constraints:
Format constraints:
Content constraints:
Style constraints:
Audience constraints:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.