Ground Truth.
AI, checked against the source.
Curated, cited lessons on AI topics — written for people, and published in a structured form for AIs too. Truthful and academic; every lesson lists its key papers.

Lessons

Genome language models: predicting DNA the way a chatbot predicts text

Genome language models are trained to predict the next base in a DNA sequence, the same objective that produces chatbots, and they turn out to learn enough biology to write working viral genomes from scratch.

Intermediate · genomics · biology · sequence-models · science · fundamentals

Ensembles: why averaging several models beats picking the best one

An ensemble runs several models on the same input and combines their answers, which reliably beats any single member because independent mistakes cancel while correct signal adds -- and it is where forecast probabilities come from.

Beginner · ensembles · fundamentals · uncertainty · forecasting · machine-learning

Credit assignment: figuring out which step deserved the reward

Credit assignment is the problem of working out which of an agent's many decisions actually caused the eventual outcome, and it is the central difficulty in training anything that acts over a long sequence of steps.

Intermediate · fundamentals · reinforcement-learning · agents · training · reward-models

Shortcut learning: when a model gets the right answer for the wrong reason

Shortcut learning is what happens when a model finds a cue that correlates with the right answer but has nothing to do with the actual task, and uses it instead of learning the thing you wanted.

Beginner · fundamentals · robustness · generalization · computer-vision · evaluation · bias

Differential privacy: a mathematical promise about what a model can reveal about you

Differential privacy is a formal guarantee that a system's output would look almost the same whether or not any single person's data was included, enforced by adding carefully calibrated noise. It is the only privacy protection for machine learning that comes with a provable bound rather than a hope.

Intermediate · privacy · fundamentals · security · training · policy

Autoencoders and VAEs: teaching a model to compress the world

An autoencoder is a network trained to squeeze data through a narrow bottleneck and rebuild it, and a variational autoencoder makes that bottleneck a smooth space of probabilities you can sample from, which is why nearly every modern image and video generator does its work inside one.

Beginner · fundamentals · generative-models · representation-learning · vae · diffusion

Approximate nearest neighbor search: how a vector database finds a needle in a billion haystacks

Approximate nearest neighbor search is the algorithm that makes vector search fast enough to be useful - it finds the closest matches to a query embedding without comparing it against every item in the database, trading a small, tunable amount of accuracy for speedups of a hundred times or more. Every vector database and every retrieval-augmented system runs on it, and the accuracy it gives up is the hidden knob behind a lot of 'the retrieval just missed it' bugs.

Intermediate · retrieval · embeddings · vector-database · hnsw · rag · search · infrastructure

Content provenance and watermarking: how you tell whether a machine made it

Content provenance and watermarking are the two competing methods for answering 'did an AI make this?' - provenance attaches a signed record of where a file came from, while watermarking hides a statistical signature inside the pixels or word choices themselves. Provenance is robust but strippable; watermarking survives copying but degrades under editing, and neither works on a file that was never marked in the first place.

Beginner · provenance · watermarking · c2pa · synthetic-media · ai-safety · policy · deepfakes

Guardrail models: the second AI that decides whether the first one's answer ships

A guardrail model is a small separate classifier that reads what a user sends an AI and what the AI sends back, then scores whether it violates a policy - so safety becomes a component the operator owns and can inspect, rather than a behaviour buried in the main model's weights.

Beginner · fundamentals · guardrails · moderation · ai-security · safety · classifiers · deployment

Model merging: combining two fine-tuned models by averaging their weights

Model merging combines two or more models that share a common ancestor by arithmetic on their weights - averaging them, adding their differences, or interpolating between them - producing a single model with both sets of skills and no additional training.

Intermediate · fundamentals · model-merging · fine-tuning · efficiency · open-weight-models · training

Full-Duplex Speech Models: Listening and Talking at the Same Time

A full-duplex speech model processes incoming audio while it is generating outgoing audio, which removes the turn detector that decides when you have stopped speaking and makes interruption, backchannels, and overlap possible.

Intermediate · speech · full-duplex · voice-ai · audio · fundamentals · architecture

Self-Play: How a Model Gets Better by Competing With Itself

Self-play is training a model by having it compete or cooperate against copies of itself, so the opponent gets harder exactly as fast as the learner improves and the training data never runs out.

Intermediate · self-play · reinforcement-learning · training · fundamentals · multi-agent

Sandboxing an AI agent: least privilege for a program that improvises

Sandboxing an AI agent means deciding in advance what actions it can take, rather than trusting it to decide well in the moment, because an agent's behaviour is shaped by text that attackers can often influence and no amount of model quality closes that gap.

Intermediate · cybersecurity · ai-security · ai-agents · agent-security · prompt-injection · sandboxing

Offloading and streaming: running a model bigger than your memory

Offloading and streaming let a machine run a model far larger than its memory by keeping only the parts needed right now in fast memory and fetching the rest from system RAM or disk on demand, trading speed for capacity.

Intermediate · inference · local-ai · memory · mixture-of-experts · systems · offloading

Imitation Learning: Teaching Machines by Showing, Not Rewarding

Imitation learning trains a system by having it copy demonstrations from an expert rather than discover behaviour through trial and error, and behaviour cloning - simply predicting what the expert did in each situation - is the simplest and most widely used version of it.

Beginner · reinforcement-learning · robotics · training · agents · vla

Vector Quantization: Turning Continuous Data Into a Vocabulary

Vector quantization forces a neural network's continuous internal representations to snap to a finite set of learned reference vectors, converting images, audio, or video into sequences of discrete symbols that a language model can predict just like words.

Intermediate · representation-learning · tokenization · generative-models · world-models · audio · video

Calibration: whether a model's confidence means anything

A model is calibrated when the things it says with 70% confidence turn out to be true about 70% of the time - and calibration is a completely separate property from accuracy, which is why a model can be both frequently right and systematically untrustworthy about when it is wrong.

Intermediate · calibration · uncertainty · evaluation · reliability · fundamentals

BM25 and lexical search: the keyword formula that keeps beating neural retrieval

BM25 is a decades-old formula that ranks documents by how often a query's rare words appear in them, adjusted for document length - and it remains the baseline that modern AI retrieval systems have to beat, often unsuccessfully.

Beginner · retrieval · rag · search · bm25 · fundamentals

Data poisoning and backdoors: attacking a model through what it eats

Data poisoning is an attack that corrupts a model by tampering with its training data rather than its code, and a backdoor is the sharpest form: a model that behaves perfectly until it sees a secret trigger. Anthropic and the UK AI Safety Institute found in 2025 that just 250 poisoned documents compromised models from 600 million to 13 billion parameters alike, which means scale does not dilute the threat.

Intermediate · data-poisoning · backdoors · ai-security · supply-chain · training-data · cybersecurity · fundamentals

Vision Transformers: what happens when you feed a picture to a language architecture

A Vision Transformer chops an image into a grid of small patches, treats each patch as a word, and runs the exact same Transformer machinery that powers language models over the resulting sequence. Google Research showed in 2020 that this beats purpose-built image networks once you train it on enough data, and it is why today's image, video and robot models all share one architecture.

Beginner · vision-transformers · computer-vision · transformers · architecture · multimodal · fundamentals

The harness: the code around a model that decides how smart it looks

An agent harness is the ordinary software wrapped around a language model that decides what it sees, what tools it can call, and what it remembers between steps, and changing it can swing benchmark scores several times over without touching the model at all.

Beginner · agents · evaluation · fundamentals · benchmarks · context-engineering

Catastrophic forgetting: why teaching an AI something new can erase what it knew

Catastrophic forgetting is the tendency of a neural network to lose an old skill when trained on a new one, because both skills are stored in the same weights and nothing protects the old settings.

Intermediate · training · continual-learning · fine-tuning · fundamentals · neural-networks

Forward and Reverse KL Divergence

KL divergence measures how far one probability distribution is from another, and it is asymmetric: swapping which distribution goes first changes whether your model tries to cover everything the target does or commit to one part of it.

Intermediate · fundamentals · training · distillation · probability · loss-functions

Classifier-Free Guidance

Classifier-free guidance is the knob that makes image and video models actually follow your prompt: it runs the model twice - once with your prompt, once without - and pushes the output along the difference.

Intermediate · diffusion · image-generation · video-generation · sampling · fundamentals

Jailbreaking and red-teaming: breaking an AI on purpose, before someone else does

A jailbreak is an input that makes a model do what its training told it to refuse, and red-teaming is the organized practice of hunting for those inputs deliberately, which is how every safety claim about a model gets tested before release.

Beginner · fundamentals · security · red-teaming · jailbreaking · ai-safety · alignment · evaluation

How a model is stored: safetensors, GGUF, and why one model arrives in 96 files

A trained model is just a large dictionary of numbered arrays saved to disk, and the file format that holds them determines whether the model loads safely, loads fast, and loads at all on your hardware.

Beginner · fundamentals · model-formats · safetensors · gguf · quantization · local-llm · infrastructure

Model Routing and Cascades: Spending Frontier Money Only Where It Buys Something

Model routing sends each request to the cheapest model that can handle it, and cascades escalate to a stronger model only when a cheaper one is not confident, which cuts serving costs substantially because most production traffic is easy.

Beginner · routing · cascades · cost-optimization · inference · agents

Why AI Inference Runs Out of Memory Bandwidth Before It Runs Out of Math

Generating text with a language model is limited by how fast weights can be moved from memory into the processor, not by how fast the processor can multiply, which is why most of a GPU sits idle during inference.

Intermediate · inference · hardware · efficiency · memory-bandwidth · fundamentals

Neural text-to-speech: how a model turns writing into a voice

Neural text-to-speech converts written text into audio in three stages - working out the sounds, deciding how long each one lasts, and generating the actual waveform - and the last stage, the vocoder, is where most of the model's size and difficulty hides.

Beginner · text-to-speech · speech · audio · fundamentals · generative-models

Convolutional neural networks: how machines learned to see

A convolutional neural network learns small reusable filters that slide across an image, so the same edge or texture detector works anywhere in the frame - the idea that made computer vision practical and still runs inside modern image, audio and video systems.

Beginner · cnn · computer-vision · fundamentals · architecture · deep-learning

Activation functions: the tiny nonlinearity that makes deep learning possible

An activation function is a simple nonlinear operation applied to each number flowing through a neural network, and without one, stacking a hundred layers would be mathematically identical to using a single layer. Modern transformers mostly use gated variants like SwiGLU, which Noam Shazeer showed outperform plain ReLU.

Beginner · fundamentals · neural-networks · transformers · relu · gelu · swiglu · architecture

Training data deduplication: why the same text twice makes a model worse

Deduplication is the process of finding and removing repeated or near-repeated documents from a training corpus, and it reliably makes language models better, cheaper, and safer - the same text seen many times gets memorised rather than learned from.

Intermediate · training-data · datasets · deduplication · memorization · privacy · fundamentals

Mixed-precision training: why models are trained in half-broken numbers on purpose

Modern models are trained using 16-bit and even 8-bit numbers instead of the 32-bit standard, roughly doubling speed and halving memory, by carefully keeping full precision exactly where the arithmetic would otherwise fall apart.

Intermediate · training · efficiency · precision · hardware · fundamentals

Distributed training: how one model gets split across thousands of chips

No single chip can hold a frontier model, so training is split across thousands of them in four distinct ways -- by data, by layer, by tensor, and by expert -- and choosing the right mix is what separates a cluster running at a third of its potential from one running at a tenth.

Intermediate · training · distributed · infrastructure · mixture-of-experts · fundamentals

Diffusion Distillation

Diffusion distillation trains a fast student model to reproduce in a handful of steps what a slow diffusion model does in dozens, cutting image and video generation from many neural-network passes down to one to four, which is what makes real-time generative rendering possible.

Intermediate · diffusion-models · efficiency · generative-ai · distillation

Linear Attention

Linear attention rewrites the transformer's attention math so its cost grows in a straight line with sequence length instead of exploding as the square, letting models handle very long inputs cheaply, at the price of a compressed memory of the past.

Intermediate · attention · efficiency · long-context · architectures

Model extraction attacks: stealing an AI through its own API

A model extraction attack tries to copy a machine-learning model you can only query, not download, by sending it many inputs and learning from its outputs. Depending on the goal, an attacker can clone the model's behavior, recover pieces of its internals, or reconstruct a rival model cheaply, which is exactly the fear driving today's AI 'distillation' disputes.

Intermediate · security · distillation · ai-security · open-weight-models · privacy

Looped transformers: reusing the same layers to think deeper

A looped transformer runs its input through the same stack of layers more than once, so it gets the processing depth of a deep network while storing the weights of a shallow one. It trades extra compute for a smaller memory footprint, and it is the trick behind small models that punch above their parameter count.

Intermediate · architecture · transformers · efficiency · weight-tying · open-weight-models

RNNs and LSTMs: How Neural Networks Learned to Remember, Before Transformers

Recurrent neural networks process sequences one step at a time while carrying a memory, and LSTMs added gates to fix their forgetfulness; together they powered a decade of sequence modeling and set up exactly the problem transformers later solved.

Intermediate · fundamentals · sequence-models · architectures · history

Softmax and Cross-Entropy: How a Model Turns Scores Into a Confident Guess

Softmax turns a model's raw scores into a probability distribution, and cross-entropy measures how far that distribution is from the true answer; together they are the training target behind almost every classifier and language model.

Beginner · fundamentals · training · loss-functions · classification

Multi-Token Prediction: Teaching Models to Look Several Words Ahead

Multi-token prediction trains a language model to predict several upcoming tokens at once instead of just the next one, giving a richer training signal and a built-in path to faster generation.

Intermediate · multi-token-prediction · training · inference-efficiency · speculative-decoding · transformers · open-weight

Sycophancy: Why AI Agrees With You Too Much

Sycophancy is an AI model's trained tendency to tell you what you want to hear -- agreeing with your view and backing off correct answers under pushback -- because human-feedback training rewards agreement over truth.

Intermediate · sycophancy · rlhf · ai-safety · alignment · reward-modeling · chatbots

Chain-of-Thought Faithfulness

Chain-of-thought faithfulness is the question of whether a model's written-out reasoning actually reflects the process that produced its answer, or is just a plausible-sounding story told after the fact. It matters because AI safety increasingly relies on reading a model's reasoning to catch bad behavior - which only works if the reasoning is honest.

Intermediate · interpretability · safety · chain-of-thought · reasoning · monitorability

Reinforcement Learning with Verifiable Rewards (RLVR)

RLVR trains a language model by rewarding answers that an automatic checker can confirm are correct - a passing unit test, a right final number, a valid proof - instead of using human ratings or a learned reward model. It is the training recipe behind the modern wave of reasoning models.

Intermediate · reinforcement-learning · rl-post-training · rlvr · reasoning · training

Markov Decision Processes: The Math Behind How AI Learns to Act

A Markov Decision Process is the mathematical framework that formalizes sequential decision-making -- states, actions, rewards, and transitions -- and it is the foundation on which nearly all reinforcement learning, from game-playing AI to robot control, is built.

Intermediate · reinforcement-learning · mdp · pomdp · decision-making · fundamentals

Adversarial Examples: Fooling AI With Changes You Can't See

Adversarial examples are inputs deliberately perturbed by tiny, often invisible amounts that cause an AI model to make confident mistakes, revealing that neural networks rely on fragile patterns rather than robust understanding.

Intermediate · adversarial-examples · robustness · security · safety · fundamentals

Regularization: why deliberately handicapping a model makes it better

Regularization is the family of techniques that make a model perform worse on its training data in order to make it perform better on data it has never seen, with dropout and weight decay the two that shaped modern deep learning.

Beginner · fundamentals · training · overfitting · dropout · weight-decay

Weak-to-Strong Generalization: how a worse teacher can train a better student

Weak-to-strong generalization is the finding that a strong model trained on a weaker model's flawed labels can substantially outperform its teacher, which is the only reason humans have any hope of supervising systems smarter than themselves.

Intermediate · alignment · distillation · supervision · generalization · superalignment

Layer normalization: the rescaling that keeps deep networks trainable

Layer normalization rescales the numbers flowing through each layer of a network to a consistent range, which stops signals from exploding or vanishing as they pass through dozens of layers -- and it is what makes training a transformer at all possible.

Intermediate · fundamentals · transformers · training · architecture · normalization

Perplexity: the number that tells you a model still works

Perplexity measures how surprised a language model is by real text, expressed as the number of words it was effectively choosing between at each step -- lower means less confused, and a jump from single digits into the thousands means the model is broken.

Beginner · fundamentals · evaluation · language-models · metrics · perplexity

Contrastive learning: teaching models by pulling likes together and pushing unlikes apart

Contrastive learning is a self-supervised training method that learns useful representations without labels by pulling matching pairs closer together in an embedding space and pushing mismatched pairs apart - the technique behind SimCLR and CLIP, and the classic alternative to generation-based approaches for teaching a model to perceive.

Intermediate · self-supervised-learning · representation-learning · embeddings · clip · computer-vision

FlashAttention: making attention fast by respecting the memory hierarchy

FlashAttention is an exact attention algorithm that runs much faster and uses far less memory by tiling the computation to keep it in the GPU's fast on-chip memory - never writing the giant attention matrix to slow memory - which is why it became the default attention kernel in modern transformers.

Intermediate · attention · transformers · gpu · efficiency · systems

The Logit Lens: Reading a Model's Guesses Before It Finishes Thinking

The logit lens is an interpretability technique that decodes a language model's partial, mid-computation representations into vocabulary words, letting researchers watch the model's best guess evolve layer by layer before it produces a final answer.

Intermediate · interpretability · logit-lens · transformers · mechanistic-interpretability

Prompt Caching: Why AI Agents Pay Once to Read, Then Read for Pennies

Prompt caching lets an AI provider store the processed form of a repeated chunk of text -- like a long system prompt -- so it can be reused across requests at a fraction of the cost, instead of being re-processed every time.

Beginner · prompt-caching · kv-cache · inference · cost · agents

How AI Turns Speech Into Text

Automatic speech recognition (ASR) converts spoken audio into written text by breaking sound into tiny slices, encoding them into features a model understands, and decoding those into words -- and its accuracy is measured by word error rate, the fraction of words it gets wrong.

Beginner · speech-recognition · asr · audio · multimodal · word-error-rate

State Space Models and Mamba

State space models are a transformer alternative that processes a sequence by carrying a fixed-size running summary forward one step at a time, giving them linear cost with length and constant memory per token -- which is why models like Mamba can handle very long inputs cheaply.

Intermediate · state-space-models · mamba · architecture · long-context · efficiency

Proof assistants: why a machine-checked proof beats a convincing one

A proof assistant is software like Lean or Coq that checks a mathematical proof step by step against strict logical rules, so a proof is accepted only if the machine confirms every inference -- which is exactly why the field demands them when an AI claims to have proved a theorem.

Intermediate · formal-verification · reasoning · math · ai-safety · evaluation

Diffusion models: how AI turns noise into images and video

Diffusion models generate images and video by starting from pure random noise and removing it step by step until a coherent picture emerges -- the technique behind Stable Diffusion, Sora, and interactive video systems like Vidu S1.

Beginner · diffusion · image-generation · video-generation · generative-models · fundamentals

Time Horizons: Measuring AI by How Long a Task It Can Finish

A time horizon is a way to measure an AI's capability not by a test score but by the length of real-world task it can complete reliably: the '50% time horizon' is the task duration (measured by how long a human takes) at which the model succeeds about half the time.

Intermediate · evaluation · benchmarks · agents · AI-safety · METR

Tool Use and Function Calling: How LLMs Act on the World

Tool use, also called function calling, is how a language model stops being a text box and starts doing things: it emits a structured request to call an external function, your code runs it, and the result is fed back so the model can continue reasoning.

Beginner · tool-use · function-calling · agents · fundamentals

Residual Connections: The Shortcut That Made Deep Networks Possible

A residual connection is a shortcut that adds a layer's input directly to its output, so the layer only has to learn the change rather than rebuild everything from scratch — a simple trick that lets networks be hundreds of layers deep without collapsing, and the reason modern transformers can be stacked as deep as they are.

Intermediate · residual-connections · deep-learning · transformers · training · architecture

Sim-to-Real Transfer: Teaching Robots in a Dream

Sim-to-real transfer is the practice of training a robot's brain entirely in a fast, cheap computer simulation and then deploying it on real hardware, using tricks like domain randomization to survive the gap between the virtual world and the messy physical one.

Intermediate · sim-to-real · robotics · reinforcement-learning · domain-randomization · embodied-ai

Machine unlearning: how to make an AI forget

Machine unlearning is the problem of removing specific knowledge - a person's data, a copyrighted book, a dangerous capability - from a trained model without retraining it from scratch and without damaging everything else it knows.

Intermediate · machine-unlearning · concept-erasure · privacy · safety · copyright

Optimizers: how Adam and AdamW turn gradients into learning

An optimizer is the rule that decides how a neural network changes its weights after each mistake; Adam and its refinement AdamW became the default because they adapt the step size for every weight, making training faster and far less finicky than plain gradient descent.

Intermediate · optimizers · training · adamw · adam · gradient-descent

Positional encoding: how transformers know word order

Positional encoding is how a transformer knows the order of words, since its attention mechanism sees the input as an unordered set. Modern models use rotary position embeddings (RoPE), which encode a token's position by rotating its vector by an angle proportional to where it sits in the sequence.

Intermediate · transformers · positional-encoding · rope · attention · architecture

Group Relative Policy Optimization (GRPO)

GRPO is the reinforcement learning method behind most modern reasoning models: instead of training a separate 'critic' network to judge answers, it samples a whole group of answers to each question and scores each one by how it compares to the group's average.

Intermediate · reinforcement-learning · rl-post-training · grpo · reasoning · training

Grokking: When a Model Suddenly 'Gets It' Long After It Should Have

Grokking is a training phenomenon where a neural network first memorizes its training data with near-zero understanding, then -- after a long, flat plateau of continued training -- abruptly generalizes and starts solving unseen examples correctly.

Intermediate · training · generalization · interpretability · deep-learning · grokking

Reward Hacking: When AI Games the Metric Instead of Doing the Job

Reward hacking is when an AI scores well on the objective you measured while defeating the outcome you actually wanted -- like a coding agent that passes every test by faking the result rather than building the product.

Intermediate · safety · alignment · reinforcement-learning · evaluation · reward-hacking

Constrained Decoding: Forcing an AI to Stay Inside the Lines

Constrained decoding forces a language model's output to follow a fixed structure, such as valid JSON or a specific schema, by blocking any next word that would break the rules as the text is generated.

Intermediate · constrained decoding · structured output · JSON mode · tool use · grammars

Test-Time Compute: Spending More Thinking at the Moment You Ask

Test-time compute is the idea of making an AI smarter not by retraining it, but by letting it do more work the moment you ask a question: think longer, or generate many answers and pick one.

Intermediate · test-time compute · reasoning · sampling · inference · self-consistency

GANs: the two-network duel that taught AI to imagine

A generative adversarial network trains two neural networks against each other -- a forger trying to create fake data and a detective trying to spot it -- until the forger's output becomes indistinguishable from the real thing, the breakthrough that first made AI image generation convincing.

Beginner · gans · image-generation · generative-models · deep-learning · fundamentals

Flow matching: how AI learns to turn noise into a picture

Flow matching teaches an AI to generate images by learning a smooth flow that carries random noise, step by step, into a realistic picture -- a cleaner, faster successor to diffusion that powers modern image models like FLUX.

Intermediate · flow-matching · diffusion · image-generation · generative-models · fundamentals

What Are Vision-Language-Action Models?

A vision-language-action (VLA) model is a single neural network that takes in camera images and a plain-language instruction and outputs the actual motor commands to carry it out, letting one model both understand a scene and physically act on it.

Intermediate · robotics · multimodal · vision-language-action · embodied-ai · foundation-models

What Is Gradient Descent?

Gradient descent is the optimization method that trains almost every modern neural network: it repeatedly nudges the model's parameters a small step in the direction that most reduces its error, until the error stops falling.

Beginner · fundamentals · training · optimization · gradient-descent

On-Policy vs Off-Policy Learning

On-policy learning trains a model on data generated by its own current behavior, while off-policy learning trains it on data generated by something else -- an old version, a different policy, or a fixed dataset -- and the choice shapes how stable, sample-efficient, and reliable the training is.

Intermediate · reinforcement-learning · rl-post-training · distillation · on-policy · training

Sparse Attention

Sparse attention lets a transformer skip most of the pairwise comparisons between tokens, so instead of every token attending to every other token, each one attends to a chosen subset -- which is what makes million-token context windows affordable.

Intermediate · attention · transformers · long-context · efficiency · sparse-attention

Fine-tuning and LoRA: teaching an old model a new job without retraining it

You almost never train an AI from scratch. You take one that already knows language and nudge it toward your specific task - and a trick called LoRA lets you do that by adding a tiny sticky note instead of rewriting the whole brain.

Intermediate · fine-tuning · LoRA · training · adaptation · efficiency

Temperature and top-p: how an AI actually picks its next word

A language model does not know its next word - it produces a list of odds and then rolls dice. The rules of that dice roll are why the same prompt gives you a boring answer one day and a wild one the next.

Beginner · sampling · temperature · decoding · fundamentals · inference

The KV cache: why AI gets slower and hungrier the longer it talks

The hidden notebook that lets a model avoid re-reading every previous word - and the single biggest reason long context is expensive.

Intermediate · kv-cache · attention · transformers · inference · efficiency · long-context

Backpropagation: how a neural network learns from its mistakes

The single algorithm behind nearly all AI training - assigning blame for an error backward through millions of dials, so each one knows which way to turn.

Beginner · backpropagation · training · neural-networks · gradient-descent · fundamentals

Retrieval-Augmented Generation: giving a model an open book

A language model only knows what it learned in training, and it cannot cite sources. RAG fixes both by letting the model look things up in a real document store at answer time, then write its answer from what it found.

Beginner · rag · retrieval · embeddings · hallucination · search · fundamentals

Embeddings: how AI turns words into directions in space

Before a model can reason about a word, an image, or a paragraph, it has to turn it into a list of numbers -- a vector. Embeddings are how meaning gets encoded as position in space, so that closeness becomes similarity.

Beginner · embeddings · fundamentals · nlp · vectors · semantics

Speculative Decoding: How AI Types Faster Without Changing a Word

A small, fast model guesses the next few words and a big, slow model checks them all in one pass - producing the exact same output, just quicker. The trick behind a lot of modern AI speedups.

Intermediate · inference · efficiency · speculative-decoding · transformers · fundamentals

Quantization: Shrinking AI Models to Run on Modest Hardware

Storing a model's numbers with less precision - 8, 4, or even fewer bits instead of 16 - makes it dramatically smaller and faster, often with almost no loss in quality. It's why big models can run on a laptop or a single GPU.

Intermediate · quantization · efficiency · inference · open-weight-models · fundamentals

How to run AI on free APIs (with 9router)

The big AI labs and a few hardware makers give away real model access for free, if you can juggle the rate limits. Here is how we run this whole site's research on zero dollars, and how you can too.

Intermediate · apis · tooling · free-tier · llm-routing · self-hosting · builders · how-to

Transformers: the engine inside almost every modern AI

The neural-network design behind GPT, Claude, and nearly every modern AI model, and the one idea, attention, that made it work.

Beginner · transformers · attention · architecture · deep-learning · fundamentals

Tokenization: how an AI chops your words into pieces it can read

A language model never sees letters or words. It sees tokens, chunks of text turned into numbers. How that chopping works quietly shapes cost, context limits, multilingual fairness, and why models stumble on spelling and arithmetic.

Beginner · tokenization · embeddings · transformers · context-windows · fundamentals

Chain-of-thought: why making an AI think out loud makes it smarter

Asking a model to work through a problem step by step, instead of blurting an answer, dramatically improves it on hard tasks. Here is why that simple trick works, what it really buys the model, and where it backfires.

Beginner · reasoning · chain-of-thought · prompting · rl-post-training · inference

Training vs inference: the two very different jobs inside every AI

Why building an AI model and using it are separate worlds with separate costs, and why that split explains custom chips, model prices, and where the real money in AI actually goes.

Beginner · hardware · inference · training · infrastructure · economics

Prompt injection: the con that hijacks AI agents

Prompt injection is when hidden instructions in the content an AI reads trick it into ignoring its real orders, the core security problem of any AI that browses, reads email, or uses a computer.

Beginner · prompt-injection · security · agents · safety · fundamentals

Distillation: how a small AI learns from a big one

Distillation trains a smaller, cheaper model to imitate a larger, smarter one, the idea behind both efficient deployment and the 'copying' accusations now driving AI geopolitics.

Beginner · distillation · training · open-weights · efficiency · fundamentals

Agent memory: how an AI remembers you after the conversation ends

Why most AI assistants have amnesia, the difference between short-term context and real long-term memory, and why remembering you is both what makes agents useful and what makes them a privacy risk.

Beginner · agents · memory · privacy · context-windows · rag

Synthetic Data: When AI Makes Its Own Training Material

The internet is running out of fresh text to train on, so the most advanced models increasingly learn from data that other AI made or shaped. Here is how that works, why it helps, and how it can quietly poison a model.

Intermediate · synthetic-data · training-data · data-centric-ai · foundations · scaling

Mixture of Experts: The Committee Inside a Giant Model

Why the biggest AI models are not really one big brain but a large team of specialists, only a few of whom wake up for any given word -- the trick that lets a model be huge and fast at the same time.

Beginner · mixture-of-experts · architecture · efficiency · scaling · foundations

Recursive self-improvement: when AI starts building AI

The idea that an AI good enough at AI research could improve itself, and the improved version could improve itself again, faster each round. Here's what it actually means, why a major lab now says we're getting close, and why "close" is not the same as "here."

Intermediate · recursive-self-improvement · ai-safety · agents · scaling · frontier-models

AI Persuasion: When Machines Get Good at Changing Your Mind

Why language models have quietly become powerful persuaders, how they do it, and why researchers treat 'superpersuasion' as a safety problem rather than a marketing feature.

Beginner · persuasion · safety · society · alignment · foundations

How AI Gets Benchmarked — and Why the Leaderboard Can Lie

Every 'this AI is now #1' headline rests on a benchmark. Here's how those tests actually work, why a top score doesn't always mean what you think, and how to read a leaderboard like a skeptic.

Beginner · benchmarks · evaluation · fundamentals · agents

Scaling laws — does bigger always mean better?

For years, AI progress ran on a simple recipe: make the model bigger, feed it more data, get a better model. That pattern is real and predictable — but it has limits and surprises. Here's what scaling laws actually say.

Beginner · scaling-laws · training · efficiency · architecture

Open vs. closed AI models — what "open weights" really means

Some AI models you can only rent through a company's interface; others you can download and run yourself. That difference — open weights vs. closed — shapes privacy, research, cost, and who controls the technology.

Beginner · open-source · models · industry · policy

What does it mean for AI to grade AI?

We increasingly use one AI model to evaluate another's answers — because human grading doesn't scale. Here's how 'AI as a judge' works, why it's everywhere, and the traps that make it unreliable.

Beginner · evaluation · llm-as-a-judge · benchmarks

Why does AI make things up?

Language models sometimes state false things with total confidence — a behavior called hallucination. It isn't a bug they'll simply patch out; it falls out of how they're built. Here's why it happens and how people fight it.

Beginner · hallucination · reliability · evaluation · safety

What is a context window?

A model's context window is how much text it can hold in mind at once — its working memory. Bigger is useful, but a long window isn't the same as a good memory. Here's how it works and where it breaks.

Beginner · context-window · architecture · long-context · memory

What makes an AI an "agent"?

An AI agent doesn't just answer questions — it takes actions: calling tools, running steps, and reacting to what it finds. Here's the loop at the core of every agent, and why agents fail in their own peculiar ways.

Beginner · agents · tool-use · reasoning · reliability

What are world models?

A world model is an AI system's internal understanding of how an environment works — not just what it sees right now, but what will happen after an action, and what would have happened differently. Central to planning, robotics, and the next generation of physical AI.

Intermediate · world-models · planning · robotics · video-generation · reinforcement-learning

Reward-based fine-tuning (RLHF and RLVR)

After a model is first trained, it gets "polished" by rewarding good answers. Here's what that phase is, why it works, and the failure mode where models get repetitive and dull.

Beginner · rl-post-training · rlhf · reasoning

Mechanistic interpretability & sparse autoencoders

What people mean by "reading a model's mind" — finding human-understandable features inside a neural network, the tools that do it, and where those tools fall short.

Beginner · interpretability · safety · sparse-autoencoders

What are diffusion language models?

Most AI writes one word at a time and can never go back. Diffusion language models start from noise and clarify it iteratively — and some versions can revise any word at any step. A growing alternative to the standard left-to-right approach.

Intermediate · language-models · diffusion · architecture · generation