---
id: advanced-prompts-by-goal
lang: en
title: "Advanced prompts by goal"
seoTitle: "Advanced AI prompts by goal"
description: "Ready-to-use prompt patterns for writing, analysis, research, and coding, each with a worked example you can copy and adapt to your own work."
part: prompting
partTitle: "Prompting"
partOrder: 3
order: 4
level: Intermediate
durationMinutes: 9
outcome: "Reach for the right prompt pattern for writing, analysis, research, or coding."
summary: "Different jobs want different prompt patterns. This lesson gives ready-to-copy recipes for writing, analysis, research, and coding."
draft: false
updated: "2026-07-26"
furtherReading:
  - title: "Anthropic courses"
    url: "https://github.com/anthropics/courses"
    note: "deeper, task-focused courses including real-world prompting."
  - title: "Prompt engineering overview (Anthropic)"
    url: "https://docs.claude.com/en/docs/build-with-claude/prompt-engineering/overview"
    note: "the full reference behind these patterns."
  - title: "Anthropic's interactive prompt engineering tutorial"
    url: "https://github.com/anthropics/prompt-eng-interactive-tutorial"
    note: "hands-on practice with advanced techniques."
  - title: "Prompt engineering guide (OpenAI)"
    url: "https://platform.openai.com/docs/guides/prompt-engineering"
    note: "goal-based prompting on another major tool."
keywords:
  - advanced prompts
  - prompt patterns
  - prompts for writing
  - prompts for analysis
  - prompts for coding
  - AI prompt examples
quiz:
  intro: "Five questions. Sweep them and you've finished the whole Prompting part."
  passScore: 5
  questions:
    - q: "For a writing task, what lifts an answer most reliably?"
      options:
        - "Asking for it to be 'more creative'"
        - "Giving a sample of the tone you want and naming the reader"
        - "Requesting the longest version possible"
        - "Using lots of exclamation marks"
      answer: 1
      explain: "Show the tone with an example and name who's reading. 'Match this' beats a pile of adjectives."
    - q: "When you hand the AI data or text to analyse, what should you always add?"
      options:
        - "The question you actually want answered, and where to look"
        - "A request to make it sound impressive"
        - "Nothing, just paste the data"
        - "A demand for a definite yes or no"
      answer: 0
      explain: "Point it at the real question. 'Summarise this' drifts; 'which region slipped and why' finds the answer."
    - q: "What's the single most important habit for research prompts?"
      options:
        - "Trust the first answer if it sounds confident"
        - "Ask for sources and check the important claims yourself"
        - "Ask for as many facts as possible"
        - "Only ask questions you already know the answer to"
      answer: 1
      explain: "Ask for sources and verify what matters. Confident and correct are not the same thing."
    - q: "For a coding task, what makes the answer more useful?"
      options:
        - "Saying what language and what the code should do, with an example in and out"
        - "Asking for the cleverest solution"
        - "Leaving the goal vague so it can be creative"
        - "Requesting no comments in the code"
      answer: 0
      explain: "State the language, the goal, and a sample input and output. Concrete goal, concrete code."
    - q: "What do all four patterns share?"
      options:
        - "They need very long prompts"
        - "They give the AI a clear goal, the right context, and the shape of the answer"
        - "They only work with one AI tool"
        - "They avoid examples"
      answer: 1
      explain: "Same recipe underneath: clear goal, right context, defined output. The pattern just shifts by the job."
  pass:
    badge: "Part complete"
    title: "That's the whole Prompting part. Well played."
    body: "Full marks, and the last lesson in the part. You've got a pattern for writing, analysis, research, and coding. Time to work smart."
  retry: "Check the marked answers and try once more. You're one step from finishing the part."
---

> **Level:** Intermediate · **Reading time:** ~9 min
>
> **What you'll be able to do:** reach for the right prompt pattern for writing, analysis, research, or coding.

By now you know the recipe (role, task, context, examples, format) and you know how to steer a reply. This lesson is about noticing that different kinds of work want slightly different prompts. **The recipe never changes underneath.** But a prompt for writing an email leans on *tone and examples,* while a prompt for analysing a spreadsheet leans on *the exact question you're asking.*

Here are four patterns for the four jobs you'll hit most: writing, analysis, research, and coding. Each comes with a worked example. Steal them, adapt them, keep the ones that fit your week.

## Writing: drafts, edits, and tone

Writing tasks live and die on two things: **who's reading, and what it should sound like.** So lead with those. The single biggest upgrade is giving a *sample* of the voice you want instead of describing it. **"Match this" beats five adjectives.**

A pattern that holds up:

```
You're writing as me: [who you are, in a line]. The reader is [who], and they care about [what].

Task: [the one thing to write].

Tone: like this sample [paste something you've written]. Not stiff, not salesy.

Format: [length and shape]. End with [the ask or next step].
```

Worked example, a LinkedIn post about a product update:

```
You're writing as me, a founder who hates LinkedIn cringe. The reader is a busy operations manager scrolling on their phone.

Task: a short post announcing we cut onboarding from two weeks to two days.

Tone: like this sample [paste a post you liked of your own]. Dry, human, no "thrilled to announce."

Format: under 100 words, one clear point, a line break before the last line so it lands. No hashtags.
```

You'll get something in your voice, not the default LinkedIn hum. If the first pass is off, steer it with one specific note (that's the [last lesson](/learn/prompting/iterating)).

## Analysis: turning data and text into findings

The mistake here is asking the AI to "analyse this" and hoping it reads your mind about what you're looking for. It can't. **Analysis prompts need a real question** and a clear idea of what a useful answer looks like.

The pattern:

```
Here's [the data or text]. [Paste or attach it.]

Question: [the specific thing you want to know].

Look for: [what matters: trends, outliers, the why behind a number].

Give me: [the shape: top three findings, a short table, one recommendation]. Flag anything you're unsure about rather than guessing.
```

Worked example, a month of support tickets:

```
Here are last month's support tickets [attached].

Question: what are people actually struggling with, and is it getting worse or better than the month before?

Look for: the top themes by volume, and any theme that's growing fast even if it's still small.

Give me: the top five issues as a short table (issue, rough count, trend), then one line on the thing I should fix first. Say so if the data's too thin to call.
```

That last instruction matters. **Telling the AI to flag its own uncertainty is how you stop a confident-sounding number you can't trust.** Which brings us to research.

<figure class="lesson-svg" aria-labelledby="tab-title">
<svg viewBox="0 0 640 322" width="100%" height="auto" role="img" aria-labelledby="tab-title tab-desc" xmlns="http://www.w3.org/2000/svg" font-family="Inter, system-ui, sans-serif">
<title id="tab-title">Claude's answer, in the exact shape the prompt asked for</title>
<desc id="tab-desc">A five-row table of support-ticket themes with a rough count and a trend arrow for each, then a single line naming the issue to fix first: export to CSV, small now but climbing fast.</desc>
<text x="16" y="24" font-size="11" font-weight="700" fill="var(--med-gray,#5B6169)">Claude</text>
<rect x="8" y="32" width="624" height="282" rx="16" fill="#fff" stroke="var(--part,#1FA98C)" stroke-width="1.5"/>
<text x="32" y="64" font-size="12.5" font-weight="800" fill="var(--part-ink,#16806A)">Issue</text>
<text x="486" y="64" font-size="12.5" font-weight="800" fill="var(--part-ink,#16806A)" text-anchor="middle">Count</text>
<text x="582" y="64" font-size="12.5" font-weight="800" fill="var(--part-ink,#16806A)" text-anchor="middle">Trend</text>
<line x1="24" y1="74" x2="616" y2="74" stroke="#CDE8E1" stroke-width="1.5"/>
<text x="32" y="100" font-size="12.5" fill="var(--ink,#1F2328)">Login &amp; password resets</text>
<text x="486" y="100" font-size="12.5" fill="var(--ink,#1F2328)" text-anchor="middle">128</text>
<text x="582" y="101" font-size="15" font-weight="800" fill="#C1121F" text-anchor="middle">&#8593;</text>
<text x="32" y="134" font-size="12.5" fill="var(--ink,#1F2328)">Slow page loads</text>
<text x="486" y="134" font-size="12.5" fill="var(--ink,#1F2328)" text-anchor="middle">74</text>
<text x="582" y="135" font-size="15" font-weight="800" fill="#C1121F" text-anchor="middle">&#8593;</text>
<text x="32" y="168" font-size="12.5" fill="var(--ink,#1F2328)">Billing questions</text>
<text x="486" y="168" font-size="12.5" fill="var(--ink,#1F2328)" text-anchor="middle">63</text>
<text x="582" y="169" font-size="15" font-weight="800" fill="#8A8A8A" text-anchor="middle">&#8594;</text>
<text x="32" y="202" font-size="12.5" fill="var(--ink,#1F2328)">Export to CSV fails</text>
<text x="486" y="202" font-size="12.5" fill="var(--ink,#1F2328)" text-anchor="middle">41</text>
<text x="582" y="203" font-size="15" font-weight="800" fill="#C1121F" text-anchor="middle">&#8593;&#8593;</text>
<text x="32" y="236" font-size="12.5" fill="var(--ink,#1F2328)">Mobile app crashes</text>
<text x="486" y="236" font-size="12.5" fill="var(--ink,#1F2328)" text-anchor="middle">29</text>
<text x="582" y="237" font-size="15" font-weight="800" fill="#1E7F4F" text-anchor="middle">&#8595;</text>
<rect x="20" y="256" width="600" height="44" rx="10" fill="var(--part-tint,#E9F7F3)" stroke="var(--part,#1FA98C)" stroke-width="1"/>
<text x="34" y="283" font-size="12.5" fill="var(--ink,#1F2328)"><tspan font-weight="800" fill="var(--part-ink,#16806A)">Fix first: </tspan>export to CSV, small now but climbing fast.</text>
</svg>
</figure>

## Research: gathering and checking sources

Research is the job where a wrong answer does the most damage, because it sounds *just as sure* as a right one. So the whole pattern is built around one habit: **ask for sources, and check the ones that matter.**

The pattern:

```
Research [the question]. Use the web.

I want: [what you're after, and how deep].

For each key claim, give me the source and a link. Separate what you're confident about from what's shaky. If sources disagree, tell me.
```

Worked example, checking a market before a pitch:

```
Research the market for meal-kit delivery in Belgium. Use the web.

I want: rough market size, the three biggest players, and one trend that's changed in the last year.

For each number, give the source and a link and the date it's from. Flag anything you can't back up. If the figures I find online disagree, show me the range, don't average them into one tidy fake number.
```

Then do the part no prompt does for you: open the links on the claims you're about to repeat out loud. **The AI is a fast researcher, not a fact-checker.** *Confident* and *correct* are different things, and the gap between them is your job to close.

## Coding: explaining, writing, and fixing

You don't need to be a developer to use this. Plenty of business work touches a formula, a script, or a snippet someone left behind. Coding prompts want three things: **the language, the goal in plain words, and an example of the input and the output you expect.**

The pattern:

```
[Language or tool, for example: a formula for Excel / a small Python script.]

Goal: [what it should do, in plain words].

Input looks like: [a sample].
Output should look like: [a sample].

Explain what it does in one line so I can check it.
```

Worked example, a spreadsheet formula:

```
An Excel formula.

Goal: in column D, flag any order over 1000 euros that's still unpaid.

Input: column B is the amount, column C is the status ("paid" or "unpaid").
Output: the word "CHASE" if it's over 1000 and unpaid, otherwise blank.

Give me the formula and one line on how it works.
```

Because you gave a sample in and a sample out, you can check the result against your own sheet in seconds. Asking it to explain the code in a line means you're never pasting in something you don't understand. If it breaks, tell the AI what you expected and what you got, and it'll fix it.

## The thread running through all four

Notice these aren't four different skills. **They're one recipe wearing four hats.** Every pattern gives the AI a clear goal, the context it needs, and the shape of the answer you want. Writing leans on tone and examples. Analysis and research lean on the exact question and on honesty about what's uncertain. Coding leans on sample input and output. *Same bones, different emphasis.*

<figure class="lesson-svg" aria-labelledby="hats-title">
<svg viewBox="0 0 640 400" width="100%" height="auto" role="img" xmlns="http://www.w3.org/2000/svg" font-family="Inter, system-ui, sans-serif">
<title id="hats-title">One recipe, four hats</title>
<desc>Writing, Analysis, Research, and Coding, each leaning on a different lever.</desc>
<text x="0" y="22" font-size="21" font-weight="800" fill="var(--ink,#1F2328)">One recipe, four hats</text>
<text x="0" y="46" font-size="13.5" fill="var(--soft-gray,#6E747C)">Same bones. Each goal leans on a different lever.</text>
<rect x="0" y="68" width="310" height="150" rx="16" fill="#fff" stroke="var(--line,#E7E9EC)"/>
<circle cx="34" cy="108" r="16" fill="var(--part,#1FA98C)"/>
<text x="34" y="113" font-size="15" font-weight="800" fill="#fff" text-anchor="middle">W</text>
<text x="62" y="114" font-size="18" font-weight="800" fill="var(--ink,#1F2328)">Writing</text>
<text x="24" y="160" font-size="10.5" font-weight="700" letter-spacing="1.5" fill="var(--soft-gray,#6E747C)">LEANS ON</text>
<text x="24" y="188" font-size="16.5" font-weight="700" fill="var(--part-ink,#16806A)">Tone, and an example</text>
<rect x="330" y="68" width="310" height="150" rx="16" fill="#fff" stroke="var(--line,#E7E9EC)"/>
<circle cx="364" cy="108" r="16" fill="var(--part,#1FA98C)"/>
<text x="364" y="113" font-size="15" font-weight="800" fill="#fff" text-anchor="middle">A</text>
<text x="392" y="114" font-size="18" font-weight="800" fill="var(--ink,#1F2328)">Analysis</text>
<text x="354" y="160" font-size="10.5" font-weight="700" letter-spacing="1.5" fill="var(--soft-gray,#6E747C)">LEANS ON</text>
<text x="354" y="188" font-size="16.5" font-weight="700" fill="var(--part-ink,#16806A)">The exact question</text>
<rect x="0" y="238" width="310" height="150" rx="16" fill="#fff" stroke="var(--line,#E7E9EC)"/>
<circle cx="34" cy="278" r="16" fill="var(--part,#1FA98C)"/>
<text x="34" y="283" font-size="15" font-weight="800" fill="#fff" text-anchor="middle">R</text>
<text x="62" y="284" font-size="18" font-weight="800" fill="var(--ink,#1F2328)">Research</text>
<text x="24" y="330" font-size="10.5" font-weight="700" letter-spacing="1.5" fill="var(--soft-gray,#6E747C)">LEANS ON</text>
<text x="24" y="358" font-size="16.5" font-weight="700" fill="var(--part-ink,#16806A)">Sources, then check them</text>
<rect x="330" y="238" width="310" height="150" rx="16" fill="#fff" stroke="var(--line,#E7E9EC)"/>
<circle cx="364" cy="278" r="16" fill="var(--part,#1FA98C)"/>
<text x="364" y="283" font-size="15" font-weight="800" fill="#fff" text-anchor="middle">C</text>
<text x="392" y="284" font-size="18" font-weight="800" fill="var(--ink,#1F2328)">Coding</text>
<text x="354" y="330" font-size="10.5" font-weight="700" letter-spacing="1.5" fill="var(--soft-gray,#6E747C)">LEANS ON</text>
<text x="354" y="358" font-size="16.5" font-weight="700" fill="var(--part-ink,#16806A)">Sample in, sample out</text>
</svg>
</figure>

Learn to feel which lever matters for the job in front of you, and you can write a strong prompt for almost anything.

## Try it

Pick the goal closest to your actual work right now, writing, analysis, research, or coding. Take the matching pattern above and fill it in with something real from your week. Run it.

If the first answer is close but not there, don't start over. Steer it with one specific follow-up. You've now used every tool in the Prompting part on real work, which was the whole point.

## Key terms

[Prompt](/glossary#prompt), [Prompt engineering](/glossary#prompt-engineering), [Context](/glossary#context)
