Prompting Like a Lawyer: Computational Thinking as Prompt-Craft
Turn the four computational-thinking pillars into legal prompt-engineering that gets verifiable, useful output.
The hook
“You have done computational thinking since your first moot. This is the module where it becomes a keyboard skill: the difference between a vague request that invites a fabricated case and a decomposed, specified, step-by-step prompt you can actually verify.”
What you'll be able to do
- Operationalize the four computational-thinking pillars (decomposition, pattern/few-shot, abstraction, algorithm/chain-of-thought) as concrete legal prompt-engineering techniques.
- Write a precise specification prompt — role + task + context + constraints + format — for a real legal task.
- Use IRAC-as-prompt and chain-of-thought to make a model show its working so the reasoning can be checked.
- Apply iteration discipline: explore prompt variants, then exploit the winner, framed by the explore-exploit / 37% idea.
In short
This is the hands-on hinge of the course: where the spine "legal reasoning IS computational thinking" stops being a metaphor and becomes a working method at the keyboard. Students take the four pillars they already use in legal reasoning — decomposition (issue-spotting/IRAC), pattern recognition (analogy/few-shot), abstraction (ratio decidendi/precise specification), and algorithm design (applying a test step-by-step / chain-of-thought) — and turn each into a prompt-craft technique. Every technique is justified by the same payoff: prompts that produce structured, traceable output you can verify, rather than fluent text that hides hallucinations.
The AI bridge
This is the module where computational thinking becomes hands-on AI skill: the four pillars convert directly into prompt-engineering moves, and each is justified by whether it makes the model's output more specifiable, more structured, and more verifiable — using AI effectively and responsibly at the keyboard.
In this module
- 01
Decomposition as prompt-craft: break a research or drafting task into discrete sub-tasks the model can actually do (multi-step prompting), mirroring issue-spotting and IRAC — a decomposed request yields output you can check piece by piece instead of an unverifiable monolith.
- 02
Pattern / few-shot prompting: supply exemplar clauses, arguments, or formats so the model matches the pattern you want, the same move as reasoning by analogy from precedent — and a far more reliable way to get usable drafting than an unguided ask.
- 03
Abstraction as specification: a good prompt is an act of abstraction — precise role + task + context + constraints + format, the prompt equivalent of extracting the ratio decidendi (the principle stripped of noise); vague prompts invite vague, padded, or fabricated answers.
- 04
Algorithm design / chain-of-thought: give the model a procedure and tell it to reason step by step (IRAC-as-prompt; ask it to show its working) — applying a legal test step-by-step — so the reasoning is visible and each link can be interrogated and verified rather than trusted on confidence.
- 05
Iteration discipline: explore prompt variants before you commit, then exploit the winner — framed by the explore-exploit / 37% idea from Algorithms to Live By — so prompt selection is deliberate, not a single lucky shot.
- 06
Wing's claim that computational thinking is a fundamental skill for everyone (CACM, 2006) and Papert's Mindstorms ground the pillars as general cognitive tools, not coder-only tricks — which is exactly why a lawyer can wield them.
- 07
The North-Star tie on every technique: better prompting is not about prettier output; it is about producing structured, traceable, checkable output — every pillar serves the duty to verify and the goal of using AI both effectively and responsibly.
The interactive demos
Every idea is a Mirror Move
Run it on the room, show it inside the machine, prove it live on a real AI, then name the skill.
Decomposition prompt face-off (vague vs. decomposed)
On us
Pose a real legal task to the room and have students draft, on their own, both a single vague request and a decomposed, step-by-step version of the same ask; surface a few of each.
In the machine
An LLM rewards decomposition: a broken-down, multi-step prompt produces output you can verify piece by piece, while a vague monolithic ask invites padding and fabrication.
Live AI
On the presenter's laptop, run the same legal task twice — once as a vague prompt, once decomposed into sub-tasks — and compare the structure and checkability of the two outputs side by side.
The skill
Decompose the task before you prompt: break legal work into sub-tasks the model can actually do and that you can actually verify.
IRAC / chain-of-thought face-off on a tricky issue
On us
Give the room a tricky legal issue and have students compare a bare "give me the answer" prompt against one that imposes an IRAC structure and asks the model to reason step by step.
In the machine
Asking the model to show its working (chain-of-thought, IRAC-as-prompt) makes the reasoning visible, so each link — and each cited authority — can be interrogated rather than trusted on confidence.
Live AI
Live, prompt a chatbot on the issue first plainly, then with "reason step by step using IRAC and show your working," and compare how much of the reasoning is now exposed for checking.
The skill
Make the model show its reasoning: give it a procedure (IRAC, step-by-step) so you can verify the working, not just the conclusion.
Few-shot clause demo (no example vs. two examples)
On us
Set a drafting task (e.g., a clause) and have students try it with no exemplar, then imagine supplying two exemplar clauses as a pattern; predict which yields the better draft.
In the machine
Supplying exemplars (few-shot) lets the model match the pattern you actually want — the prompt analogue of reasoning by analogy from precedent — and sharply improves drafting reliability.
Live AI
On the presenter's laptop, request the clause with no example, then re-run supplying two exemplar clauses, and compare the fit and quality of the output.
The skill
Show, don't just tell: supply exemplar clauses, arguments, or formats as a pattern (few-shot) when you need the output to match a known shape.
The lab
Legal Prompt Portfolio (begins here, graded)
Students build and document a portfolio of prompts, outputs, and critique across a set of legal tasks — summarize a judgment, draft a clause, build an issue list, and generate a counter-argument — applying the four pillars (decomposition, few-shot, specification/abstraction, IRAC/chain-of-thought) and iteration discipline (explore variants, then exploit the winner). For each task they capture the prompt, the model output, and a critical assessment of quality and what still needs verification. This is graded coursework (Lab 2, 20%) and continues beyond this module.
Deliverable
A documented Legal Prompt Portfolio: for each of the four legal tasks, the prompt(s) used, the model's output, and a written critique covering prompt strategy, output quality, and the verification still required.
Key sources & cases
Jeannette Wing, "Computational Thinking," CACM 49(3) (2006)
Source of the pillars; brief quotes it: computational thinking is "a fundamental skill for everyone, not just for computer scientists" — grounds the four-pillar prompt-craft as general, lawyer-accessible skill.
Seymour Papert, Mindstorms (1980)
Foundational computational-thinking source the brief names for this module; supports framing CT as a learnable habit of mind, not a programmer-only tool.
Brian Christian & Tom Griffiths, Algorithms to Live By (2016)
Source of the explore-exploit / 37% idea the brief invokes for iteration discipline: explore prompt variants, then exploit the winner.
Legal-prompting practice notes
Brief lists these as a key source for the module's concrete legal prompt-engineering techniques (specification, few-shot, IRAC-as-prompt).
Readings
- Jeannette Wing, "Computational Thinking," CACM 49(3) (2006)
- Seymour Papert, Mindstorms (1980)
- Brian Christian & Tom Griffiths, Algorithms to Live By (2016) — the explore-exploit / 37% rule
- Legal-prompting practice notes (role+task+context+constraints+format; IRAC-as-prompt; few-shot exemplars)
Next module
Module 06 / 08
AI in Practice: Research, Drafting, Review, Discovery, Access to Justice
Apply: match tool to taskBring a credit-bearing AI course to your students
A 16-hour course that treats using AI well as a professional duty — one a council can approve, and a graduate can defend in court.