Skip to content
TeachTrails
AI BasicsLLMsChatGPT

How Does ChatGPT Work? LLMs Explained Simply

How does ChatGPT work? A plain-English guide to large language models: tokens, next-word prediction and training, with a live tokenizer and word predictor.

Sudipta Biswas, AI Engineer

9 min read

Beginner friendly
How ChatGPT predicts the next wordThe sentence "The cat sat on the" is split into tokens, passed through a neural network, which scores possible next words. "mat" gets the highest score and is added to the sentence.1 · Your text → tokens2 · Neural network3 · Next-word oddsThe cat sat on theThecatsatontheNext word?matsofafloormoon… the mat ✓Predict. Append. Repeat.One token at a time, until the reply is done.

Checking your access…