MIS 752 · Lab 8 Lite · RAG · Book Ch. 20 and 21 · no coding · the handbook and every question here are invented
At the library
the handbook, copied onto cards
➜
skims, pulls 20
➜
reads those 20, keeps 3
➜
answers, shows the page
➜
a nurse checks that page
In RAG
📇cards with page numbers
➜
🔎quick skim (vector search)
➜
🧐careful read (reranker)
➜
💬answer + [p. 4]
➜
✅a person can verify it
A good clinician does not answer a dosing question from memory: the habit is to look it up and be able to show where.
RAG (retrieval-augmented generation) makes a model do the same. Find the right cards first, answer only from them, and cite the page.
And when the handbook does not cover the question, a good librarian says so: NOT IN DOCUMENT.
Photos: Josh Hawkins, Becca Schwartz, Aaron Mayes, Benjamin Richards and Anjanette Arnold, UNLV. Real UNLV spaces, starting with Lied Library; the handbook and the questions in this lab are invented.
Why this matters
The one idea of this lab, before you start.
💡 THE IDEAA model answering from memory gives the most likely words, with no source. RAG, retrieval-augmented generation, makes it look things up first: answer only from the right passages of your own document, cite the page, or say NOT IN DOCUMENT when the document is silent.
🏥 HEALTHCAREA nurse has ten seconds to check an answer before acting on it. A page makes that check possible; an honest refusal sends the question to a person, not a guess to the patient.
💼 BUSINESSCitations and refusals make a "chat with our documents" tool measurable, which is how a manager decides to keep it, restrict it, or pull it.
🎯 BY THE ENDYou will be able to explain why a cited answer beats a fluent guess, tell a passage about the question from one that answers it, and build a handbook that refuses what it does not cover.
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 · The handbook and the librarian
Silver Ridge Health System's clinic handbook: ten pages, invented for this lab. No model has ever seen it, which is the point. It stands in for your own organization's documents.
📘 Silver Ridge Health System Adult Ambulatory Formulary and Care Protocol Handbook 2026 edition · synthetic teaching document · not clinical guidance
📇 46 cards
The librarian copies the ten pages onto index cards, a few sentences each, with the page number in the corner. No card ever spans two pages, or the citation would be lost. Here are three of them.
Free, no account. Built by Google's TensorFlow team.
It opens with 10,000 English words, each one a dot placed by meaning. Drag to spin the cloud.
In the Search box on the right, type kidney (or doctor, or drug) and click the word in the list.
Read its nearest points: the closest words share meaning, not spelling. That closeness is exactly what the quick skim measures between your question and every card.
❓ Find two words that sit close together but would be dangerous to swap in a prescription. What does that tell you about treating "closest" as "correct"?
📌 What this shows: before anything is answered, ten pages become small cards that each keep their page number, and two reading skills decide which three cards the model will ever see. Every citation and every refusal later in this lab rests on that preparation: a card without its page cannot be cited, and a card the librarian never pulls cannot be used.
7 · What the model actually reads
It never sees the whole handbook. It sees three cards and four rules. Finding the right three is the librarian's whole job.
THE ONLY CARDS IT SEES
Run any example above: the three cards the model received appear here, exactly as it saw them.
THE FOUR RULES IT MUST FOLLOW
📌 What this shows: the model answers from three cards and four rules, nothing more, so the answer is won or lost when those three cards are chosen. The exact phrase NOT IN DOCUMENT turns "I don't know" into something a program can count and route to a person, which is how a clinic measures whether the system refuses when it should.
🧠 Think it through
8 · Design your own handbook
This is the real skill. Think of a moment in your own work when someone needs an answer that only your organization's document has: a policy, a price list, a protocol, a manual. Write a tiny handbook for it, then test it the way this lab tested Silver Ridge's. No code: just plain English.
Photo: Josh Hawkins / UNLV
📌 What this shows: the same method works on any document you own, such as a billing policy, a hotel's guest rules or a product manual, as long as each page says its facts plainly. One question it should answer and one it should refuse is the smallest honest test of whether a system is ready to put in front of people.
9 · Your turn
Ask anything about the Silver Ridge handbook: a dose, a target, a screening age, a prior-authorization rule. Or ask something it does not cover, and see which side admits it.
📌 What this shows: your own question has no answer key, so you are the checker. Read the cards it kept and open the page it cited: if that page does not say what the answer says, the citation is a receipt for the wrong thing, and only a person reading the page would catch it.
What you learned, and why it matters
🧭 THE THREADYou started with a fluent answer that nobody could check, and you finished with a system that reads first, keeps only the cards that answer, cites the page, and says NOT IN DOCUMENT when the handbook is silent. Each part added one safeguard: page numbers on the cards make citations possible, the careful read separates a card about the topic from the card that answers, and the four rules make a refusal something a program can count. None of this makes an answer automatically right; it makes the answer checkable in the ten seconds a nurse has, and it sends what the document cannot answer to a person.
🌍 YOUR FIELDThe same design runs HR policy assistants, legal research tools, support desks and a resort's guest-services bot. For your own field or your project proposal, ask three questions: which document must it read, what page would it show, and who answers when it says NOT IN DOCUMENT?
10 · Hand it in (Canvas, Lab 8)
1. Download your submission with the button below, then upload the file to the Lab 8 assignment on Canvas. It holds every question, your predictions, both answers, the cards the librarian kept, your own handbook, and everything you wrote.
2. Answer these five, a few sentences each. Each asks why:
When your prediction was wrong, what had you assumed about the model that turned out not to be true?
An answer with no page scores zero in the Colab lab, even when its facts are right. Do you agree, for a clinic? Would you grade a hotel front-desk assistant the same way? Why or why not?
Pick the example where the careful read changed the most. In plain words, what did the quick skim get wrong, and why could it not see the difference on its own?
Your own handbook. Did it answer your first question from the right page and refuse the second? What did you change in your pages, and why did that help?
A page number makes an answer checkable, not right. Describe one way your handbook could still produce a wrong answer with a correct-looking citation, and who should check it before anyone acts on it.
Nothing you type is stored anywhere. Download your file before you close the tab.
How this page works. The quick skim and the careful read are the same two models your Colab lab uses (all-MiniLM-L6-v2 and the ms-marco-MiniLM-L6-v2 cross-encoder), in compressed 8-bit versions that run inside your browser, so their scores can differ a little from the notebook's. The cards, questions, answer keys, rules and scoring are the notebook's. Only the final answer calls a language model.