Week 1 Lab — Experiencing the Intent-Output Gap
CSIC30216 · Fall 2026
What This Lab Is For
You will experience — personally and concretely — the gap between what you intend to say and what a model interprets from what you wrote. This gap is the core engineering challenge of the course. Everything from prompt engineering to agent design is ultimately about closing it.
The Function
This function will be displayed on the screen throughout the lab. Read it carefully before writing anything.
def mystery(items):
if not items:
return []
pivot = items[0]
smaller = [x for x in items[1:] if x <= pivot]
larger = [x for x in items[1:] if x > pivot]
return mystery(smaller) + [pivot] + mystery(larger)
Before you write your prompt: form your own understanding of what this function does. What does it produce? What happens on an unusual input? What would a junior engineer need to know about it?
That understanding is your benchmark. It is what you are trying to get the model to produce.
Part 1 — Write Your First Prompt (10 minutes, individual)
Write a prompt asking the model to explain what this function does.
Write it the way you naturally would. Do not overthink it. Do not discuss with the person next to you — your instinct is the point.
Write it down and keep it. You will need it for your log entry at the end.
Then submit your prompt to the class document using the link on the screen. You can submit anonymously or with your name — your choice.
Part 2 — Observe (10 minutes)
The instructor will run three or four submitted prompts live on the projector.
For each output, ask yourself one question:
Not: was this good or bad? Not: do you like it?
Specifically: what decision did the model make that the student did not make explicitly?
Things to watch for:
- Did the model choose an audience without being told who would read the explanation?
- Did it choose a level of technical detail without knowing the reader's background?
- Did it explain what the function does mechanically, or what it is for?
- Did it mention the recursion explicitly, or describe the behaviour without naming the technique?
- Did it notice the empty list edge case — and if so, did it explain why that matters?
Every one of these is a decision the student implicitly delegated to the model. The model is not wrong — it made the most probable interpretation of what was written. The gap is between what was written and what was meant.
Part 3 — Revise Your Prompt (10 minutes, individual)
Write a second version of your prompt.
Not a complete rewrite. Identify the single most important gap you observed — the decision the model made that you most disagreed with — and address that one thing explicitly.
If you are not sure what to change, ask yourself: what was the one thing in the output that most surprised or disappointed you? That is your one thing.
Some examples of what a one-thing change might look like:
- Adding an audience: “...for a junior engineer who has never seen recursion before”
- Adding a format: “...in exactly three sentences”
- Adding a focus: “...paying particular attention to what happens when the input list is empty”
- Adding a level: “...without using any technical vocabulary”
- Adding a purpose: “...so they know when to use this function and when not to”
These are not the right answers — they are examples. Your gap may be something completely different.
Part 4 — Observe Again (10 minutes)
The instructor will run the revised versions of the same prompts.
For each pair of outputs (original and revised), ask yourself:
- Did the gap narrow? What specifically fixed it?
- Did a new gap appear? What did the revision leave ambiguous that the original did not?
Both outcomes are equally interesting. Closing one implicit decision often reveals another you had not noticed. That is not failure — that is how prompt engineering actually works. It is iterative, not a one-shot fix.
Part 5 — Prompt Engineering Log Entry (5 minutes)
Write your first prompt engineering log entry.
You will maintain this log all semester. It is an individual record of significant AI interactions and the engineering judgments you made about them — what you asked, what it produced, what you decided, and why.
Your first entry has four fields:
- What I asked the model to do — one sentence: your original prompt, verbatim or closely paraphrased.
- What it produced — one sentence: not the full output, just the kind of thing it was. For example: “a technical explanation assuming the reader knows Python” or “a plain-English description that did not mention recursion.”
- What I decided to change and why — one to two sentences: what gap you identified and what your one-thing revision was.
- What this tells me about the gap between intent and output — one sentence: your personal takeaway from observing both outputs.
[your-student-id]-lab-1.txt, to
E3 under “Week 1 Lab” before the end of week (September 11th).
If You Finish Early
Try a third version of your prompt — one more one-thing change, based on what you observed in Part 4. Add a second observation to your log entry noting what happened.
If you have access to a model (Claude.ai, ChatGPT, Gemini, or anything else), try running your own prompts and add those observations to your log. You do not need API access — any web interface works.