Skip to content
bits
Context is everything · Lesson 7 of 7

Checkpoint: pack the window

Tutor:

Time to use the whole course on one prompt. You're building the help desk for Moon Café again, and this time it answers from the café's own info sheet instead of whatever it half-remembers.

A well-packed prompt for this has a clear shape. Stable parts first: who Claude is and how to answer, then the info sheet in a <document> with a <source>. In a real app this whole block is what you'd cache, because it's identical on every request. What changes goes last: the customer's question. In between, two habits that keep answers honest: quote first, and say so when the sheet doesn't cover it. And nothing else: no backstory, no old menus.

Question and a raw paste vs Packed promptillustrative: made-up numbers that show the idea, not output from a real modelcompare

promptDo you have Wi-Fi? (The info sheet lists hours, milk options and the dog policy. It doesn't mention Wi-Fi.)

Question and a raw paste

Yes! Moon Café offers free high-speed Wi-Fi for all customers. Just ask a barista for the password.

Packed prompt

<quotes>No quote: the info sheet doesn't mention Wi-Fi.</quotes> I can't see Wi-Fi on our info sheet, so I'm not sure. A barista can tell you in person.

Tutor:

The left reply sounds helpful and is invented. The right one admits the gap because the prompt gave it permission to.

Tutor:

Checkpoint. Use this info sheet: Moon Café, open Mon–Fri 7am–6pm, Sat 8am–4pm, closed Sunday. Oat milk is free. Dogs welcome on the terrace. Write the whole prompt: Claude's job, the sheet wrapped in tags with a source, a request to quote first, permission to say the sheet doesn't cover something, a length limit, and a customer question at the end. Then try a question the sheet can't answer.

Your turn

Run your prompt and the replies land here.

    • Gives Claude its job, not yet
    • Wraps the sheet in tags, not yet
    • Names the source, not yet
    • Asks for a quote first, not yet
    • Allows “it doesn't say”, not yet
    • Sets a length limit, not yet
    • Ends with a customer question, not yet
    • Ran at 1.0, not yet
    run at
    ~0 tokens

    Turn on JavaScript to run prompts.

    Tutor:

    Finish this checkpoint and the Context is everything badge is yours. You can now say what fills a context window, why less is often more, how to lay out long documents and long chats, and how to make a stable prefix cheap. Next, Give your model tools lets Claude fetch context for itself, and Retrieval without tears picks the right pieces from a big pile.