# What is AI, machine learning, and a large language modellarge language modelA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète →?
Three tools sit on your phone right now: a spam filter that quietly trashes junk email, a photo app that finds every picture of your dog, and ChatGPT writing a polite reply to your landlord. Most people call all three "AI." They're right, technically. But these three things work in very different ways, and understanding the differences is the single most useful thing you can learn about AI.
Let's untangle them.
Artificial Intelligence (AI) is a broad label for any computer system that does something we'd normally call "smart": recognizing a face, recommending a movie, beating you at chess, writing an email.
That's it. AI is the whole category. It doesn't tell you *how* the smart thing happens.
A 1980s chess program was AI. So is the autocomplete on your phone. So is ChatGPT. They share almost nothing under the hood. "AI" is like the word "vehicle": it covers bicycles, trucks, and rockets.
So when someone says "we added AI to our app," they've told you almost nothing. The useful question is always: *what kind?*
Most modern AI is built with machine learning (ML): instead of a human writing step-by-step rules, you show the computer thousands of examples and let it figure out the pattern itself.
Here's the contrast.
Old way (hand-written rules): A programmer writes, "If the email contains the word FREE in all caps, mark it as spam." Brittle. Spammers just write "F R E E" instead.
Machine learning way: You feed the system 100,000 emails, each labeled "spam" or "not spam." The system learns which combinations of words, senders, and patterns tend to mean spam. Nobody wrote the rules. The system inferred them from the examples.
Your spam filter is a classifier: a model that sorts things into buckets. Two buckets here: spam or not spam.
It looks at an email and outputs a probability: "92% spam." Above some threshold, it goes to the junk folder. When you manually mark something as spam, you're giving it a new labeled example, and it gets a little better.
Your photo app finding every picture of your dog uses the same core idea, applied to images. It was trained on millions of labeled photos ("this is a dog," "this is a beach," "this is a face"). It learned the visual patterns.
This is still a classifier, just with pixels as input instead of words. Same family. Different senses.
Both examples share a key trait: they do one narrow task. The spam filter can't tag your photos. The photo-tagger can't sort your email. They're specialists.
If you want a quick, friendly grounding in how machine learning works, Google's Machine Learning Crash Course has a free, readable intro.
Now ChatGPT writing your email. This is a large language model (LLM), and it's a specific, recent type of machine learning built for one task: predicting the next chunk of text.
Here's the part that surprises people.
An LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → is, at its core, a very, very good next-word predictor.
Try to finish this sentence:
> "I poured myself a cup of ___"
You said "coffee" (or maybe "tea"). You didn't look it up. You've read and heard enough English that the pattern is obvious.
An LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → does exactly this, at enormous scale. During training, it read a huge slice of the internet: books, articles, websites, code, forums. Its only job, billions of times over, was: given some text, predict what comes next. Guess, check against the real text, adjust, repeat.
Do that long enough, with enough text and enough computing power, and something remarkable happens. To predict the next word well, the model has to absorb grammar, facts, reasoning patterns, tone, and the structure of arguments. Predicting text *well* turns out to require a working model of how language and ideas fit together.
One small clarification. LLMs don't work in whole words but in tokenstokensA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →: chunks of text, often a word or part of a word. "Coffee" might be one tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →; "unbelievable" might be three. When you hear "the model predicts the next tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →," it just means the next small chunk of text.
When you type "Write a polite email asking my landlord to fix the heater," the model isn't looking up a template. It's predicting, one tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète → at a time, what a helpful, polite email would look like given your request. "Dear" then "Mr." then "Smith," then "I" then "am" then "writing"... each tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète → chosen because it's a likely, sensible continuation.
That's why two LLMs (or the same one twice) can give you slightly different emails. There's a bit of controlled randomness in *which* likely word it picks. That randomness is also why LLMs can hallucinate: confidently produce text that sounds right but is factually wrong. It's predicting plausible words, not checking a database of truth.
You don't need to be a programmer, but seeing the actual call demystifies things. Here's how you'd ask an LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → (Claude, in this case) to write that email, using its APIAPIApplication Programming Interface: a standardised interface that lets applications communicate and exchange data without knowing each other's internal workings.Voir la définition complète →:
import anthropic
client = anthropic.Anthropic() # uses your API key
response = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=300,
messages=[
{
"role": "user",
"content": "Write a short, polite email asking my landlord to fix the broken heater in apartment 4B."
}
],
)
print(response.text)That's the whole idea. You send text in (the content), the model predicts good text back out, tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète → by tokentokenA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →. ChatGPT and Gemini work the same way; only the model name and a few details change.
You'll notice max_tokens=300. That caps how much text comes back. Remember: the model thinks in tokenstokensA token is the basic unit of text that language models process, often a word fragment, whole word, or punctuation mark rather than a single character.Voir la définition complète →, so you literally budget its output in those chunks.
Vérification des acquis
1. According to the lesson, why is the statement "we added AI to our app" almost meaningless?
2. What is the key difference between the 'old way' (hand-written rules) and the 'machine learning way' of building a spam filter?
3. The lesson describes a spam filter as a 'classifier.' What does a classifier fundamentally do?
4. Select ALL correct answers: which of the following are given in the lesson as examples of things that count as AI?
Sélectionnez toutes les réponses correctes.
5. Select ALL correct answers about how machine learning relates to AI according to the lesson.
Sélectionnez toutes les réponses correctes.
This isn't trivia. Knowing which kind of AI you're dealing with changes how you use it.
LLMs are generalists; classic ML models are specialists. The spam filter does one thing perfectly. An LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → can draft an email, summarize a report, translate, brainstorm names, and explain a tax form. That flexibility is the breakthrough of the last few years. But it comes with a catch.
LLMs predict plausible text, not verified truth. A spam filter is rarely "creatively wrong." An LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → can invent a fake legal case or a wrong statistic with total confidence. So: use LLMs for drafting, thinking, and transforming text. Verify anything factual.
The right tool depends on the job. Need to sort 50,000 customer reviews into "happy" or "angry"? A simple classifier is cheaper and more reliable than an LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète →. Need to write a personalized reply to each angry one? That's LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → territory. Increasingly, smart systems combine both.
Every LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète → is machine learning. All machine learning is AI. But not all AI is an LLMLLMA Large Language Model is an AI system trained on vast text data to predict and generate language, enabling tasks like writing, summarizing, and answering questions.Voir la définition complète →, and that's the confusion this lesson exists to clear up.
When you use ChatGPT, Claude, or Gemini for the rest of this course, hold this picture in your head: you are steering a powerful next-word predictor.
That single idea explains nearly everything about working with these tools. It's why clear prompts produce better results (you're giving it a better starting pattern to continue). It's why it can write beautifully but get a date wrong. It's why giving it your actual document to work from beats asking it from memory.
You're not talking to a search engine or a database. You're collaborating with a prediction engine that has read an enormous amount and is very good at continuing whatever you start.