Lesson 01: What language models can do and why they make mistakes
You ask an AI when the library closes today. It says nine in the evening and even gives directions. The answer sounds complete and confident. But if it is Sunday and closing time is five, you still arrive too late.
Before learning RAG, notice that readable prose does not establish reliable facts. These articles use a fictional library, with hours and borrowing rules in the linked practice pack. Start by considering which parts of an answer deserve your trust.
Why it is so good at continuing a conversation
A large language model, or LLM, learns many language patterns during training. For common generative models, a useful starting point is predicting further text from the input and what has already been written. The units are tokens, which can be word pieces rather than complete words.
This is useful: it can clarify awkward borrowing instructions or summarize a long notice. With the original in front of us, we can also check whether it lost conditions or changed numbers.
A daily overdue fine is different. Without the policy, it may still supply a plausible amount and payment instructions. Plausible but false or unsupported output is commonly called hallucination. Asking again, or asking it to confirm, does not replace checking the policy.
Decide how this task can be checked
A borrowing guide can sound friendly, but its limits cannot be improvised. B allows three books for fourteen days each. Wording can change; the two facts must stay.
For an ordinary Sunday visit at 18:00, A gives weekend hours of 09:00–17:00, so it is after closing. This requires both finding evidence and comparing times. A particular date also calls for checking exceptional notices.
Different tasks need different checks. Compare rewrites with the original, policies with applicable sources, and time calculations independently. Knowing what to inspect is more useful than judging confidence.
Take ten minutes for two questions
Give A and B to a chat tool and request a guide for new students. Circle every number and locate its source. Then ask about overdue fines and see whether it acknowledges missing evidence. You can also write expected answers manually.
Check after trying
The guide should retain three books and fourteen days; any hours must match A. No passage establishes fines, so the amount is unknown. If the output invents an amount, record that unsupported claim rather than retrying until you get a preferred answer.
Next, clarify the request itself. Different instructions can produce different results from the same evidence.
Further reading: Hugging Face: How Transformers work