Check my levelCoursesProgramsFor teamsPricing
UKSign inSign up
Check my levelCoursesProgramsFor teamsPricingClaude quizPromptsBlogFAQSearchSign upUK
AcademlCoursesAI Basics: How LLMs WorkContext, Memory, and Tokens
A language model continues the phrase “Unfortunately,” and picks the next word from three optionsA prompt made of four parts: role, task, context, formatA chat request: reply to the customer, delivery on Thursday, up to 80 words
Course

AI Basics: How LLMs Work

Module 1 · What an LLM Is
01What a Large Language Model Is02Context, Memory, and Tokens
Module 2 · Where the Model Breaks
03Model Limits and Hallucinations04Which Model to Choose for the Task
AI Basics: How LLMs Work · Lesson 2

Context, Memory, and Tokens

We unpack what context is, how tokens are counted, why the model 'forgets' the start of a conversation, and how memory across chats works.

20 min readUpdated Nov 9, 20262 questions in quizReady prompt included

The context window

Context is everything the model sees when it generates an answer: the system prompt, the conversation history, the documents you attached. The size of this "window" is measured in tokens.

How many words fit in a token depends on the model's tokenizer. On current Claude models, 1M tokens is roughly 555,000 English words. For Gemini, Google's rule of thumb is about 4 characters per token. So a 100,000-word document can take anywhere from about 125,000 to 180,000 tokens. Non-English text usually costs more tokens than the same text in English. A document larger than the window simply doesn't fit, and the model can't "see" all of it.

The rest of this lesson opens after a free sign-up

Sign up with email or Google: the first two lessons of every course stay open for good, and the whole catalog is open for 7 days. No card needed.

Sign up freeOr a trial lesson, no sign-up →
In this lesson
The context windowWindow sizes across servicesWhy the model "forgets"What "memory" isFeeding documentsPracticeReady promptQuiz
CoursesLLM coursesFor teamsPricingFAQBlogAboutPrivacy
© 2026 AcademlDevelopment & promotion —MMIX — Marketing Mix
Get started free