Course resource

Advanced Prompting Cheat Sheet

The techniques worth knowing after PCTC, on one page. Each has a name, the situation it fixes, and the line you actually type.

Chain-of-thought

Fixes: wrong answers on anything with steps — arithmetic, logic, multi-part analysis.

Work through this step by step. Show your reasoning before the answer.

Why it works: the model generates the answer one token at a time. Forcing intermediate steps gives it more places to catch its own error. On a single-step question it adds nothing.

Prompt chaining

Fixes: one prompt trying to do four jobs and doing all of them at 60%.

Split the work and feed each output into the next:

Step 1: Extract every claim from this document as a numbered list. Nothing else.
Step 2: [paste list] For each claim, mark it Supported, Unsupported, or Needs checking.
Step 3: [paste marked list] Write a one-paragraph summary that uses only Supported claims.

Slower to run, dramatically better output, and you can see which step went wrong.

Role and expertise framing

Fixes: generic answers written for nobody.

You are a [ROLE] with [N] years in [DOMAIN]. You have seen [SPECIFIC EXPERIENCE].
You are reviewing this for [AUDIENCE].

Be specific. "You are a lawyer" is weak. "You are a commercial contracts lawyer who has renegotiated dozens of SaaS agreements for mid-size buyers" changes the vocabulary, the priorities, and what it flags.

Few-shot examples

Fixes: output in the wrong shape, when describing the shape has not worked.

Here are three examples of what I want:

Input: [X1] -> Output: [Y1]
Input: [X2] -> Output: [Y2]
Input: [X3] -> Output: [Y3]

Now do the same for: [YOUR INPUT]

Two to five examples. Examples beat description whenever the pattern is easier to show than to explain — tone, formatting, level of detail.

Negative space

Fixes: the model's defaults leaking into your work.

Do not: open with a summary of my question, use "delve" or "leverage",
add a concluding paragraph that restates the above, or hedge more than once.

Often more effective than positive instruction, because you are removing behaviours rather than competing with them.

Metacognitive prompting

Fixes: confident answers you cannot assess.

Before you answer: what would you need to know to answer this well?
What are you assuming? Where is your answer most likely to be wrong?

Or after the fact:

Rate your confidence in each claim above from 1 to 5, and say what would change your mind.

Reflexion

Fixes: a good-but-not-right first draft.

Here is your previous answer: [PASTE]
Critique it as a hostile reviewer would. List its three biggest weaknesses.
Then rewrite, fixing them.

The critique step matters — asking it to "improve" without first naming what is wrong usually produces a reworded version of the same thing.

Decomposition

Fixes: a problem too big to answer in one go.

Do not solve this yet. First break it into the smallest independent
sub-problems, ordered so each one unblocks the next. Then stop.

Then work the list one item at a time, in separate messages.

Constrained format

Fixes: output you have to reformat by hand every time.

Respond as a table with exactly these columns: [A] | [B] | [C].
No preamble, no notes after the table. If a cell is unknown, write UNKNOWN.

For anything you will paste into a spreadsheet or another system, specify the format precisely and forbid commentary around it.

The escape hatch

Fixes: confident fabrication.

If you do not know, or the source does not say, write UNKNOWN rather than inferring.
I would rather have gaps than guesses.

Include this on anything factual. It measurably reduces invention, because you have made "I don't know" an acceptable answer.

Temperature, in one line

Where you control it: low for extraction, classification, code and anything factual. Middle for normal writing. High only for brainstorming where you will discard most of the output. Most chat interfaces do not expose it; APIs and builder tools do.

Choosing quickly

The problem Reach for
Wrong on multi-step reasoning Chain-of-thought
Doing too much at once Chaining, decomposition
Generic, could be for anyone Role framing, more context
Wrong shape or format Few-shot, constrained format
Sounds like AI Negative space, voice profile
Confidently wrong Escape hatch, metacognitive
Nearly right Reflexion

The order to try things

  1. Add context. Most bad output is under-specified, not under-engineered.
  2. Add constraints, especially negative ones.
  3. Split the task.
  4. Add examples.
  5. Only then reach for the named techniques.

People skip to step 5 and wonder why a clever prompt did not fix a vague brief.

Back to dashboard