Lesson 1. Model and Context in Plain Terms#
Why This Matters#
To work effectively with AI, you don't need to know math. But it's important to understand the basics: what context is, why the model "thinks" the way it does, and how to influence that.
Key Idea#
The model doesn't "know" — it predicts the next word based on context
ChatGPT, Claude, Gemini — these are language models. They're trained on huge amounts of text and have learned to predict what word should come next. It's like autocomplete on your phone, but on steroids.
How It Works: A Simple Analogy#
Imagine the model as a person who:
- has read millions of books, articles, and websites
- has memorized patterns: after "Good" often comes "morning," after "How are you?" — "Fine"
- but has NOT memorized specific facts like an encyclopedia
When you write a prompt, the model:
- reads your text (context)
- looks for similar patterns in its "memory"
- generates a response, word by word
What Is Context#
Context is everything the model "sees" when answering:
- your prompt (question or instruction)
- knowledge base (if connected)
- previous messages in the conversation
Example:
Without context:
- Question: "How much does it cost?"
- Answer: "Sorry, I don't know what you're referring to"
With context:
- Context: "You sell AI courses. There's a basic course for $50 and an advanced one for $150."
- Question: "How much is the basic one?"
- Answer: "The basic course costs $50."
Context Window and Limits#
Each model has a context window — a limit on how much information it can "hold in mind."
In 2026:
| GPT-5.2 | Claude Opus 4.6 | Gemini 3 Pro |
|---|---|---|
- GPT-5.2: ~128K tokens (~100K words), with intelligent routing
- Claude Opus 4.6: ~200K tokens (up to 1M in beta), leader in coding and reasoning
- Gemini 3 Pro: ~1M tokens (8x more than previous versions!)
What this means:
- short conversation or document — no problem
- long history or large knowledge base — you need to split it up
Tokens are parts of words. On average:
- 1 word = 1.3 tokens (English)
- 1 word = 2–3 tokens (Russian)
Why the Model "Confidently" Makes Mistakes#
The model generates a response word by word, choosing the most likely continuation. Sometimes:
- no data in context → it "makes things up" (hallucination)
- ambiguous request → it picks one interpretation
- contradictory data → it tries to "average" them out
Example of hallucination:
- Question: "When did the restaurant 'At Vasya's' open in Moscow?"
- Answer: "The restaurant 'At Vasya's' opened in 2018" ← the model made it up if it doesn't know
How to avoid:
- give the model a knowledge base
- explicitly say: "If you don't know — say so"
- verify answers
Practical Example: How the Model "Thinks"#
Prompt: "You are a sales manager. Answer the client's question about delivery."
What the model sees:
- role: sales manager
- task: answer a question about delivery
- context: ???
The model "thinks": "Usually sales managers say: delivery 1–3 days, free from $30" and generates that answer.
Problem: if your conditions are different, the model will get it wrong.
Solution: "You are a sales manager. Delivery terms: 2–5 days, free from $50, within the country. Answer the client's question about delivery."
Now the model will give the correct answer.
Check Your Understanding#
- How does a language model work in plain terms?
- What is context and why is it needed?
- Why does the model sometimes "make up" facts?
- What are tokens and the context window?