MIS 752 · Lab 9 Lite · Book Ch. 19 and Ch. 6 · no coding · every patient here is invented
On the ward
A resident thinks
➜
orders a test
➜
the lab runs it
➜
the result comes back
➜
thinks again, decides
In an agent
🧠Thought
➜
📝Action: asks for one lookup
➜
🏥your system runs it
➜
📋Observation: written by your system
➜
🔁repeat, then Final Answer
A good resident never writes a lab result into the chart before the lab has run the test. An agent is a model in a loop.
It thinks, asks for one lookup, and stops. Your system runs the lookup and writes the result, called the Observation.
The model reads it and thinks again, until it can give a Final Answer. One rule matters most: the model never writes its own Observation,
and a one-word stop sign enforces it.
Photos: Josh Hawkins, Becca Schwartz, Benjamin Richards, Lonnie Timmons III and Aaron Mayes for UNLV. Real UNLV spaces; the patients in this lab are invented.
💡 Why this matters
💡 THE IDEAAn agent is a model in a loop: it thinks, asks for one lookup, and stops, and your system runs the lookup and writes the result, the Observation. A step budget caps how many steps it may take.
🏥 HEALTHCAREAn agent's mistakes are actions. If the model writes its own Observation, an invented kidney number can keep a patient on a drug that harms her, and it looks exactly like a real result.
💼 BUSINESSEvery step is a signal someone may have to read. Check them all and reviewers stop reading; check none and they trust it blindly. Who reads which step is a management decision.
🎯 BY THE ENDYou will be able to say who writes each line of an agent's trace (its step-by-step record), explain what a step budget protects, and choose how much a person must read.
0 · Connect a model
Paste the free OpenRouter key from Lab 1. It stays in this browser tab only: it is never saved and never sent anywhere except OpenRouter. (Instructor's computer: leave it empty to use the local model.)
🔎 What this shows: Every example below sends this one model the same instructions on both sides. So when the two sides behave differently, the difference comes from the loop built around the model, not from a smarter model, and that is the lesson of agents in one sentence.
1 · Two tools, one loop, one stop sign
Every example below uses the same two lookups and the same instructions. What changes is whether anything runs the loop.
🔎 What this shows: The model's whole world is these instructions and two lookups over fixed lists. It cannot run anything; it can only write the name of a tool as text, and your system decides whether to run it, the way a pharmacist fills only what is on a valid prescription. That boundary is why you can give an agent a tool without giving it your computer.
7 · Who reads all those steps?
An agent is a signal generator: every step is something a person may be asked to check. Your own runs above fill in the numbers below.
Photo: Benjamin Richards / UNLV Photo Services
🚗 CAR ALARMApprove every step, and within a week nobody looks up. Thousands of alarms for nothing taught everyone that the sound means nothing.
🧭 SATNAVRubber-stamp, and you follow it onto a closed road, because it was right every day for a year.
🚩 FLAGSRead only what the system flags: an empty lookup, a broken step, a result the stop sign threw away, a run out of steps. Cheap, but it only sees the failures something can detect.
🔎 What this shows: The numbers come from your own runs: approving every step means reading all of them, which is how alert fatigue (people dismissing alerts because most are noise) starts, while reading only the flags is cheap but never sees a confident wrong answer that broke nothing. So the review policy decides how much human attention the agent spends and which failures can still reach a patient, which makes it a management decision, not a modeling one.
8 · Build your own agent
The loop is not clinical. The only healthcare in it is what sits in the reference. Point it at your own field, then leave a hole on purpose.
Photo: Becca Schwartz / UNLV
🎯 GOALWrite a tiny reference for your own work, and watch the same loop use it.
🧩 YOU WRITEThree entries, one question that needs more than one of them, and one question your reference cannot answer.
🕳️ THE TESTDoes your agent say “that is not in the reference”, or invent an answer that sounds just like a real one? That is the finding.
🔎 What this shows: The loop did not change at all, only the reference did, which is why agents spread so quickly across industries and why the same failure travels with them. On your hole, the agent either said the answer is not there or invented one in your field's own words, and the person in your field who would act on that invented answer is the one your design has to protect.
🤗 Try it live on Hugging Face
The loop you just ran, explained by Hugging Face's free Agents Course, with a weather-agent example you can follow step by step.
Screenshot: Hugging Face Agents Course, Unit 1
Hugging Face Agents Course: the Thought, Action, Observation cycle
Free to read; no account needed (skip the sign-up box).
Read “The Core Components” and look at the loop diagram.
Follow the example agent through one Thought, one Action and one Observation.
Find where the agent decides it is done, and compare that with this lab's Final Answer and step budget.
Open it on Hugging Face ➜In the course's loop, who writes the Observation: the model or the system around it? Why is that the whole point of this lab's stop sign?
The system writes the Observation: it runs the action and reports what actually came back. The stop sign makes the model pause right after it names an action, so it cannot write a made-up result for itself. If the model wrote its own Observations, the loop would look like careful checking while really being guesswork, and a tired reviewer could not tell the difference.
🎓 What you learned, and why it matters
🔁 THE LOOPYou ran the same model two ways: left alone, it can type a result nobody looked up, and that invented line looks exactly like a real one. In the loop, your system writes every Observation, the stop sign keeps the model from writing its own, and the step budget turns a loop that never ends into a clear handoff to a person.
👀 THE HUMANThe hole and the alerts showed the harder half: the most dangerous answer is a confident one where nothing in the plumbing failed. Reading every step is not the fix, because people stop reading. An agent is safe only when someone has designed who writes each line of the trace and who reads which step.
🌍 YOUR FIELDThe same loop handles insurance claims, invoices and hotel front desks, so the same invented answer can show up as a fee or a denial rule nobody wrote. If your project proposal says “an agent will handle it”, be ready to say whether the job needs several steps, what the model may never write, what the step budget is, which steps interrupt a person, and what checks the final answer when nothing was flagged.
9 · Hand it in (Canvas, Lab 9)
1. Download your submission with the button below, then upload the file to the Lab 9 assignment on Canvas. It holds every run as a trace (every Thought, lookup and Observation), your predictions, your own agent, and everything you wrote. It keeps your answers only, never the model answers.
2. Answer these five, a few sentences each. Each asks why:
The loop. Name the four stages (Thought, Action, Observation, Final Answer) in your own words. Which one does your system write, never the model, and what goes wrong if the model writes it?
The stop sign. Did the model ever write its own Observation on the left, or start to on the right? Why is stopping it at the word “Observation:” safer than checking its answer afterwards?
The hole. What did the agent do when the reference had no night shift policy? Quote it. Why is “that is not in the reference” worth more than a confident answer?
The budget. What happened with two steps? When an agent has no ceiling at all, who pays, and how would anyone notice?
The human. Which supervision policy would you put on a ward, and what must be true about the agent for that to be safe? Name one failure that no flag would ever catch.
Nothing you type is stored anywhere. Download your file before you close the tab.