RadarTrek
Home/Courses/How LLMs Actually Work
🔬Beginner8 lessons · 3 free

How LLMs Actually Work

You cannot build reliable AI products without understanding why LLMs behave the way they do. Why does temperature matter? Why does prompt length affect cost? Why do models confidently make things up? Why does the same prompt produce different results tomorrow? This course builds the foundational mental model — not the mathematics, but the intuition — that separates builders who fight their models from builders who work with them.

No prerequisites — pairs well with Generative AI for Builders
Start free lessons
$29one-time · lifetime access

What you'll learn

How transformers work — attention, parameters, and next-token prediction explained plainly
Tokenisation — what models actually see, context window costs, and the lost-in-middle problem
Temperature, top-P, and top-K — why outputs vary and how to control randomness
How models are trained — pretraining, RLHF, and Constitutional AI (how Claude was built)
The 2026 model landscape — Claude vs GPT-4o vs Gemini vs Llama and when to choose each
System prompts and roles — the three message roles and how the model uses them
Why hallucinations happen — the mechanism, and how to mitigate them in production
Model selection framework — quality, latency, cost, and the routing pattern

Course outline

Full course — $29 one-time

04

How Training Works

Pretraining, RLHF, fine-tuning, and why the same base model can behave very differently

9 min
05

The Major Models Compared

Claude vs GPT-4o vs Gemini vs Llama — beyond the benchmarks to real-world builder trade-offs

9 min
06

System Prompts and Roles

How the conversation is actually structured under the hood — and how to use it effectively

8 min
07

Hallucinations and Why They Happen

The mechanism behind confabulation — and the architectural patterns that reliably reduce it

8 min
08

Choosing the Right Model

A practical framework for matching model capabilities to task requirements — cost, speed, quality

7 min

Get the full course

8 lessons — from tokens and attention to model selection, hallucination mitigation, and the model routing pattern.

8 lessons✓ Beginner-friendly, technically accurate✓ Certificate
$29one-time

Written by the RadarTrek editorial team · Reviewed June 2026

About this course

Large language models like ChatGPT, Claude, and Gemini have transformed how software is built and used — but most people who use them daily have no idea what is actually happening under the hood. This course explains how LLMs work from first principles: tokenisation, attention mechanisms, transformers, training, fine-tuning, and inference. Understanding the technology makes you a significantly more effective AI user and gives you the foundation to build AI-powered applications with confidence rather than copying API calls you do not understand.

This course is for developers, product managers, and technical founders who want to understand the AI tools they are building on top of. It is not a deep mathematics course — we focus on intuition and practical mental models rather than linear algebra proofs. After completing this course you will understand why models hallucinate, how context windows work, what temperature does to outputs, why prompt length affects cost, and how fine-tuning differs from RAG.

Frequently asked questions

Do I need a maths background to understand how LLMs work?

No — this course builds intuition for how transformers and attention work without requiring calculus or linear algebra. We use diagrams, analogies, and plain-language explanations. You will come away with accurate mental models of what is happening rather than mathematical proofs. If you want to go deeper into the maths after completing this course, the academic papers we link to will be much more accessible once the intuitions are in place.

What is a context window and why does it matter?

A context window is the maximum amount of text (measured in tokens) that a language model can process in a single interaction. Models with larger context windows can see more of a conversation, document, or codebase at once. Context size affects both capability (can the model see the whole document?) and cost (longer contexts cost more to process). Understanding context limits is essential for building reliable AI applications.

Why do AI models hallucinate?

Hallucination happens because language models are fundamentally pattern completion systems, not knowledge retrieval systems. They generate the most statistically likely next token given the context, without checking against ground truth. This makes them excellent at fluent text generation but unreliable for facts they were not strongly trained on. Understanding this distinction helps you design prompts and applications that work around hallucination rather than fall prey to it.

What is the difference between fine-tuning and RAG?

Fine-tuning means continuing training a base model on your specific data to alter its behaviour and knowledge. RAG (Retrieval Augmented Generation) means retrieving relevant documents at inference time and including them in the prompt context. Fine-tuning is expensive and requires significant data; RAG is cheaper, more updatable, and better for precise factual recall. Most production applications use RAG for domain knowledge and fine-tuning for style or format consistency.

What is tokenisation and how does it affect AI behaviour?

Tokenisation is how models split text into chunks (tokens) before processing. A token is roughly 3–4 characters of English text. Model costs are calculated per token, context limits are measured in tokens, and unusual words (code, foreign languages, rare terms) often tokenise inefficiently. Understanding tokenisation helps you write more cost-effective prompts and understand why models sometimes struggle with character counting or unusual word forms.

RadarTrek Intel — monthly score updates

We track 40+ tools so you don't have to. Score changes, new tools, and new guides — once a month, no spam.