CODExSIMS Systems, made visible

Models · inference · agents · evaluation

Understand the systems behind modern AI applications

From transformer internals to agent loops, retrieval, prompting and real-time inference. Follow a guided path from first principles to the behavior that matters in production.

Choose a path
Prompt and context pass through a tokenizer and model layers, augmented by retrieval and tool calls, producing a token stream that feeds an evaluation loop.
  1. 01 Model foundations0 of 11 complete Tokens · architecture · reasoning
  2. 02 Application systems0 of 9 complete Retrieval · agents · prompting
  3. 03 Production quality0 of 7 complete Inference · evaluation · safety

01 / Pick where to begin

Choose a learning path

27 guides across 3 paths

01 / Tokens · architecture · reasoning

Model foundations

0 of 11 runs complete
Recommended first guide ★

How does a large language model turn text into a response?

The full transformer architecture from tokenization through embeddings, self-attention, multi-head attention, transformer blocks and autoregressive generation.

8 stages · ~6 min
Recurrent Depth Lab

Why can the same Transformer layers do useful work on another pass?

Run a small rule, rewire its feedback, count the work and solve a new case. Learn the research mechanisms without assuming a disclosed GPT-6 architecture.

9 stages · ~5 min
Internal Reasoning Lab

Did the model use an idea it never wrote down?

Open the Jacobian lens and the mathematics of a concept swap, then follow the controlled experiments that test silent reasoning and its limits.

13 stages · ~8 min
Decision API Pass

Your coding agent wants to run a command you didn’t read. Who decides?

Follow one unread force push across a kitchen pass: tasters drop beans into cups you labelled, narrow questions share one call, confidence reads the spread, your code’s pegs rise with the damage, and you check that 0.9 means nine in ten before you swap the model.

8 stages · ~14 min
Million-Token Lab

How does DeepSeek-V4 fit a million-token context on the same hardware?

The architecture rewrites behind DeepSeek-V4: CSA plus HCA hybrid attention, doubly-stochastic hyper-connections, the Muon optimizer, MegaMoE wave-pipelined EP, and the stability tricks that kept a 1.6T-parameter MoE alive during training.

8 stages · ~6 min
V4 Co-Design Lab

How do DeepSeek-V4 architecture and training work together?

A source-backed tour of DeepSeek-V4 residual mixing, compressed attention, sparse expert training, stability systems and specialist distillation.

8 stages · ~6 min
Open Frontier Lab

How do Kimi K3 architecture, data, and training fit together?

A source-backed deep dive into Kimi K3 sparse routing, long-context attention, depth retrieval, data-disclosure boundaries, low-precision training and serving.

9 stages · ~7 min
Reasoning Science Lab

How does pretraining change what reinforcement learning can achieve?

A paper-backed tour of how pretraining loss and token exposure predict RL returns, how compute allocation shifts, and what RL changes inside easy and hard reasoning policies.

8 stages · ~6 min
Distillation Signal Lab

Why can self-distillation loss improve while reasoning gets worse?

A paper-backed causal tour of how a privileged-information teacher can target one solution path, ignore correctness, overspend loss on low-information tokens and flatten the student.

9 stages · ~6 min
Agentic Training Lab

How does reinforcement learning teach an LLM when and how to use tools?

How ARTIST interleaves reasoning with tool calls, scores complete outcomes, compares sampled trajectories and keeps environment tokens out of policy loss.

8 stages · ~5 min
Toolspace Navigation Lab

How can a 4B agent navigate hundreds of MCP tools without loading them all?

A paper-backed causal tour of how ATLAS learns selective tool context, programmatic orchestration and structured credit assignment for long MCP workflows.

9 stages · ~6 min

02 / Retrieval · agents · prompting

Application systems

0 of 9 runs complete
Recommended first guide

How does LangChain grow one model call into a real LLM app?

How one model call grows into prompts, memory, chains, evals and agents across the full LangChain course arc.

7 stages · ~5 min
Prompt Systems

How do OpenAI prompts become reliable production artifacts?

Why prompt order matters, how examples shape behavior, what structured outputs actually guarantee and the eval loop that hardens it all.

8 stages · ~6 min
LLM Application Lab

What turns one model call into a reliable LLM application?

A software engineering tour of context budgets, instruction authority, sampling, reasoning, streaming, schemas, tools, routing, retries and token cost.

9 stages · ~7 min
Agent Learning

How does a self-learning agent turn conversations into lasting capability?

How a fresh agent turns conversations into memory, skills and searchable episodes so the next session is smarter than the last.

8 stages · ~6 min
Agent Console

How does Claude Code route prompts, tools, hooks, and plugins?

How prompts, tools, hooks and plugins actually flow through Claude Code from the CLI entry point to the edges where MCP takes over.

8 stages · ~5 min
Infra Detective

How does Clanker Cloud turn one prompt into grounded cloud evidence?

How one prompt gets cleaned up, routed to the right backend, hydrated with credentials and fanned out into parallel evidence gathering.

8 stages · ~6 min
Gateway Garage

What is OpenClaw actually doing in local control mode?

What one local gateway actually does: normalizing channels, mapping sessions, running the agent loop and coordinating paired devices.

8 stages · ~6 min
Mission Loop

Why does an AI agent loop feel more structured than it looks?

Why an agent loop feels more structured than it looks: planning, tool calls, memory and guardrails working as one deliberate cycle.

7 stages · ~5 min
Code Lab

How do you wire Java, Claude and OpenSearch into a working agent?

A practical code walkthrough: Maven dependencies, system prompt, tool schemas, the agent for-loop, switch-case handler and a live end-to-end trace.

8 stages · ~7 min

03 / Inference · evaluation · safety

Production quality

0 of 7 runs complete
Recommended first guide

How do tokens stream from an LLM to your screen in real time?

What actually happens between stream:true and the first token on screen, including the SSE framing and backpressure nobody talks about.

8 stages · ~6 min
Evaluation Lab

How do you test an AI system that can answer differently on every run?

A practical evaluation system for probabilistic software, from golden datasets and regression tests through retrieval, grounding, tools, judges, humans, production signals and repeated model or prompt comparisons.

8 stages · ~6 min
Evaluation Containment Lab

How did an AI security evaluation escape its sandbox and reach production?

A source-backed reconstruction of how an OpenAI cyber evaluation escaped its test environment, reached Hugging Face production and changed containment practice.

8 stages · ~6 min
Classifier Metrics Lab

What is the difference between precision and recall?

Move a classification threshold over ten refund requests scored by a real kind of model, fill the confusion matrix, then find the cutoff that meets a precision and recall target and prove it like an exam answer.

7 stages · ~5 min
Judge Prompt Lab

How do you write a prompt that judges another agent?

A SQL agent counts every order twice and a chart agent draws it proudly. Hand a judge the right evidence, split “good” into checks, lay out its prompt, see how it differs from an agent prompt, and test it against people.

8 stages · ~6 min
Token Turbo

Why do LLM tokens come out one tiny step at a time?

Why tokens come out one at a time: the full path from prompt assembly through prefill, KV cache reuse and the autoregressive decode loop.

8 stages · ~6 min
GPU Serving Lab

How would you design the GPU platform behind a ChatGPT-scale service?

A public-mechanism design exercise spanning streaming contracts, workload tails, GPU memory, parallelism, KV admission, continuous batching, failure handling, autoscaling and useful-token cost.

31 stages · ~27 min
About this collection

An LLM application sits on top of several different systems. Tokens move through an architecture that produces probabilities, inference servers turn those probabilities into a streamed response and application code surrounds the model with context, tools, retries and evaluation. Treating all of that as one black box makes failures difficult to reason about. This collection separates the layers and shows how information moves across each boundary.

Begin with the large language model guide for the core path from tokenization to generation. From there you can inspect real-time streaming, retrieval-augmented generation, agent execution loops, prompt authority, model evaluation and the architecture choices behind specific frontier models. The visual guides distinguish confirmed mechanisms from uncertain or product-specific details. They are designed for engineers building AI features, reviewing an unfamiliar stack or trying to locate whether a problem belongs to the model, the runtime or the surrounding application.