Learn Lumin

← All lessons

10 min

How language models work (without the mystique)

Tokens, context windows, and why “the model said” is not the same as “the model retrieved.”

Text in, next-token out

A large language model reads your prompt as tokens (pieces of words) and predicts likely next tokens. Chat products add a system prompt, safety layers, and sometimes tools. The core loop is still prediction.

If you need a fact from last Tuesday’s invoice, the model only has it if you pasted it, a tool fetched it, or it happened to be in training data. There is no built-in filing cabinet.

Context window

The context window is the working memory of one request: the system prompt, your messages, retrieved snippets, and the reply so far. When you overflow it, earlier turns drop or get compressed. Long chats are not infinite memory.

Weights you can download vs APIs you call

Some models are **hosted**: you send a prompt to a company’s API. Some are **open-weight**: you can download files (license permitting) and run them with a local runtime. Hosted is easier. Local keeps the prompt on your machine. Neither is automatically “smarter.”

Model cards and licenses live on the publisher’s site or Hub page. This catalog links there instead of restating licenses.

Related AI sites in the catalog

Next lesson →