Chapter 4 · LLM Fundamentals
Prompting Techniques: Few-Shot, Roles, Constraints
Level up with examples, roles, and constraints.
- Lesson 1
Few-Shot Prompting Explained (With Examples)
What is few-shot prompting? Learn zero-shot, one-shot, and few-shot prompts, with an example of teaching AI your labels and format.
- Lesson 2
Role Prompting: How 'You Are a…' Changes AI Answers
Role prompting tells AI who to act as, like a tutor or editor. Learn what roles change in an answer and what they cannot do.
- Lesson 3
How to Use Constraints in AI Prompts
Word limits, reading level, banned words, required structure: learn to write specific, checkable constraints that AI actually follows.
- Lesson 4
Iterative Prompting: Improve AI Prompts Step by Step
Great prompts take a few tries. Learn the write–read–adjust loop and which fix to try when an AI answer is too long, off-topic, or badly formatted.
Play this chapter as a quest
Answer a quick question after each lesson to earn XP and the chapter badge.