Get better answers from AI

Writing Better AI Prompts. A handbook of look-up entries: clear instructions, context, structure, examples and checking the output.

20 lessons · 43 min of video · 9 quiz questions

Video 3: Prompt Structure – Role, Context, Task, Constraints, by Million Dollar Flow

Try a question from this course

Which instruction tells the AI when to stop asking and start writing?

What you'll be able to do

  • Write prompts with a role, context, task and constraints
  • Brief an assistant, or have it interview you, to supply missing context
  • Structure long prompts with tags, ordering and examples
  • Check and test AI output instead of trusting the first draft

What's in it

  1. Structure a prompt

    The parts every good prompt has, and how specific to be.

    1. Role, context, task, constraints: the four-part prompt
    2. Why vague prompts fail and how specific to be
    3. Briefing the AI like a new hire: what I have, what I need, the rules
    4. Having the AI interview you before it writes
    5. Recap
  2. Techniques: examples, tags, thinking

    Tools for making a prompt precise: define terms, mark sections, show examples, let the model reason.

    1. Five quick tips for better results (describe, tag, exemplify, long context, think)
    2. Separating instructions from data, and ordering a long prompt
    3. Where to put unchanging background, and how to describe messy input
    4. Telling the model what order to work in
    5. Controlling the output format: tags and prefilled responses
    6. Recap
  3. Check and improve the output

    Treat the first answer as a draft: verify it, test changes, and fix prompts that have gone wrong.

    1. Checking an AI draft before you use it
    2. Testing prompt changes with a small set of test cases (evals)
    3. Cleaning up a messy prompt
    4. Fixing over-cautious prompts: stale patches and one-sided warnings
    5. When more emphatic instructions won't help: use a tool
    6. Recap
  4. Prompts for AI agents

    When a prompt must run without you in the loop, it needs to be complete up front.

    1. Context engineering: when a chat prompt isn't enough
    2. Splitting a complex job into separate prompts
    3. Recap

Made from these videos

More courses