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.
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.
Applied, project-specific prompting: how to extract structured facts from legal text, inside a real pipeline you're inheriting.
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.
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.
Everything else in this deck follows from taking that seriously.
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, exactly, should the model produce? A summary? A list? A decision?
What background does the model need that it can't guess — audience, purpose, source material?
How should the answer be shaped — a paragraph, a table, JSON, exactly 3 bullets?
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.
Missing: audience, length, angle, format. You'll get 500 generic words and probably rewrite the prompt anyway.
All four ingredients present: task, audience/context, length/format, constraint (no jargon).
Give instructions only — no worked examples. Fastest to write, and works well when the task is common and unambiguous.
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).
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.
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.
Same answer here — but on harder, multi-step problems, forcing the intermediate steps into the open is often the difference between right and wrong.
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.
Note this is still just Task + Context + Format + Constraints — "role" is a compact way to bundle several of those at once.
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.
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.
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.
This single habit — iterate instead of restart — improves output quality more than almost any clever prompting trick.
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.
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.
| Failure | What it looks like | Usual fix |
|---|---|---|
| Format drift | Asked for JSON, got a paragraph with JSON somewhere inside it | Repeat the format instruction; show an example of the exact shape |
| Sycophancy | Model agrees with a wrong claim you stated confidently | Ask it to double-check independently, not just confirm your framing |
| Instruction drop | Long prompt, model follows only some of the instructions | Shorten, or number the instructions explicitly |
| Ambiguity | Model picks a reasonable-but-wrong interpretation of a vague ask | Add the one clarifying detail you assumed was obvious |
Run all eight of these yourself in Part 6 of the notebook — outputs vary by model, that's the point.
When the output is wrong, don't just retry the same prompt. Ask, in order:
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.
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.
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.
Decoding, instruction-tuning, scale, and limits — the mechanics behind everything in this deck.
These exact techniques (zero/few-shot, CoT) applied to a real, messy legal-text extraction task.
What happens when one prompt isn't enough — reflection loops and multi-step pipelines.
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.
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.