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.
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.)
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.
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.
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.
🤗 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.
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.