…
…
AI Fundamentals · Lesson 4 / 31 · First encounter: the confident assistant
PreviewIn this lesson you will
You can read the explanation without an account. The exercises and quiz at the end of the lesson are for members.
IT services set up a chat assistant for the help desk as a trial; students type questions, and the assistant answers in seconds with well-formed sentences. Elena hands you the Student Handbook and the assistant's first four answers: "Take a look at these before we send them to students. Which ones can go?"
In this lesson you will answer Elena's question. At the end of the lesson you will have an audit table like the one below: next to each answer of the assistant, there will be a decision and a note on which part of the output you looked at to reach it. The table is empty for now; we will fill it in during the lesson.
| Answer | Student's question | Decision | What I checked |
|---|---|---|---|
| 1 | How do I add or drop a course? | ? | ? |
| 2 | What is the total scholarship for a year? | ? | ? |
| 3 | What is the absence limit? | ? | ? |
| 4 | When does the scholarship application close? | ? | ? |
The only document you will rely on for your decisions is the Student Handbook. Below is a summary of the six items the help desk deals with. Both the handbook and the assistant's answers are made-up texts written for this lesson, but the method works exactly the same in real life.
| Topic | Student Handbook (summary) |
|---|---|
| Scholarship amount | $150 a month, paid for 9 months a year |
| Scholarship application | Closes on October 3 |
| Dorm application | Closes on September 12 |
| Course add/drop | First two weeks of the semester, with advisor approval |
| Absence limit | 30% of class hours |
| Password reset | With your student number, on the IT services page |
In this lesson you will:
First, let's get to know the tool in front of you. A language model runs inside the chat assistant on the desk. Remember from the first lesson: a model is a tool that learns from examples and makes predictions. The examples of a language model are texts; by reading a very large amount of writing, it learns which words tend to come after which other words. Then, when you give it a piece of writing, like the generative systems you saw in lesson 2, it produces a likely continuation of that text. Your question is the beginning of a text, and the assistant's answer is the continuation that looks most likely.
Something is missing from this definition, and what is missing is very important: when a language model answers, it does not look at the school's records. It does not open the Student Handbook and find the right line, and it does not connect to the aid unit's system. All the assistant at this desk has is the patterns left over from the texts it read while learning. We will see how the inside of the model works, step by step, in a later unit; knowing this much is enough for this lesson.
The practical result is surprising: the assistant's correct answer and its wrong answer arrive in the same tone of voice. Because the system does not know whether an answer is right when it speaks, it does not hesitate on a wrong answer, does not say "I think," and does not lower its voice. Look at two answers to the same question.
Example 0 (case): Same question, two answers
Made-up assistant output A (prompt: "When does the dorm application close?"):
OutputHello! Dorm applications close on September 12. I recommend applying
before the last day. If you have any other questions, I would be happy to help.Made-up assistant output B (same prompt, another try):
OutputHello! Dorm applications close on September 20. I recommend applying
before the last day. If you have any other questions, I would be happy to help.Both are polite, both are certain, both are the same length. The only difference is the date. Before I say which one is correct, ask yourself: can you tell from the text itself?
Can you tell which of A and B is correct by looking only at the style?
We will call this fluency is not accuracy. A sentence can have flawless grammar, a confident tone, and a tidy structure, and none of that shows that the date, number, or source inside it is correct. When we talk with people, we treat fluency as a sign of knowledge: someone who knows a subject usually speaks comfortably. In a language model, this link is broken. The model has learned to write fluently very well, because almost all the texts it read are fluent; but it never had a way to learn which date belongs to your school.
"The assistant must be looking something up somewhere" is a very natural thing to say. Let's test this intuition with a small toy. Real language models are much more complex, but the toy shows a single idea plainly: the model tends to write the continuation it has seen most often.
Example 0b (toy): The pile of text the assistant "read"
Output1. Club registration deadline: September 20.
2. Gym membership deadline: September 20.
3. Dorm application deadline: September 12.
4. Volunteer registration deadline: September 20.
5. Dorm rooms are for two or four people.In this pile, after the word "deadline:" September 20 appears three times and September 12 once. If you ask an assistant that learned from this pile "What is the deadline for the dorm application?", it will most likely say September 20, because that is the continuation it has seen most often after "deadline:". Now you can see where answer B in Example 0 might have come from: the sentence about the dorm is in the pile, but it is in the minority.
A small program for this toy is ready in the block below. You do not need to read the code line by line; just change two values and look at the last three lines of the output. We added one more sentence to the pile (the room change deadline is also September 12), so September 12 appears twice in the pile. handbook is the school's official date, and repeat is how many times September 20 appears in the pile. First change the handbook date to September 15: if the school changes its date, does the assistant's answer change? Then change the value of repeat.
First change the handbook date, then the number of times September 20 appears in the pile. Which one does the assistant's answer follow?
Pick a value; predict the output first, then look.
1handbook = "September 12"2repeat = 334# The "text pile" the assistant "read"5pile = []6for i in range(repeat):7 pile.append("Club registration deadline: September 20.")8pile.append("Dorm application deadline: September 12.")9pile.append("Room change deadline: September 12.")1011# The date that most often follows "deadline"12counts = {}13for sentence in pile:14 date = sentence.split("deadline: ")[1].rstrip(".")15 counts[date] = counts.get(date, 0) + 116answer = max(counts, key=counts.get)1718print("Times September 20 appears:", counts.get("September 20", 0))19print("Times September 12 appears:", counts.get("September 12", 0))20print("Assistant's answer:", answer)21print("Handbook:", handbook)22print("Same?", "Yes" if answer == handbook else "No")
Times September 20 appears: 3 Times September 12 appears: 2 Assistant's answer: September 20 Handbook: September 12 Same? No
Faded lines didn't run with this value. Changing the handbook date to September 15 does not change the assistant's answer at all: the code does not look at the handbook. The only thing that changes the answer is the count in the pile. When September 20 appears once, September 12 stays in the majority and the answer happens to be correct; when it appears three times, the answer becomes September 20. Not because it is correct, but because it appears often.
The result is clear: when the handbook changes, the assistant's answer does not move at all, and when the count in the pile changes, the answer changes. So the assistant does not look at the school's records to answer; it says what it has seen most often in what it read. See this too: when September 20 appears once, the assistant says September 12 and matches the handbook. This answer is correct, but not because it is correct; it was chosen because it appears more often in the pile. When the school date becomes September 15, the same answer turns wrong immediately. That is why one correct answer from the assistant does not mean the next one will be correct.
What we do with the assistant's answers can now be tied to a method. In each answer, first find the claim that can be checked: a date, a fee, a calculation, a source name, or a section number. These are the parts that can be compared with the handbook or that you can redo yourself. Then check the source or do the calculation, and make one of three decisions:
Let's start with the first answer.
Example 1 (case): Course add/drop
Made-up assistant output (prompt: "How do I add or drop a course?"):
OutputCourse add/drop happens in the first two weeks of the semester. In the student
information system, choose the course you want to add or drop and send the change
to your advisor for approval. When your advisor approves it, your schedule is updated.This answer has two claims that can be checked: the time (the first two weeks) and the approval step (advisor approval). The "Course add/drop" line of the handbook says exactly this. The decision is yours.
Answer 1 and the handbook line side by side: "Course add/drop: first two weeks of the semester, with advisor approval." What do you do with this answer?
Pick an option and see what happens. There are no points; you can try the other options too.
It is deliberate that the accept decision comes first. After seeing the wrong examples, a person feels like saying "let me reject them all and write them myself." That is a mistake too: hundreds of questions come to the desk every day, and using a correct draft saves Elena's time. The goal is not to trust or distrust the assistant, but to check every answer one by one.
In the second answer, the assistant makes a calculation.
Example 2 (case): Total scholarship for a year
Made-up assistant output (prompt: "What is the total scholarship for a year?"):
OutputThe scholarship is $150 a month and is paid for 9 months. The total for a year:
$150 × 9 months = $1,200.The first sentence is the same as the handbook: $150 a month, 9 months. But do the calculation yourself: 150 × 9 = 1,350. The assistant wrote the inputs of the multiplication correctly but got the result wrong. When a language model does a calculation, it also writes a likely continuation; the number after "150 × 9 =" is not the result a calculator would find, but a number that tends to follow patterns like this in the texts it read. Most of the time it matches, sometimes it does not.
Answer 2: "The scholarship is $150 a month and is paid for 9 months. The total for a year: $150 × 9 months = $1,200." You calculated: $1,350. What do you do?
Pick an option and see what happens. There are no points; you can try the other options too.
The third answer is more insidious, because it cites a source.
Example 3 (case): Absence limit
Made-up assistant output (prompt: "What is the absence limit?"):
OutputAccording to Section 14/3 of the Student Regulations, the absence limit is
40% of class hours. A student who goes over this limit fails the course because of absences.The section number gives the answer an official look. It is as if the assistant opened the regulations, found the section, and passed it on. But you saw in the first section: the assistant does not open any document.
The answer begins with "According to Section 14/3 of the Student Regulations." What does this phrase show?
When you look at the handbook, two problems appear: the limit is not 40% but 30%, and the handbook has no section called "Student Regulations 14/3". This kind of output is called a fabricated source: an answer written as if it relies on a document, section, or publication that does not exist. Why is fixing not enough here? Even if you change the percentage to 30%, the answer still relies on a section that does not exist; when the student looks for that section, they cannot find it, and their trust in the desk is shaken. An answer whose basis is fabricated is rejected, and the answer is rewritten from the source.
Answer 3 says the limit is 40%, citing "Section 14/3 of the Student Regulations." The handbook has no such section; the limit is 30% of class hours. What do you do?
Pick an option and see what happens. There are no points; you can try the other options too.
The fourth answer stands out because of a single word.
Example 4 (case): Scholarship application
Made-up assistant output (prompt: "When does the scholarship application close?"):
OutputScholarship applications definitely close on October 15. Applications made
after this date are not accepted.The handbook says the scholarship application closes on October 3. The word "definitely" does not make the answer more reliable, only more confident. This answer does not rely on a fabricated source; it contains a wrong piece of institutional information. This kind of output is fixed: change the date to October 3, and the second sentence can stay because it is correct. Missing an answer like this is one of the most expensive mistakes, because if a student trusts October 15 and delays the application, their application is lost.
You have looked at four answers, and in each one a different piece did the work. Let's turn these pieces into a map: when you see which part of an output, what should you do?
Match each part of an output with what you should do when you see it.
For each row, pick its match from the list, then check.
This method does not belong only to the help desk. When you ask the assistant for sources for an assignment, the same thing happens.
Example 5 (outside the case): A source list for a history assignment
Made-up assistant output (prompt: "Suggest 3 sources for my assignment on the history of the old water canals of Port Alder."):
Output1. Nadia Brandt, "The Path of Water in the City", 2015.
2. Omar Keller, "Canal Bank Notebooks", 2019.
3. Lena Whitfield, "Encyclopedia of Aqueducts, Volume 4", 2011.You search your school's library catalog: the first two books exist, and the authors and years match. The third does not exist, neither under this title nor by this author. The list cannot be used as it is, because it contains a fabricated source; if you copy this list into your assignment's bibliography, you would be citing a book that does not exist. But that does not mean you should throw away the two real books. You reject the assistant's list; in your bibliography you write only the two books you found yourself in the catalog. What you use is not the assistant's word, but your own verification.
When the trial week ended, Elena put together a breakdown of the assistant's ten answers. You checked four of them, and you will look at the rest in this lesson's exercises.
| Type of answer | How many answers | Decision |
|---|---|---|
| Correct answer that matches the source | 3 | Accept |
| Wrong calculation | 2 | Fix |
| Wrong institutional information in confident language | 2 | Fix |
| Fabricated source | 2 | Reject |
| Personal information the assistant cannot know | 1 | Reject |
Of the ten answers, three went as they were, four went with a small fix, and three were rejected. Neither "all correct" nor "none of it is useful." But you cannot know which answer falls into which group without looking at the answer; that is why every answer goes through the same steps.
Put the steps you follow when checking an assistant answer in order.
Click the lines in order; to undo one you placed wrong, click it in the list below.
Shuffled lines
Your order
Imagine the fourth answer going out without being checked. A student receives the answer "the scholarship application closes on October 15," plans accordingly, and when they go to apply on October 10, they learn that the application closed a week ago. This year's scholarship is gone. Who told the student the wrong date? The assistant wrote the sentence, but the student got the answer from the help desk. In the student's eyes, and rightly, the desk gave the wrong information.
That is why the assistant is a tool, not the one responsible. The responsibility lies with the person who reads the answer and presses the send button. The most common mistake happens right here: when a long, tidy, and polite answer arrives, you pass it on without reading it, with the feeling that "something written this well cannot be wrong." The longer and more polite the answer, the easier it is to miss a single wrong date inside it.
The table at the start of the lesson is now full:
| Answer | Student's question | Decision | What I checked |
|---|---|---|---|
| 1 | How do I add or drop a course? | Accept | The time and advisor approval are the same as the handbook |
| 2 | What is the total scholarship for a year? | Fix | Calculation: 150 × 9 = 1,350; the answer said 1,200 |
| 3 | What is the absence limit? | Reject | The section number is not in the handbook; the limit is 30% |
| 4 | When does the scholarship application close? | Fix | Date: the handbook says October 3; the answer said October 15 |
Some questions have answers that appear in no pile of text, because they are current or personal. The assistant can still produce a confident answer.
Made-up assistant output (prompt: "What time does the IT services office open tomorrow?"):
OutputThe IT services office opens tomorrow at 08:00 and is open until 20:00.The handbook has no opening hours for the office; the assistant has no way of knowing whether tomorrow is a holiday, a maintenance day, or has another change. The answer is rejected; the student is told, "Check the IT services page for current opening hours."
The sent versions of the two answers you decided to fix. Only the wrong part changed; the correct parts stayed as they were.
OutputAnswer 2: The scholarship is $150 a month and is paid for 9 months. The total for a year:
$150 × 9 months = $1,350.
Answer 4: Scholarship applications close on October 3. Applications made
after this date are not accepted.In Answer 4 we also removed the word "definitely": since the date came from the handbook, there is no need to stress it separately.
Not every calculation is wrong; checking also means marking the correct ones as correct.
Made-up assistant output (prompt: "If I run 3 days a week for 40 minutes each, how many hours do I run per week?"):
Output3 days × 40 minutes = 120 minutes a week. That is 2 hours.Calculate it yourself: 3 × 40 = 120 minutes, 120 ÷ 60 = 2 hours. The answer is correct; you accept it. The decision was again based on the calculation, not on the assistant's confident tone.
Passing on a long, polite answer without reading it, or throwing everything away after a single mistake. These are two faces of the same mistake: deciding by the look of one answer or the result of another. One correct answer from the assistant does not make the next one correct; one wrong answer does not make the others wrong. The right way: in each answer, find the claim that can be checked, look at the source or calculate, and make the decision for that answer alone.
Next lesson: To understand what is inside this assistant, we will first go down to the basics of learning from data: data, features, and labels; once that foundation is built, we will return to the language model.
Exercises and quiz are for members
This lesson has 6 coding exercises and a 10-question quiz. Sign up free to solve them, save your progress and move on to the next lesson.