Chat kitchenTry it → read → next · ~10 min

Tutorials · Chapter B (2/4) · ~10 min

Prompt pattern library

Try it → see it → read → next

Pick the pattern that fits the job — role, few-shot, chain-of-thought, or structured JSON.

On paths: Builder · Student

Optional on: Everyday learner · Bonus on: School kids

Try tools: Chat & LLMs

Try yourself

Playground

Prompt pattern picker

Match the task to the best pattern. No single pattern wins every job.

Recap

What you just did

You matched real tasks to the best pattern — classification, reasoning, APIs, or plain explanation.

Teach

How it works

| Pattern | When to use | |---------|-------------| | Role + task | Drafts, tutoring, tone control | | Few-shot | Repeatable format from examples | | Chain-of-thought | Multi-step logic (show your work) | | Structured JSON | Apps that parse fields |

Stack patterns carefully: role + JSON schema is common in production.

Use it

When you'd use this

  • Building a support triage bot (few-shot or JSON)
  • Homework help with reasoning (CoT)
  • Quick email drafts (role + task)

Watch out

Watch out

JSON mode still needs validation in code — models can emit invalid JSON under pressure.

Try next

Try this next

Open the Prompt recipe and Few-shot how-tos on the reference shelf.