← Courses
Building with AI
← Module 3
Module 4 of 8
Module 5 →
Intro
Scenario
Lesson
Context
Lab Skill ~25 min
Intro

Patterns That Work

2 min read

In Module 1, you learned that every prompt needs three parts: role, context, and constraints. But you also learned that prompts can do much more than that if you understand the patterns that AI actually responds to.

Three patterns separate the people who get reliably good output from AI from the people who are constantly disappointed.

Master these three, and your AI interactions level up dramatically. You'll be able to handle complexity that looks impossible if you're just asking questions.

Your artifact
A prompt pattern library with chain-of-thought, few-shot, and persona examples
  • Apply chain-of-thought prompting to unlock better reasoning in complex tasks
  • Use few-shot examples to teach the AI exactly what you want
  • Assign and constrain AI personas to get consistent behavior
  • Combine patterns to solve multi-stage problems
  • Document a prompt pattern that your team can reuse
Scenario

The Plateau

3 min read

A high school teacher has been using AI to create lesson plans for six months. She's good at basic prompting. But something's happening: her outputs have plateaued. Every lesson plan follows the same structure. The same five verbs. The same progression. It's templated, even though she's asking for different topics every time.

A colleague asks: "Why are all your lesson plans the same?" The teacher realizes she doesn't know. She's not doing anything wrong. The AI is doing exactly what she asked. But the outputs have all averaged into a kind of middle ground — correct but mediocre. Reusable but forgettable.

The colleague shows her three techniques she hasn't tried. Same task. Same AI. Completely different outputs.

The first: she asks the AI to think through the lesson structure step by step before writing it. The output goes from templated to thoughtful. The AI reasons about what matters first, then designs around it.

The second: she shows the AI three examples of lesson plans she loves — and asks it to create a plan in that style. The output changes shape. It adopts the rhythm and structure of the examples.

The third: she tells the AI "You are a Socratic tutor who never gives direct answers, only questions." Suddenly the lesson plan shifts from "here's the content" to "here's how to make students discover it."

Three techniques. Same underlying AI. Three completely different outputs.

That's what this module teaches you to do.

Lesson

Three Patterns Every Builder Uses

3 min read

Three patterns are the foundation of professional-grade prompting.

"Think through this step by step before giving me your answer." This works when the task requires reasoning, math, logic, or complex analysis. Instead of asking the AI to jump to an answer, you ask it to show its work first. It catches errors, produces better reasoning, and makes the output auditable. You can see where it went wrong and fix it.

Show the AI 2–3 examples of exactly what you want. Don't describe the style — demonstrate it. The AI pattern-matches to your examples and reproduces that format, tone, and structure. Few-shot beats lengthy instructions every time because examples are unambiguous.

"You are a [specific type of expert] who [constraining behavior]." Not just "You are a writer" — "You are a Socratic tutor who never gives direct answers, only questions." The persona shapes every decision the AI makes. It's more powerful than instructions because it provides context and constraints at once.

Use all three in a single prompt, and the output becomes dramatically more sophisticated.

Context

Choosing the Right Pattern

2 min read

Each pattern solves a different problem. Knowing which to use is the skill.

Use chain-of-thought when:

The task requires reasoning, not just retrieval. Math problems, logic puzzles, complex analysis, planning, diagnosis. The AI needs to show its work to get it right.

Use few-shot when:

You have a specific format, tone, or style that's hard to describe in words. You want consistency. You have examples that demonstrate what you want better than any instruction could.

Use persona when:

You need consistent behavior across a long conversation or multi-turn interaction. You want the AI to maintain a specific perspective or constraint throughout. You want the AI to make decisions in a particular style.

These patterns compound. Use all three at once, and you've solved most hard prompting problems.

⚡ Skill Lab
Pattern Application
~25 minutes · 4 rounds
What you're doing
You'll apply four prompting approaches to the same task. Each adds a pattern. Compare the outputs. See how each pattern changes the result.
The Task
Write a performance review for Jordan, a mid-level engineer. Context: shipped 2 features on time, but 3 major bugs in production. You decide tone and emphasis.
Four rounds
Basic prompt · Chain-of-thought · Few-shot · All three patterns
Framework
Round 1: Basic role/context/constraints
Round 2: Add "think step by step"
Round 3: Add examples of good reviews
Round 4: Add all three patterns
Success criteria
Notice how the output changes with each pattern. Identify which pattern produces the review you'd actually use.
Shift + Enter for a new line
✓ Module Complete
You've completed Module 4 of 8.
Next Module →