1 / 22
1
ComplianceGPT Lab · AI Innovation & Diffusion REU 2026

Prompting 101

How to actually talk to a large language model — no prior AI background assumed, no ComplianceGPT code required

Start here if: you've used ChatGPT/Claude/Gemini casually, but have never thought carefully about why a prompt works or fails. Everything in this deck uses a free chat interface — no repo, no API key, no cluster.

2

Why This Deck Exists

The rest of this program's slides teach prompting through a real research pipeline (HIPAA extraction, GoldCoin scenarios). That's great for relevance, but it quietly assumes you already know what a prompt is, why it fails, and how to fix one.

What the other decks give you

Applied, project-specific prompting: how to extract structured facts from legal text, inside a real pipeline you're inheriting.

What this deck gives you

The generic, transferable skill underneath that: how prompting works for any task, with any model, before you ever open a line of code.

Read this first. Then Week 3's prompting slides and the LLM Foundations / Agentic Systems decks will make much more sense.

3
Part 1 — The Mental Model

What an LLM Actually Is

A large language model is a very sophisticated autocomplete. Given some text, it predicts what text is most likely to come next — one small chunk ("token") at a time — based on patterns learned from enormous amounts of text.

It is not

Everything else in this deck follows from taking that seriously.

4
Part 1 — The Mental Model

What a Prompt Is

The prompt is the entire input the model sees. There is no other channel. It cannot ask you a clarifying question unless you explicitly told it to. It cannot see anything you didn't type (or upload).

What the model has access to

  • The text you typed, this message and any prior ones in the conversation
  • Anything you pasted or uploaded
  • Whatever "system instructions" the app set up in the background

What the model does NOT have

  • Your intent, if you didn't write it down
  • Memory of a different conversation
  • Any way to say "I need more information" unless prompted to
5
Part 2 — Building a Prompt

Four Ingredients of a Good Prompt

1

Task

What, exactly, should the model produce? A summary? A list? A decision?

2

Context

What background does the model need that it can't guess — audience, purpose, source material?

3

Format

How should the answer be shaped — a paragraph, a table, JSON, exactly 3 bullets?

4

Constraints

What should it avoid — length limits, tone, things not to invent?

Most disappointing outputs trace back to one of these four being left implicit instead of stated.

6
Part 2 — Building a Prompt

Same Request, Two Prompts

Vague

"Write something about climate change."

Missing: audience, length, angle, format. You'll get 500 generic words and probably rewrite the prompt anyway.

Specific

"Write a 150-word explainer on climate change for a high-school audience. Focus on the greenhouse effect specifically. Plain language, no jargon. End with one sentence on what an individual can do."

All four ingredients present: task, audience/context, length/format, constraint (no jargon).

7
Part 3 — Core Techniques

Zero-Shot Prompting

Give instructions only — no worked examples. Fastest to write, and works well when the task is common and unambiguous.

Classify the sentiment of this review as Positive, Negative, or Neutral. Respond with one word only. Review: "The battery life is incredible but the camera is a huge letdown."

Zero-shot struggles when: the task is unusual, the desired format is specific/uncommon, or "correct" depends on judgment calls you haven't defined (as in the review above — is mixed sentiment "Neutral" or something else? You'd need to say).

8
Part 3 — Core Techniques

Few-Shot Prompting

Show 2–5 worked examples before the real question. This is usually the single biggest lever for consistent, well-formatted output — the model pattern-matches your examples instead of guessing your intent.

Classify each support ticket's urgency as Low, Medium, or High. Ticket: "App crashes when I open settings." Urgency: High Ticket: "Would love a dark mode option someday." Urgency: Low Ticket: "Payment went through twice, need a refund." Urgency: ← the model now knows exactly what "High" vs "Low" looks like for YOUR use case
9
Part 3 — Core Techniques

Chain-of-Thought Prompting

Ask the model to reason step-by-step before giving a final answer. Costs more words and time, but catches errors that come from jumping straight to a conclusion.

Straight to the answer

Q: A juggler has 16 balls. Half are golf balls, and half of the golf balls are blue. How many blue golf balls? A: 4

With chain-of-thought

Q: [same question] Think step by step. A: Half of 16 is 8 golf balls. Half of 8 is 4 blue golf balls. Answer: 4

Same answer here — but on harder, multi-step problems, forcing the intermediate steps into the open is often the difference between right and wrong.

10
Part 3 — Core Techniques

Role / Persona Prompting

Telling the model "you are ___" shifts its style, vocabulary, and priorities toward that role's typical way of writing — because that's the pattern it learned from millions of examples of people in that role writing.

You are a patient, encouraging math tutor for a 7th grader who is anxious about algebra. Explain what a variable is, using an everyday analogy. Keep it under 100 words. Avoid saying "just" or "simply" — it can feel dismissive.

Note this is still just Task + Context + Format + Constraints — "role" is a compact way to bundle several of those at once.

11
Part 3 — Core Techniques

Controlling Output Format

If you need the output to be machine-readable (a table, JSON, a fixed number of items), say so explicitly and show the exact shape. Models default to prose unless told otherwise.

List 3 pros and 3 cons of remote work. Respond ONLY as JSON, no other text, in this exact shape: {"pros": ["...", "...", "..."], "cons": ["...", "...", "..."]}

Why this matters for research: any time you plan to feed a model's output into more code (a script, a spreadsheet, another program), format control is not optional polish — it's the difference between a pipeline that runs and one that crashes on line 1.

12
Part 4 — Working With the Model

Treat the First Answer as a Draft

Prompting is a conversation, not a vending machine. If the first response is close but not right, don't start over — tell the model exactly what to change.

Your prompt
Imperfect answer
"Make it shorter and cut the second paragraph"
Better answer

This single habit — iterate instead of restart — improves output quality more than almost any clever prompting trick.

13
Part 5 — Failure Modes

Hallucination: Confidently Wrong

Remember the mental model from Slide 3: the model predicts likely-sounding text, not verified-true text. It will invent a citation, a statistic, or a fact with exactly the same fluent confidence it uses for something true.

Practical rule

Never trust a specific fact, number, quote, or citation from an LLM without checking it — especially the more specific and "impressive" it sounds (exact dates, page numbers, case names). Specificity is not evidence of accuracy.

14
Part 5 — Failure Modes

Four More Ways Prompts Go Wrong

FailureWhat it looks likeUsual fix
Format driftAsked for JSON, got a paragraph with JSON somewhere inside itRepeat the format instruction; show an example of the exact shape
SycophancyModel agrees with a wrong claim you stated confidentlyAsk it to double-check independently, not just confirm your framing
Instruction dropLong prompt, model follows only some of the instructionsShorten, or number the instructions explicitly
AmbiguityModel picks a reasonable-but-wrong interpretation of a vague askAdd the one clarifying detail you assumed was obvious
15
Part 5 — Failure Modes

The Same Four, With Actual Prompts notebook: prompting_101.ipynb

Format drift

# weak "List 3 pros/cons of remote work as JSON." → often prose with JSON buried inside # strong "...Respond with ONLY JSON, no other text, in exactly this shape: {...}" → clean, parseable JSON

Sycophancy

# leading "The Great Wall is visible from space with the naked eye, right? Confirm this for my essay." → often just agrees (it's a myth) # neutral "...say so directly if the common claim is false."

Instruction drop

# buried in prose, 6 instructions "...engaging...inclusive...history if you can...light tone...exactly 3 sentences...no word 'beverage'..." → 2-3 of 6 followed # numbered, 4 rules "1. Exactly 3 sentences. 2. ..." → usually all 4 followed

Ambiguity

# ambiguous — shorter than WHAT? "Make it shorter." → model invents something to shorten # clarified "Here is a paragraph: [...]. Make this shorter: cut to 1 sentence, keep the core claim."

Run all eight of these yourself in Part 6 of the notebook — outputs vary by model, that's the point.

16
Part 5 — Failure Modes

Debugging a Bad Output: A Checklist

When the output is wrong, don't just retry the same prompt. Ask, in order:

  1. Did I state the task unambiguously?
  2. Did I give enough context to remove guesswork?
  3. Did I specify the format I actually need?
  4. Did I state the constraints (length, tone, what to avoid)?
  5. Would one example of a correct answer help?
  6. Is this a multi-step problem that needs chain-of-thought?
17
Part 6 — A Word of Caution

Be Careful What Text You Paste In

The model can't distinguish "your instructions" from "text you pasted that happens to contain instructions." If you paste in a document, email, or webpage that itself contains text like "ignore previous instructions and...", a model can be misled into following it.

This is called prompt injection

You'll see a rigorous, research-grade version of this idea later this summer in the Agentic Systems material, applied to adversarial attacks on a real system. For now: be skeptical of any content you feed an LLM from an untrusted source, the same way you'd be skeptical of running an email attachment.

18

Cheat Sheet

Do

  • State task, context, format, and constraints explicitly
  • Give 1–2 examples for anything format-sensitive
  • Ask for step-by-step reasoning on multi-step problems
  • Iterate with specific feedback instead of restarting
  • Verify any fact, number, or citation independently

Don't

  • Assume the model knows your unstated intent
  • Trust a confident-sounding specific fact at face value
  • Paste untrusted text into a prompt without a skeptical read first
  • Write a 500-word prompt when 50 precise words would do
  • Give up after one bad output instead of refining it
19

Try It Yourself

Structured — the notebook recommended

notebooks/prompting_101.ipynb — every technique on this deck (zero/few-shot, CoT, reflection, all 4 failure modes) as a runnable cell against your own local Ollama model, with worked examples plus TODO exercises for you to fill in.

No laptop setup — 10 min, any chat app

  1. Ask a vague question you know well; notice what's generically right but specifically wrong.
  2. Rewrite with all 4 ingredients; compare.
  3. Give it a 3-example few-shot classification task of your own.
  4. Ask a riddle direct vs. "think step by step."
  5. State a wrong fact confidently — does it correct you?
20

You Now Have the Foundation. Here's Where It's Used.

LLM Foundations Slides

Decoding, instruction-tuning, scale, and limits — the mechanics behind everything in this deck.

Week 3 — Prompt Engineering

These exact techniques (zero/few-shot, CoT) applied to a real, messy legal-text extraction task.

Agentic Systems Slides

What happens when one prompt isn't enough — reflection loops and multi-step pipelines.

21

The One Idea to Keep

An LLM cannot read your mind. It can only respond to what's on the page. Every prompting technique in this deck is really just a different way of putting more of your intent onto the page, explicitly, so the model has less to guess.

22

Now Go Build Something Harder

You didn't need any of ComplianceGPT's code to learn this — and now everything that does use that code will make a lot more sense.