Skip to content

Lesson 3 ยท Prompting Claude

Clear Requests and Useful Context

Write requests Claude can act on: state the goal, audience, context, constraints and output format, explain your reasons, and test the result against criteria.

Many disappointing answers come from requests that leave too much unsaid. Claude is capable, but it starts a task knowing nothing about your situation beyond what is in front of it. A useful test: if you sent the same message to a skilled freelancer who had never met you, could they do the job well? If they would need to ask five questions, answer them in the prompt. This lesson focuses on Claude; the prompt engineering tutorial goes further into the general craft.

Five things worth saying

Part Question it answers Example
Goal What do you want, and why? "A reply that keeps this customer"
Audience Who will read it? "A busy, non-technical client"
Context What does Claude need to know? The email thread and your policy
Constraints What limits apply? "Under 150 words, no promises of refunds"
Format What should it look like? "Subject line, then three short paragraphs"

You do not need all five for a quick question. You do need them when the result matters.

Weak and strong requests

A weak request:

TEXT
Write an email about the delay.

A stronger one:

TEXT
Write an email to a client whose website launch will be one week late.

Why it's late: the payment provider needs extra review. We found out today.
What we know: the new date is 18 March. Everything else is finished.
Reader: the owner of a small shop. Not technical, worried about a spring sale.
Goal: keep their trust. Be honest, don't blame the payment provider harshly.
Constraints: under 150 words. Don't offer a discount.
End with one clear next step.

The second request is longer, but it can save several rounds of correction. It also leaves less room for invention: Claude does not have to guess a reason or a date.

Explain the reason behind a rule

A rule with a reason usually works better than a bare command, because Claude can apply the idea to cases you did not list. Compare "Never use abbreviations" with "This text will be read aloud by a screen reader, so write words out instead of abbreviating them." The second one also tells Claude what to think about for symbols and shorthand.

State what you want as well as what you do not want. "Write in flowing paragraphs" is clearer than "Don't use bullets", which says nothing about what to use instead.

Ask for the effort you expect

If you want more than the minimum, say so. "Suggest some titles" invites a short list. "Give me 15 titles in three different styles, and mark the two you think are strongest" tells Claude how far to go. In the same way, say whether you want Claude to make a change or only to advise. "Could you suggest improvements?" asks for suggestions. "Rewrite the second paragraph" asks for a rewrite.

Leave room for honest gaps

Add a sentence such as this when facts matter:

TEXT
Use only the information I've given. If something you need is missing,
list it under "Open questions" instead of filling it in.

This does not guarantee accuracy, but it gives the model a clear, acceptable way to say that it does not know.

Define success before you read the answer

Write two or three checks first. That way you judge the answer against your needs and not against how confident it sounds. Some checks can even be automated.

Python Score a draft against your own criteria

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

One check fails. In a real chat, your follow-up would be exact: "Remove the discount sentence. We have not approved one." Notice that a keyword check is crude. A sentence such as "we can't offer a discount" would also fail it, so read the text too.

A reusable template

Keep this skeleton for important tasks and delete the lines you do not need.

TEXT
TASK: [what to produce]
PURPOSE: [what happens with the result]
AUDIENCE: [who reads it and what they already know]
BACKGROUND: [facts, pasted material]
CONSTRAINTS: [length, tone, things to avoid and why]
FORMAT: [structure of the answer]
IF UNSURE: ask me before guessing.

A worked improvement

Suppose your first request was "Help me prepare for a meeting with my landlord." The answer will probably be general advice, because Claude knows nothing else. Add what you know, one gap at a time:

  • What is the meeting about? The heating has failed three times since October.
  • What do you want? A repair date in writing and a plan if it fails again.
  • What matters? You want to keep a good relationship and renew the lease.
  • What do you have? The dates of each failure and your two earlier messages.
  • What output would help? A one-page note with the timeline, your two requests and polite answers to likely objections.

The improved request is mostly facts that only you have. No clever wording can replace them. Notice also what you should leave out: your account numbers and other details that the note does not need.

When you cannot tell what is missing, reverse the roles for one turn: "Before you write anything, ask me the questions whose answers would most change your result." Answer them, then let Claude draft. This is often faster than guessing what to include.

When a short prompt is enough

Not every request needs a briefing. "What is a synonym for 'important'?" is complete as it stands. Add detail in proportion to the cost of a wrong or generic answer, and to how much of the situation only you know.

Common mistake: piling up commands in capital letters, such as "ALWAYS" and "NEVER EVER". Current models follow instructions closely, and shouting can make them apply one rule too rigidly. Calm, specific sentences with reasons usually work better.

Iterate on the prompt, not only the answer

If you keep making the same correction, move it into the original request and save the improved version. For prompts you reuse often, test them on several different inputs, including awkward ones. Building a prompt test set shows a method.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why include the reason for a constraint?

    A reason tells the model what you are protecting, so it can generalize.
  2. 2. Which instruction is clearest?

    It says what to produce, not only what to avoid.
  3. 3. You want a file changed, not advice. What should you write?

    A direct instruction asks for action. Questions about ideas invite suggestions.
  4. 4. What is the benefit of writing success checks first?

    Checks keep your review honest. They cannot prevent errors by themselves.

Summary

  • Give the goal, audience, context, constraints and format when the result matters.
  • Explain why a rule exists and say what you want.
  • Ask for open questions instead of invented facts.
  • Define checks before reading the answer, then improve the prompt.

Next: Examples, Structure and XML Tags

Your progress is saved in this browser. No account needed.