Teaching deck · portfolio edition · 29 Oct 2026
From software that answers questions,
to software that gets things done.
Before we start
suggests a possible next word
orders items you might find relevant
flags suspicious payment patterns
estimates journey times from signals
suggests something to watch next
classifies messages using learned signals
One approach: machine learning
if "lottery" in subject:
mark_as_spam()
if "winner" in subject:
mark_as_spam()
# ...and 400 more rules
# that spammers work around
# by writing "w1nner"
Train a model on emails labelled spam or not spam.
It learns statistical patterns that can help classify new messages. Those predictions can still be wrong.
The one-line version
But notice something
Spam model
classifies messages
Face matcher
compares face features
Traffic model
estimates travel time
Fraud model
scores payment risk
A task-specific model does not automatically generalise to unrelated work.
Then something changed
A starting point for language models
“The canteen is always ______ during lunch break.”
A language model generates tokens using patterns learned during training and the context it receives. The next token is selected from a probability distribution.
Next-token generation is the starting point, not a complete account of training, reasoning or tool use.
One piece of vocabulary
Text is represented as tokens: common character sequences, sometimes whole words or word pieces.
“ tokenization” → token + ization
The split depends on the model and language.
Token counts affect context limits and usage costs. Tools and repeated model calls can add latency and other charges.
But there's a problem
QUESTION
How many attendance days am I short for Data Structures?
ILLUSTRATIVE, UNSUPPORTED ANSWER
You are short by 6 days. As per Academic Regulation R-2021, Clause 8.4, submit a condonation form within 15 days.
Why this answer is unsupported
A model does not automatically have access to your private attendance record
Training has a cutoff. Current information needs an appropriate source or tool
A fluent answer or a plausible citation does not establish that a claim is true
Add relevant evidence
Retrieve relevant passages and ask for a grounded answer. Check the cited passage: retrieval can miss evidence and does not guarantee correctness.
Same fictional question, with a fictional rulebook
I don't have your attendance count. In this illustrative rulebook, 75% is required, and below 65% cannot be condoned, so I'd need your actual figure to tell you.
Separate what the source supports from what is still unknown.
In this text-only example
Without a connected booking tool
ILLUSTRATIVE TEXT-ONLY RESPONSE
“Sure! Here's how you can book a lab slot: log in to the portal, go to Lab Booking, select Thursday…”
Helpful. But you still have to do it.
The leap
“Here's how you can book a slot…”
It writes.
→ check_availability("Thu")
→ confirm_booking("Thu", "2 PM")
→ book_slot("Thu", "2 PM")
The system can act within its permissions.
How that actually works
book_slot("Thu","2 PM")A proposed call is not proof that the action was allowed, executed or successful.
And now it has a name
In this talk, an agent uses model decisions to choose steps toward a goal. A fixed workflow can also call tools without being agentic.
Where we are
The real question
An analogy that works
“Book the seminar hall for Friday.”
Hall is booked. It's already taken? They come back and tell you it's taken. Task over.
“Book the seminar hall for Friday.”
Taken? Looks for another room on Friday, checks capacity and asks: “AV room 3–5 PM, is that okay?” A different day needs agreement.
Same instruction. One executes. One pursues the goal.
The five ingredients
The loop that makes it possible
Illustrative run · event summary
Think Need a free hall, and everyone's free time. Act check_hall_availability("this week") Look Only Fri 3–5 PM is free. Think Now check if the team is free then. Act read_calendar(team, "Fri 3–5 PM") Look Two members have a lab till 4. Think Won't work. Try the AV room instead. Act check_hall_availability("AV room") Look Free Fri 4–6 PM. Everyone available. Think Ask before committing the booking and notification. Act confirm_permission("book and notify") → approved Act book("AV room","Fri 4-6"); notify(team) Done Verify booking receipt and notification result.
The important bit
It hit a wall, and changed its own plan.
Adaptive planning is useful when it preserves the user’s constraints, requests required approval and checks the outcome.
Common application patterns
Can inspect a repository, propose edits and run tests within granted access; review remains part of the workflow
Can search sources, follow leads and draft a report; citations and conclusions still need checking
Can inspect a ticket, propose a reply or perform permitted actions; sensitive changes may require approval
Be honest about it
Retries the same failing step, or decides a bad result was good enough
Model calls, tools and retries add cost and latency. One workflow step does not imply one API call
A wrong step 2 quietly poisons every step after it
Design limits for steps, time and spend. Validate tool boundaries, define approvals and provide a safe failure path.
The question I want you to ask
If it worked in your demo three times, you have proved almost nothing.
What to measure
Define success criteria. Use realistic, edge and failure cases; repeat runs, compare changes and keep held-out cases. A small demo is a starting point.
Build one
Use an authorised handbook. Retrieve relevant clauses, cite them and test unsupported questions.
Use a job description and your notes to draft a study plan. Confirm before adding calendar events.
Compare a menu with stated preferences. Add notifications only with explicit permission.
Start with one bounded task and clear tests. Add tools only when the task needs them; more tools do not by themselves make a system agentic.
Further reading · checked 29 Oct 2026
A revised teaching edition. The attendance scenario, policies and booking trace are illustrative. Terminology and implementations vary.
Thank you