Combine an expert role, strong constraints, few-shot examples, step-by-step reasoning, and iteration to get answers that genuinely make you learn.
Open this lesson in KodokonThe quality of what the AI teaches you depends directly on the quality of your prompts. A vague prompt - "explain generics to me" - produces a generic answer, calibrated for an average reader who doesn't exist. Four techniques radically change the yield, and they combine: the expert role (setting who's speaking and with what standard), strong constraints (length, prerequisites, prohibitions, format), few-shot examples (showing the expected format instead of describing it), and step-by-step reasoning (demanding the method before the conclusion). The fifth isn't a writing technique but a posture: iteration - the first answer is a draft you refine, never a finished product.
You're a senior instructor in [tech], known for your dense, filler-free explanations.
Explain [precise concept] to me with these constraints:
- Assume I already know [prerequisites]: don't re-explain any basics.
- 200 words maximum, then ONE minimal commented example.
- End with ONE question that tests whether I truly understood - not a recall question, an application question.
- If the concept has a classic gotcha in production, flag it in one sentence.
Wait for my answer to your question before continuing. If my answer is wrong, don't give the correction: point out where my reasoning goes off track and let me try again.Let's break it down. The role isn't there to flatter the model: it shifts the register of the answer - vocabulary, level of abstraction, standard. The constraints do the rest: "200 words maximum" cuts the filler, "don't re-explain any basics" spares you three paragraphs you already know, and the closing question turns passive reading into active recall - the best-established mechanism of memorization. General rule: a vague constraint produces a vague result. "Be concise" constrains nothing; "200 words, one example, one question" constrains everything. On to few-shot: when describing the format gets tedious, show it.
I'm reviewing [topic]. Generate practice questions in the EXACT format of the two examples below.
Example 1:
Situation: a query returns 10,000 rows while the screen shows 20.
Question: which mechanism avoids loading everything, and what's its hidden cost?
Level: intermediate.
Example 2:
Situation: two users modify the same resource one second apart.
Question: which conflict-handling strategy should you choose here, and why?
Level: advanced.
Generate 5 questions on [topic] following this format: a concrete situation drawn from real work, an open-ended question that forces reasoning (never rote recall), a level. Don't give the answers: I'll answer one by one and you'll correct me by pointing out what my reasoning is missing.Few-shot exploits models' foremost strength: pattern continuation. Two well-chosen examples specify the tone, the granularity, and the structure more precisely than ten lines of instructions - and your examples also set the standard. Last writing technique: step-by-step reasoning. For any non-trivial question, demand the method before the conclusion. An answer that opens with the conclusion deprives you of the essential: the path, which is precisely what you're trying to learn. Bonus: explicit reasoning exposes its own flaws - you catch the false assumption about your context before swallowing a wrong conclusion.
Before answering, reason in visible steps.
My question: [non-trivial technical question].
Required format:
1. Restate my question to confirm you've understood it.
2. List the assumptions you're making about my context (versions, architecture, volume). I'll correct the ones that are wrong.
3. Walk through your reasoning step by step, flagging each point where another path was possible and why you didn't take it.
4. Conclude by separating what's certain from what depends on my answers to point 2.
Write the conclusion only after the reasoning, never before.That leaves iteration, the skill that sets the advanced user apart. Never restart a prompt from scratch when the answer disappoints: diagnose the gap and fix the missing constraint. Too long? Impose a limit. Too generic? Add your context and an example. Off-topic? The restatement in point 1 shows you where the misunderstanding crept in. Three or four targeted iterations produce answers no initial prompt, however careful, could have obtained - and each iteration teaches you something about what you were really looking for.