Try this first
Finish these lines out loud, before you read further.
- “The capital of France is ____”
- “Please switch off the ____”
function calculateTotal(items) { let total = ____
You answered the third one too, didn’t you? Or at least you had a strong feeling about
what comes next. You have never seen this program. You do not know what items contains.
You still knew that 0 was a good guess.
What you just did
You did not look up an answer. You predicted what usually comes next, based on everything
you have read before.
That is what a large language model does. We will call it a model from now on. A model is
a program that has read an enormous amount of text, including a lot of code. It has learned
which words tend to follow which other words. When you give it some text, it guesses the
next piece of text. Then it guesses the next one. Then the next one.
That is the whole mechanism. There is nothing else hidden inside.
Why this matters so much
People imagine the model is looking things up in a big library. It is not. It has no
library. It produces text that looks like correct text.
Most of the time, text that looks correct is correct. That is why these tools are useful.
But “looks correct” and “is correct” are two different things, and they come apart at
exactly the worst moments.
Hold on to this sentence, because the rest of the course grows out of it:
The model produces likely text. Your job is to check whether likely text is also true text.
That job does not go away when the model gets better. It is the job.
Try this before the next lesson
- Open any AI chat tool. Ask it to write a short poem about Mumbai traffic. Notice how
fast and confident it is. - Now ask it: “What is the phone number of the shop nearest to my house?” Read its answer
carefully. What does it do when it cannot possibly know? - Ask a friend to say the first half of a famous song line. Notice that you complete it
without deciding to. That feeling is the closest thing to how a model works.