What is an LLM?
LLM stands for Large Language Model.
It is a computer program that has read a huge amount of text.
Because it read so much, it is very good at guessing what words should come next.
That one trick, guessing the next word, is enough to answer questions, write code and explain ideas.
A model is like autocomplete, but giant
Your phone guesses the next word when you type.
An LLM does the same, but it guesses whole paragraphs, and it is very good at it.
You give it some text. It gives text back.
Everything in this course is built on that simple in and out.
Words you will hear a lot
Prompt: the text you send to the model. Your question or instruction.
Completion or response: the text the model sends back.
Token: a small chunk of text, about three quarters of a word. Models read and write in tokens.
Context window: how many tokens the model can look at in one go. Like the size of its desk.
Temperature: a number from 0 to 1. Low means careful and predictable. High means creative and random.
Tokens in plain words
The sentence 'I love learning Python' is about five tokens.
Providers charge per token, so shorter prompts cost less.
You will see tokens again when we talk about cost and about splitting big documents.
Chat models
Modern models are chat models.
Instead of one big string, you send a list of messages, like a chat log.
Each message has a role: who is speaking.
system: instructions for the model, like "You are a kind tutor"
human (user): what the person asks
ai (assistant): what the model answered before
Models do not remember
This surprises people.
Each time you call the model, it starts fresh.
If you want it to remember the chat, you must send the old messages again.
LangChain has helpers for that. You will meet them in the Chat History lesson.
Models can be wrong
A model guesses. Sometimes it guesses wrong and sounds very sure.
People call this a hallucination.
The fix is to give the model real facts to read, like your own documents. That is what RAG does later in this course.
Where models live
In the cloud: OpenAI, Anthropic, Google. You send a request over the internet and pay per token.
On your computer: Ollama runs free open models like Llama locally. No key, no bill.
LangChain talks to both the same way. That is one of its best features.
Remember: text in, text out. Everything else in LangChain is a helper around that idea.
Test yourself
Three quick questions made just for this lesson. Earn 10 XP per correct answer.