The Ancient Circuits
When machines first tried to think
The first artificial neuron. A single-layer network that could learn to classify simple patterns. It worked for AND and OR gates, but failed on XOR - a problem so basic it nearly killed the field. Marvin Minsky proved this limitation in 1969, and funding dried up. The first "AI Winter" began.
Read the deep dive on our blogKey Insight: A single neuron can learn, but it can't solve anything non-linear. You need layers.
The breakthrough that made deep networks possible. Instead of guessing how to adjust weights, backprop calculates exactly how much each weight contributed to the error, then adjusts proportionally. Like tracing a mistake back through a chain of decisions to find where things went wrong.
Read the deep dive on our blogKey Insight: Networks can learn from their mistakes - if you can trace the error back through every layer.
Context windows are the modern version of the same forgetting problem LSTMs tried to solve. When you configure memory buffers in Act 0, you're dealing with a challenge researchers fought for decades.
The GPU Awakening
Scale + GPUs = the deep learning revolution
A deep convolutional neural network trained on two NVIDIA GTX 580 GPUs destroyed the ImageNet competition by over 10 percentage points. This wasn't an incremental improvement - it was a paradigm shift. Everyone realized: deep learning works, and GPUs are the key. Funding flooded back. The "AI Spring" began.
Read the deep dive on our blogKey Insight: Scale + GPUs = breakthrough. This pattern repeats for the next decade. Every major advance comes from making things bigger and running them on faster hardware.
Mikolov proved that words could be represented as vectors where arithmetic works on meaning. The famous example: king - man + woman = queen. Words aren't just labels anymore - they have geometry. Similar meanings cluster together. This was the birth of embeddings, the foundation of every vector database and semantic search system.
Read the deep dive on our blogKey Insight: Meaning IS geometry. "King" and "Queen" are nearby in vector space because they share semantic properties. This single insight powers every RAG system in existence.
When you build embedding pipelines in the lab, you're using the direct descendant of Word2Vec. Every vector database stores the "geometry of meaning" that Mikolov discovered in 2013.
Attention Is All You Need
The paper that changed everything
Eight researchers at Google wrote a 15-page paper that would reshape the entire field. Their radical idea: throw away RNNs entirely. No recurrence, no convolutions. Build the entire model from attention layers stacked on attention layers. The result trained 10x faster than RNNs because everything runs in parallel - RNNs had to process tokens one by one, but transformers process ALL tokens simultaneously.
Read the deep dive on our blogKey Insight: Parallelism is everything. RNNs were sequential bottlenecks. Transformers unlock the full power of GPU hardware by processing all positions at once.
In RNN-era attention, the decoder looked at the encoder. In self-attention, every token in a sequence looks at every OTHER token in the same sequence. "The cat sat on the mat because it was tired" - self-attention learns that "it" refers to "cat" not "mat" by computing relevance scores between all word pairs. Each token asks: "Who else in this sentence matters to me?"
Read the deep dive on our blogKey Insight: Self-attention captures relationships between ALL words simultaneously. This is how LLMs understand context, resolve references, and grasp meaning.
Every LLM component in the lab is a transformer. When you configure temperature, top-p, and max_tokens, you're tuning a transformer's generation process. Token counting matters because transformers have fixed context windows. The entire lab exists because of this one paper.
The GPT Saga
From 117M parameters to 100M users
OpenAI made a bold bet: take a transformer decoder, pre-train it on a huge pile of books (unsupervised - just predict the next word), then fine-tune it for specific tasks. 117 million parameters. The key insight wasn't the architecture - it was the training recipe. Pre-train once on general text, then cheaply adapt to any task. One model, many uses.
Read the deep dive on our blogKey Insight: Pre-training on raw text learns general knowledge. Fine-tuning adapts it to specific tasks. This two-phase recipe became the foundation of modern AI.
Google's counter-move. While GPT reads left-to-right (decoder), BERT reads in BOTH directions (encoder). Training trick: randomly mask 15% of words and make the model predict them. "The [MASK] sat on the mat" - BERT learns that "cat" fits better than "car." BERT dominated NLP benchmarks for years. The encoder vs. decoder debate begins.
Read the deep dive on our blogKey Insight: Bidirectional understanding captures richer context than left-to-right generation. BERT excels at understanding; GPT excels at generating. This split still matters today.
Act 1 teaches the building blocks that GPT models gave us. Token counting (Level 1) matters because transformers have fixed context windows. Temperature (Level 4) works because of how transformer sampling evolved. Prompt engineering (Level 5) exists because GPT-3 proved in-context learning. Model selection (Level 9) is a decision because there IS a GPT family to choose from.
The RAG Revolution
Grounding AI in facts, not fiction
An LLM confidently generates plausible-sounding text that is completely false. Ask about a company's refund policy and it invents one. Ask for a legal citation and it fabricates case numbers. For consumer chatbots this is annoying; for enterprise applications (legal, medical, financial) it's a dealbreaker. The industry needed a way to ground LLMs in actual data.
Read the deep dive on our blogKey Insight: Hallucination isn't a bug to fix - it's a fundamental property of how LLMs work. They predict likely text, not true text. The only solution is to give them access to real information.
The paper that launched a thousand startups. The core idea: instead of relying on what the LLM memorized during training, retrieve relevant documents from a knowledge base and include them in the prompt. Step 1: User asks a question. Step 2: Retriever finds relevant documents. Step 3: Documents + question go to the LLM. Step 4: LLM generates an answer grounded in real data. Hallucination drops dramatically.
Read the deep dive on our blogKey Insight: RAG splits the problem: the retriever handles "what is true" and the generator handles "how to say it." This separation is the foundation of every enterprise AI system.
Act 2 IS the RAG revolution. Level 11 exists because RAG needs source documents. Level 13 exists because embedding search IS the retriever. Level 15 exists because first-pass retrieval isn't precise enough. Level 17 exists because hallucination was the original problem that spawned RAG. Now you know WHY each component was invented.
The Age of Agents
From text generators to autonomous workers
The paper that launched the agent era. Instead of just generating text, let the model THINK about what to do (reason), then DO it (act), then OBSERVE the result. Thought: "I need to find the weather in Tokyo." Action: search("Tokyo weather"). Observation: "72F, cloudy." Thought: "Now I can answer the user." This loop - think, act, observe, repeat - is the foundation of every AI agent.
Read the deep dive on our blogKey Insight: Interleaving reasoning with tool use makes LLMs dramatically more capable. An LLM that can use a calculator will never get arithmetic wrong. An LLM that can search will never hallucinate facts.
The API feature that made agents practical. Instead of parsing free-text "actions" from the model output, LLM providers added native function calling. You define tools as JSON schemas, the model generates structured function calls, your code executes them, and results go back to the model. OpenAI launched it in June 2023. Anthropic and Google followed. The model doesn't just write text anymore - it programs.
Read the deep dive on our blogKey Insight: Structured tool calling turned agents from research demos into production systems. The LLM becomes an orchestrator that decides WHICH tool to call and with WHAT arguments.
Act 3 is the agent revolution made hands-on. Level 21 exists because function calling was the unlock that made agents practical. Level 22 is the actual ReAct pattern from the paper. Level 25 reflects the multi-agent research frontier. Now you're not just building agents - you understand the research lineage behind every component.
The Production Gauntlet
From notebook to 10 million users
The biggest bottleneck in LLM serving was memory management. Each request needs its own KV-cache (key-value memory from attention), and different requests have different lengths. Traditional serving wasted 60-80% of GPU memory on fragmentation. vLLM borrowed an idea from operating systems: paging. Just like virtual memory maps non-contiguous physical pages to contiguous virtual addresses, PagedAttention maps KV-cache blocks flexibly. Result: 24x throughput improvement.
Read the deep dive on our blogKey Insight: The best AI infrastructure ideas often come from classical systems engineering. PagedAttention is literally virtual memory applied to attention. Operating systems knowledge transfers directly to LLM serving.
Static batching waits for all requests in a batch to finish before starting new ones. If one request generates 500 tokens and another generates 10, the short one waits for the long one. Continuous batching processes token-by-token across requests - when a short request finishes, a new request immediately takes its slot. Combined with vLLM, this made LLM serving practical at scale.
Read the deep dive on our blogKey Insight: Don't wait for the slowest request. Process token-by-token and swap in new requests as old ones complete. This is how production LLM APIs handle millions of concurrent users.
Acts 4-5 are the production gauntlet made hands-on. Level 31 exists because vLLM and PagedAttention made serving possible. Level 34 exists because LoRA made fine-tuning accessible. Level 37 exists because GPU costs are the #1 production concern. Every production component maps to a specific breakthrough in this chapter.
The Full Picture
How every chapter connects to what you build in the lab.
You know the history. Now build the future.
Every breakthrough you just read about is a component waiting for you in the GenAI Lab. Start building pipelines that stand on the shoulders of 67 years of research.
Discussion0
Join the Discussion
Sign in to leave comments, reply to others, or like insights.
No comments yet. Be the first to start the thread!
Enjoyed this content?
Your support keeps us creating free resources
We put a lot of hours into researching and writing these guides. If it helped you, consider buying us a coffee. Every bit goes toward keeping ScaleDojo's content free and growing.
One-time payment via Stripe. ScaleDojo account required.