Interactive Learning
Step-by-Step Simulators
Interactive simulators covering LLM internals, RAG, agents, cloud platforms, cost, and safety. Use ▶ Play to auto-advance, ↺ Reset to replay. Filter by category below to jump to a topic.
You're on the Free plan.
Unlock every simulator, plus cheat-sheets and certificates, with Pro.
RAG Pipeline
Retrieval-Augmented Generation grounds LLM responses in your own documents. Watch how a user query travels through embedding, vector search, context injection, and grounded generation — step by step.
User Query
Knowledge Base — 4 documents indexed
API Rate Limits Guide
The Claude API enforces per-minute and daily token limits per tier. Tier 1 allows 50 req/min and 50K TPM.
Authentication & API Keys
API keys are managed in the Anthropic Console under Settings → API Keys. Include the key in the x-api-key header.
Error Handling Reference
HTTP 429 Too Many Requests indicates you have exceeded your rate limit. Implement exponential backoff on 429s.
Pricing Overview
Pricing is calculated per input and output token. Claude 3.5 Sonnet: $3/MTok input, $15/MTok output.
The user submits a natural language question. The RAG pipeline begins — the query will be embedded and compared against the knowledge base.
MCP Call Flow
The Model Context Protocol standardises how hosts, clients, and servers communicate. Trace the full JSON-RPC lifecycle from TCP connection through tool discovery, tool call, execution, and final response.
MCP Call Flow is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
ReAct Agent Loop
ReAct agents interleave Thought (chain-of-thought reasoning) with Action (tool calls) and Observation (results) until they have enough information to produce a final answer. Watch the scratchpad grow as the agent loops.
Reason
internal Thought
+
Act
tool call
→
Observe
tool result
→
repeat…
or answer
Agent Scratchpad
Compare Claude and GPT-4 context windows — which is larger and by how much?
Current Phase
💬
Task Input
Loop Progress
Tools Available
🔍 web_search
🐍 code_interpreter
🧮 calculator
The user's question enters the agent. ReAct (Reason + Act) interleaves internal Thought steps with external Action + Observation cycles — grounding every answer in tool results rather than model memory.
Cloud Platform Comparison
Quick visual refresher for interviews — one agent-building scenario walked through all three major clouds side-by-side: Amazon Bedrock, Google Vertex AI, and Azure AI Foundry. Covers auth, model catalogs, agent primitives, tool formats, and RAG.
Cloud Platform Comparison is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Inside a Transformer
What actually happens when you send a prompt? Walk a concrete sentence through tokenisation, embedding, attention, feed-forward networks, the layer stack, logits, and sampling — with real-looking numbers at every step.
Input prompt
“The capital of France is”
24 characters · will become 5 tokens · expected next: " Paris"
Start with a plain-text prompt. Everything downstream operates on numbers derived from these characters.
LLM Families Compared
Four columns — Claude, GPT, Gemini, and Llama — stepped through architecture (dense vs MoE), tokenisers, attention variants (MHA/GQA/MLA), training recipes, context windows, and licensing.
LLM Families Compared is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Model Parameters Playground
Interactive — drag the sliders to see exactly how temperature, top_k, top_p, and the penalty knobs reshape the next-token probability distribution.
Model Parameters Playground is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Tool-Use Loop
Follow a single user question through the full loop — user → model → tool_use → tool result → final answer — with a live token budget sidebar showing why multi-step agents cost so much more than a single chat completion.
Tool-Use Loop is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Prompt Caching
Five requests, same 12k-token system prompt. Watch the cache miss → write → hit → TTL expiry → rewrite pattern play out, with a running bill that shows exactly when caching pays for itself.
Prompt Caching is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
RAG Chunking Strategies
Same document, same query, four chunking strategies: fixed-size, recursive, semantic, and hierarchical. See which chunks the retriever surfaces — and which strategy wins on this query.
RAG Chunking Strategies is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Cost Calculator
Pick a model tier, dial in your traffic, input/output sizes, and cache hit rate — get a live monthly bill with a cost-breakdown bar and "savings vs no-cache" delta.
Cost Calculator is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Prompt Injection — Attack & Defense
A KB document has been poisoned with an injection. Toggle defenses (delimiters, spotlighting, output validation, low-priv summariser) and see which combinations stop the agent from exfiltrating customer data.
Prompt Injection — Attack & Defense is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Multi-Agent Orchestration
An orchestrator fans out to Researcher, Outliner, Writer, and Editor subagents to produce a blog post. Watch the graph light up, messages stream in, and the token budget climb — then compare four orchestration patterns side-by-side at the end.
Multi-Agent Orchestration is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Agent Frameworks Compared
Step through the same customer support task in CrewAI, LangChain, and LangGraph side-by-side. See how each framework structures the agent, tools, and execution loop differently — then choose which one fits your thinking style.
Agent Frameworks Compared is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Prompt Engineering Patterns
Five prompt engineering patterns that reshape quality and cost: few-shot vs zero-shot, chain-of-thought reasoning, structured output, prompt caching, and complexity trade-offs. Compare their latency, accuracy, and cost side-by-side.
Prompt Engineering Patterns is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
RAG Patterns & Strategies
Four advanced RAG patterns: chunking strategies (fixed, recursive, semantic), retrieval methods (BM25, vector, hybrid, reranking), scaling laws (corpus size impact), and failure modes (hallucination, context mismatch, latency). Learn when each technique wins.
RAG Patterns & Strategies is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Multi-Agent Patterns
Four multi-agent design patterns: handoff strategies (Swarm vs LangGraph vs CrewAI), tool routing (manual vs classifier vs function-calling), communication protocols (direct, shared memory, blackboard, events), and failure modes with recovery strategies.
Multi-Agent Patterns is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.
Production Patterns
Three patterns engineers ship without and regret: Evals (LLM-as-judge, golden datasets, CI gates), Observability (OpenTelemetry traces with token + cost attribution), and Context Compaction (the new beta for keeping long-running agents alive past 1M tokens).
Production Patterns is part of Pro
Unlock all simulators — including advanced cost, safety, RAG, and multi-agent patterns — plus downloadable cheat-sheets and certificates.