1:1 mentoring with Big Tech AI engineers

Library

Explore AI Engineering Topics

121+ in-depth guides on LLM agents, RAG pipelines, MCP, system design, and interview prep. Free topics are fully accessible — preview topics show a sample before sign-up.

01

LLM & Agentic

55

Tokens, Context Windows & Sampling

Preview

What a language model actually does on every call: split text into tokens, predict one next token at a time, fit everything into a fixed context window, and pick each token by sampling — with interactive temperature and context-budget explorers.

LLM & Agentic→

How LLMs Are Built

Preview

Complete lifecycle of large language models from pre-training through fine-tuning, RLHF, and deployment — with architecture diagrams and production considerations.

LLM & Agentic→

How LLMs Call Tools

Preview

How LLMs use function calling and tool use — the mechanics behind tool-calling agents, from prompt engineering to structured output.

LLM & Agentic→

Prompt Engineering Foundations

Preview

Where an instruction belongs — tool description, system prompt, or user turn — why emphasis that worked on older models now causes over-triggering, and the prompt patterns that have expired.

LLM & Agentic→

Tool Surface Design

Preview

When an action deserves its own tool instead of bash, how to write a description that raises selection accuracy, and how to scale past a few dozen tools without destroying the prompt cache.

LLM & Agentic→

When to Fine-Tune: The Decision Framework

Preview

Should you fine-tune at all? A structured decision framework for prompt engineering vs RAG vs fine-tuning.

LLM & Agentic→

LoRA, QLoRA & PEFT Methods

Preview

How LoRA works inside transformer layers, QLoRA for memory-efficient training, and the full PEFT method comparison with code examples.

LLM & Agentic→

Knowledge Distillation: Large to Small

Preview

Train a small, fast model to mimic a large teacher — economics, pipeline, and quality filters for production distillation.

LLM & Agentic→

Fine-Tuning Data Preparation

Preview

Data volume guidelines, quality checklists, and the complete preparation pipeline for fine-tuning datasets.

LLM & Agentic→

Cost, Latency & Quality Tradeoffs

Preview

The economics of fine-tuning — quality/cost/latency triangle, real 2026 price points, break-even math, and the maintenance tax nobody budgets for.

LLM & Agentic→

Fine-Tuning Evaluation & Validation

Preview

How to evaluate fine-tuned models — metrics by task type, regression testing, and the complete evaluation pipeline.

LLM & Agentic→

Preference Optimization

Preview

RLHF, DPO and RLAIF explained by what each one removes: how preference pairs teach judgement that demonstrations cannot, and why reward hacking and length bias are predictable.

LLM & Agentic→

Inside a Tool Call

Preview

Step-by-step breakdown of an LLM tool call: request, schema validation, execution, and result handling with code examples.

LLM & Agentic→

Stateless vs Stateful

Preview

Stateless vs stateful LLM architectures: trade-offs for agent design, conversation management, and production deployment.

LLM & Agentic→

The Agent Loop

Free

Build a complete tool-calling AI agent in 15 lines of Python. Understand the core agent loop pattern that powers all LLM agents.

LLM & Agentic→

Agentic Spectrum

Preview

The spectrum of AI agent architectures from simple prompt-response to fully autonomous multi-agent systems, with trade-offs at each level.

LLM & Agentic→

ReAct Pattern

Free

ReAct (Reasoning + Acting) pattern for AI agents: how to combine chain-of-thought reasoning with tool use for better agent performance.

LLM & Agentic→

Reflexion

Preview

Reflexion pattern for self-improving AI agents: verbal reinforcement learning where agents turn failures into written lessons and retry — no gradients required.

LLM & Agentic→

Hierarchical Delegation

Preview

Hierarchical delegation pattern for multi-agent systems: orchestrating specialized agents with a coordinator for complex tasks.

LLM & Agentic→

Planner-Executor

Preview

Planner-Executor agent pattern: separating planning and execution phases for more reliable and debuggable AI agent workflows.

LLM & Agentic→

Human in the Loop: Approval Gates

Preview

Approval gates for autonomous agents — placing them by reversibility, the confirmation round trip and the deadlocks it hides, denials that redirect rather than stall, and what to do when no human is watching.

LLM & Agentic→

Agent Durability

Preview

Make a long agent run survive a crash: the window where a side effect lands before anything records it, idempotency keys that survive replay, and what to checkpoint.

LLM & Agentic→

Agent Memory: Layers & Types

Preview

Agent memory two ways: four layers by lifetime and scope (context window, session, long-term user, shared org) and three types by content (episodic, semantic, procedural), with one map between them.

LLM & Agentic→

Memory Implementation & Patterns

Preview

Production-ready memory code, episodic vs semantic vs procedural memory, and system design patterns.

LLM & Agentic→

Memory Decisions & Worked Examples

Preview

When to use which memory type, with three real-world scenarios: customer support, sales agent, and code assistant.

LLM & Agentic→

Memory Compliance & Interview Prep

Preview

GDPR and privacy compliance for agent memory, plus FDE interview scenarios and deep-dive questions.

LLM & Agentic→

Messages API

Preview

Claude Messages API deep dive: request/response format, system prompts, multi-turn conversations, and best practices.

LLM & Agentic→

Tool Use with Claude

Preview

Implement tool use with Claude API: define tools, handle tool calls, and build reliable function-calling agents.

LLM & Agentic→

Streaming with Claude

Preview

Stream Claude API responses for real-time UX: server-sent events, token-by-token rendering, and production streaming patterns.

LLM & Agentic→

Structured Output

Preview

Get structured JSON output from Claude: constrained generation, schema validation, and reliable data extraction patterns.

LLM & Agentic→

Prompt Caching

Preview

Cut Claude cost and latency by up to 90% with prompt caching: cache the stable prefix (system prompt, tools, documents, history), pay the write premium once, then read for a fraction of the input price (0.1x on most models, 0.05x on Opus 5.5 and Sonnet 5.5).

LLM & Agentic→

Adaptive Thinking & Effort

Preview

Let Claude reason before it answers: adaptive thinking, the five effort levels, why budget_tokens is gone, summarized vs omitted thinking blocks, and preserving them across tool calls.

LLM & Agentic→

Agent SDK Patterns

Preview

Production patterns for building AI agents with the Claude Agent SDK: the loop, subagents, permissions, context management, MCP, and hooks — plus when to use the SDK vs the raw API.

LLM & Agentic→

Who Owns the Loop

Preview

Manual loop vs the SDK Tool Runner vs Managed Agents vs the Claude Agent SDK — separated by who supplies the agent harness and who supplies the deployment.

LLM & Agentic→

Context Management

Preview

Context editing, compaction and memory as Claude API features: what each does to the conversation, and why the compaction block must be appended back verbatim.

LLM & Agentic→

Agent Cost Control

Preview

Control what an agent costs: effort levels, task budgets vs session budgets vs max_tokens, prompt-cache economics, model routing, and per-turn token accounting.

LLM & Agentic→

Computer & Browser Use

Preview

Let Claude drive a browser or desktop safely: the computer and browser use toolsets, batched actions run in order, screenshot token costs, element references, and the sandbox, allowlist and human gate that bound a fooled agent.

LLM & Agentic→

Agent Skills

Preview

Package know-how as Agent Skills: the SKILL.md format, progressive disclosure, writing a description that triggers, attaching Anthropic and custom skills to API requests, and auditing a skill before you trust it.

LLM & Agentic→

Sandboxing Agent Code

Preview

Run code an agent writes without trusting it: isolation levels from process sandboxes to gVisor and microVMs, a locked-down container, egress through a proxy, secrets kept outside, resource limits and managed sandbox defaults.

LLM & Agentic→

Metrics & Dashboards

Preview

Observability metrics for LLM applications: latency, token usage, cost tracking, and quality scoring dashboards.

LLM & Agentic→

The Eval Stack

Preview

Complete guide to LLM evaluation and observability: automated evals, human feedback loops, A/B testing, and monitoring.

LLM & Agentic→

Grading Agents

Preview

Evaluate AI agents in production: task completion metrics, trajectory analysis, and automated agent quality benchmarks.

LLM & Agentic→

Red-Teaming Agents

Preview

Attack your own agent before someone else does: threat-model what it reads, does and sends, build task-plus-injection cases judged by side effects, report attack success with intervals next to utility, and gate releases.

LLM & Agentic→

Your First Agent SDK Agent

Preview

Run a Claude Agent SDK agent in ten lines: query() vs ClaudeSDKClient, every message type the stream yields, and configuring model, budget and tool restrictions through ClaudeAgentOptions.

LLM & Agentic→

Custom Tools: @tool and SDK MCP Servers

Preview

Build custom Claude Agent SDK tools with @tool and create_sdk_mcp_server, get the mcp__server__tool naming right, and see four production tools — SQL, HTTP, filesystem, shell — with the guardrail each needs.

LLM & Agentic→

Permissions & Hooks: Gating the Agent

Preview

Gate a Claude agent: permission modes, disallowed_tools vs allowed_tools, deciding per call with can_use_tool, and using PreToolUse and PostToolUse hooks for audit logging and redaction.

LLM & Agentic→

Worked Example: Repo Review Agent

Preview

A complete Claude Agent SDK agent: a custom diff tool, a stripped tool surface, a per-call path gate, an audit hook, a reviewer subagent, and a budget cap — structurally unable to modify what it reviews.

LLM & Agentic→

Why a Graph? State, Nodes & Edges

Preview

Build a LangGraph agent from scratch: StateGraph, TypedDict state, the add_messages reducer, and the decision table for when a graph beats a plain while-loop.

LLM & Agentic→

Tools & Routing

Preview

Define LangGraph tools with @tool, wire ToolNode and tools_condition into an agent loop, use the prebuilt create_agent, and write custom routers that branch on your own state.

LLM & Agentic→

Checkpointers, Threads & Store

Preview

LangGraph persistence end to end: checkpointers and thread_id for resumable runs, get_state and time travel, PostgresSaver in production, and the Store for memory that outlives a thread.

LLM & Agentic→

interrupt(): Approval Gates

Preview

Pause a LangGraph run for human review with interrupt(), resume it with Command, and build one gate that supports approve, edit and reject without double-charging on re-run.

LLM & Agentic→

Subgraphs & the Supervisor

Preview

Multi-agent LangGraph: routing and updating state in one Command return, using a compiled graph as a node, and choosing between shared and isolated history for a worker.

LLM & Agentic→

Worked Example: Support Triage Agent

Preview

A complete runnable LangGraph agent in sixty lines: two tools, a router that knows which is dangerous, an approval gate on refunds, and a checkpointer so the pause survives a restart.

LLM & Agentic→

Productionising LangGraph

Preview

Deploy a LangGraph agent: API worker vs queue consumer vs scheduled job on one Postgres, stream modes per consumer, bounding steps and tokens, and testing routers without a model.

LLM & Agentic→

Other Agent Frameworks

Preview

Translate what you know into the OpenAI Agents SDK, Google ADK and CrewAI: how each stops its loop, hands off between agents, pauses for approval, survives a crash and reaches Claude, with the defaults that bite.

LLM & Agentic→
02

RAG & MCP

22

RAG Architecture

Preview

What RAG is and when to use it instead of a long prompt, the offline and online pipelines, what Claude receives as cited sources, and five numbered gates that locate the stage which lost a wrong answer.

RAG & MCP→

Document Processing

Preview

Turn files into clean, typed elements with provenance: choose a parser tier per file, keep tables as structure, clean without deleting content, dedupe without dropping new versions, and gate the output.

RAG & MCP→

Chunking Strategies

Preview

Choose what to cut on, size chunks in the embedder's own tokens, keep headings, tables and code whole, search small but return big, and measure any change with recall@k on real questions.

RAG & MCP→

Vector Indexes & Stores

Preview

How a vector index stores and searches embeddings: the index as a rebuildable copy, how HNSW finds neighbours and what ef_search changes, RAM arithmetic, and choosing a store from constraints.

RAG & MCP→

Embeddings

Preview

How a chunk becomes a vector: cosine, dot and L2, query and document prompts, vector size and how to shrink it, and how to shortlist and test a model on your own questions.

RAG & MCP→

Metadata & Filters

Preview

Design the metadata each chunk carries, put permissions and time in the store's query on every path, predict how many results a filter leaves, and let a model fill a schema without letting it set trusted fields.

RAG & MCP→

Feeds, Changes & Deletes

Preview

How documents reach the index and how it learns one changed or died: delivery channels, SFTP failure modes, a document identity that survives an update, tombstones, snapshot vs delta feeds, and a restart-safe batch loop.

RAG & MCP→

Retrieval & Reranking

Preview

Why production RAG runs dense and BM25 search side by side, how reciprocal rank fusion merges the lists, what a reranker can and cannot fix, and how to repair a query and follow one chunk through the funnel.

RAG & MCP→

RAG Evaluation

Preview

Build a golden set, compute recall@k, MRR and nDCG, decide whether a reranker earns its latency, score answers against their evidence, and read the scores together to name the gate that failed.

RAG & MCP→

RAGAS Framework

Preview

The four RAGAS metrics by hand and in code (0.4.3): what each compares, which need a reference, what a run costs, and what breaks on a fresh install today.

RAG & MCP→

RAG Monitoring

Preview

What to log, what to watch with no labels, how big a judged sample an alert needs, how to tell drift kinds apart, how to measure freshness and deletes, and how to send a bad answer to the gate that lost it.

RAG & MCP→

Advanced RAG Patterns

Preview

Every advanced pattern is one decision wrapped around a search call and one more model call to pay for it: search as a tool, what the router and grader papers trained, fallbacks, multi-hop, and choosing by failure.

RAG & MCP→

RAG Best Practices

Preview

A cost-ordered ladder of fixes that says what each rung forces you to redo, how to ship a query-time change and cut over an index you can roll back, launch gates written as tests, and the levers that cut latency and cost.

RAG & MCP→

MCP Overview

Free

What MCP standardises and what it does not: why a fixed plug turns apps x tools into apps + tools, how it sits beside function calling, REST, CLI plus Skills, A2A and RAG, when not to use it, the five dated revisions up to the stateless 2026-07-28 spec, and what it deprecated.

RAG & MCP→

MCP Architecture

Preview

Host, client and server as roles; tools, resources and prompts by who decides to use each; one tool call in real 2026-07-28 JSON; the two ways a call fails; and the change that defines the current spec: no handshake, so any instance can answer.

RAG & MCP→

Building MCP Servers

Preview

Build a CRM MCP server on the current SDKs (Python mcp 2.x, with a TypeScript twin): the smallest server, type hints as the tool schema, rejecting bad input, resources and prompts, running it under the Inspector, and testing it before a model does.

RAG & MCP→

MCP Transport

Preview

How MCP bytes move in 2026-07-28: stdio as a subprocess and two pipes, Streamable HTTP as one POST per request with routable headers, how a stream ends or breaks, recognising legacy peers and HTTP+SSE, and choosing and locking down a transport.

RAG & MCP→

MCP with Claude

Preview

Where the MCP client lives on each Claude surface decides what it can reach: Claude Code, Claude Desktop and claude.ai connectors, the Agent SDK, the Messages API MCP connector, private networks and tunnels, and how to check which spec revision each side speaks.

RAG & MCP→

MCP Discovery

Preview

How a host learns what servers offer and builds the one flat tool list a model reads: server/discover and tools/list, who reads each field, many servers and name collisions, ttlMs and list_changed, what annotations mean, and what to do when the menu is too big.

RAG & MCP→

MCP Security

Preview

What the model reads can carry instructions: why risk belongs to the whole session (the lethal trifecta), how tool poisoning and rug pulls work and what pinning does, why filters fail and the backend must bound the tool, and why every installed server is supply chain.

RAG & MCP→

MCP in Production

Preview

Run a stateless MCP server as a fleet: what replicas still share, limits, health and timeouts, why a lost stream means a repeated request, failing so the model can recover and you can see it, and changing a tool without breaking callers.

RAG & MCP→

MCP on GCP

Preview

Deploy an MCP server on Google Cloud: build or borrow, the Cloud Run IAM versus MCP OAuth collision on the Authorization header, what breaks at more than one instance, the clocks that end long tools, network paths for private systems, and what Google logs versus what you must.

RAG & MCP→
03

System Design

38

System Design 101

Free

The seven classic primitives on one request path, read as an LLM system: streamed answers, percentiles and their tails, the caches, the shared provider ceiling, and queues for slow work.

System Design→

AI System Design Vocabulary

Free

The working glossary as a routing hub: twenty terms defined with a number each, the rest routed to the course that owns them, arranged by where each term sits on a request path.

System Design→

Your First Agentic System

Free

One support bot built six times, each version added because an incident broke the one before, with the course's reference numbers worked out once: cost per question, limits and the whole system on one canvas.

System Design→

The Paradigm Shift

Free

What changes when the model picks its own path, the five classic parts that become agent parts, and the Google Cloud product that holds each one, with the failure rules that do not change.

System Design→

5-Phase Framework

Free

A repeatable opening for any agentic system-design round: restate the problem, ask until the next answer would not change the design, derive one number, walk one request down the six-layer spine, and harden one concern at a time.

System Design→

10-Layer Architecture

Preview

Ten layers of a production LLM platform in five tiers, each with the failure it absorbs and its share of a per-query budget derived from visible inputs; which layers ship first; and one gateway decision written with the number that reopens it.

System Design→

Scaling 10k to 1M

Preview

What the bill, the provider meters and the spend cap do as users grow from 10K to 1M, derived once from one canonical workload at the 2026-10-08 prices, with the bottleneck named at each 10x.

System Design→

Real-World Case Studies

Preview

Agent products read as five controls (route, gate, isolate, review, bound): two first-party cases, one illustrative failure priced at 2026-10-08 list prices, and the rule for citing a precedent without being caught out.

System Design→

Security Overview

Preview

A system-level threat model for an agent: draw the trust boundaries, run STRIDE on each crossing, name the 2026 OWASP risks, put each control on the boundary where it runs, and state what the provider keeps.

System Design→

Guardrails & Safety

Preview

Where guards sit on one request (input, each tool call, output and stream), what each may decide, how to budget and overlap their latency, how to count their false blocks before enforcing, and what to do when a guard is down.

System Design→

PII Detection

Preview

A PII gateway on the request path: what each detector catches and misses, checksums as the precision gate, redaction by purpose with the mapping treated as personal data, the order the gateway runs in, and the output scan.

System Design→

Prompt Injection Defense

Preview

Why injection works (instructions and data share one stream), the four ways it arrives, why text filters only lower the odds, and the architecture that bounds the damage: the Rule of Two, taint, planner and reader splits, and adaptive testing.

System Design→

Multi-Tenant Isolation

Preview

Choose the tenancy tier by sensitivity, derive the tenant from the verified token once, enforce it in layers below the code that could forget it, keep noisy neighbours from starving each other, and test for leaks before a customer does.

System Design→

Audit & Compliance

Preview

The audit record for an agent: what one step must record, why reconstruction beats replay, how a hash chain and a locked copy make tampering visible, how to keep records without keeping the person, what retention really requires, and what the log costs.

System Design→

Context Engineering

Preview

What may enter one request, from whom and for how long, and the budget each kind of request gets: sources and lifetimes, one cache-safe prefix, the four moves and the failures that come from context.

System Design→

Semantic Caching

Preview

When a cache may answer a rephrased question: the scope key that stops answers crossing users and tenants, the verifier that stops similar-but-wrong hits, freshness, and the break-even against the tier the hit replaces.

System Design→

Model Routing

Preview

Choosing a model tier per request: the tier table at current prices, the bill by mix, the operating point where a cheap wrong answer costs more than the price gap, the cascade's escalation break-even and the fail-over target.

System Design→

Rate Limiting & Cost

Preview

How an LLM gateway enforces three currencies (requests, tokens, dollars) with four limiter algorithms, reserve-then-settle accounting, a four-layer stack, a 429 contract a client can act on, and per-tenant ceilings.

System Design→

Inference Optimization

Preview

The single-GPU arithmetic of LLM serving: prefill and decode as two clocks, the memory-bandwidth ceiling, KV cache sizing, batching, quantization and speculative decoding, and how to match a lever to the bottleneck.

System Design→

Hallucination Detection

Preview

Catching fabricated facts, invented actions and off-brand promises in model output: the cheapest check for each kind, an online claim guard at current prices, and the precision, recall and sample design that show whether it works.

System Design→

Agent Failure Modes

Preview

The fifteen ways a production agent fails, the trace signature that names each, the detector and its blind spot, the per-run response, and the fix order by blast radius.

System Design→

Deployment & Rollout

Preview

How a running LLM system ships a model or prompt change with evidence: version manifests, mirroring and replay, canary sample arithmetic, failure-mode-first triggers, one-move rollback and the GPT-4o case.

System Design→

Event-Driven Async

Preview

How slow agent work leaves the request path: the timers that decide sync, stream or job, the 202 job contract, at-least-once queues with leases and dead-letter routing, backpressure in queue age, and delivery by poll, SSE or webhook.

System Design→

Data Flywheel

Preview

The system loop that turns production traces into eval cases, fixes and training data under a review budget, a consent and minimum-tenant gate, a frozen holdout and a release-gate sequence, with what hosted Claude can and cannot train stated.

System Design→

Deploy Your First Agent

Free

What a deploy of an agent ships, the nine steps in three phases, one running example (SupportBot v7) and the checklist that says each step is done; the six pages that teach the steps.

System Design→

Service and Container

Preview

Make a pod honest: readiness that means ready now, one trace id per request, a drain that waits for long runs with a derived grace period, and an image you can promote by digest.

System Design→

Config and Secrets

Preview

Keep model keys out of images, browsers and logs: validate at boot that a credential resolves, federate pods and CI instead of storing keys, and give each environment its own workspace and limits.

System Design→

Where It Runs

Preview

Which fields the platform really owns, which runtime shape fits an agent's run length, and why the front door's timeouts decide what a 75-second run can do.

System Design→

The Run Ledger

Preview

The four kinds of agent state, the three tables that make a run resumable, billable and auditable, and the exit condition that tells you when one store is no longer enough.

System Design→

Release Pipeline

Preview

Promote the digest you tested through four environments that differ in data and keys, not code, and let a statistic on a fixed suite, not a green build, decide whether a prompt, a tool or a model version ships.

System Design→

The First 24 Hours

Preview

What the pager cannot see on launch day, the three alarms that can see it, the provider limits you will meet on the first ramp, the one rollback lever to type in advance, and which cost binds at your mix.

System Design→

Agent Tech Stack

Preview

Ten components, one default and one trigger each: what to buy and what to own, the same parts with current cloud names, the model door, the gateway, the cost at three sizes and the one trace-sampling policy the other pages rely on.

System Design→

Multi-Agent in Production

Preview

Four ways to run several agents, the named forces that justify a separate deployment, and why the default is one process.

System Design→

Scaling the Agent Runtime

Preview

Autoscale on runs in flight, size slots with Little's law on the measured mean, keep connections out of model calls, and find the provider's walls.

System Design→

Day-2 Operations

Preview

Keep a deployed agent good: burn-rate SLOs at a low target, detection for failures that throw no error, runbooks made of levers, and retirement as a dated migration.

System Design→

Architecture Decision Records

Preview

Why an AI decision expires in weeks, the one field that reopens it (a trigger you can watch), an eight-field record, and one worked provider decision priced at 2026-10-08 list prices; the other two decisions shrink to one-line records that link their owners.

System Design→

Migrations & Rollouts

Preview

Four migrations that scare an AI team (provider swap, monolith to agent, model version, vector-store swap), each run as shadow, canary, ramp and rollback-ready, with the one difference from classic migrations: equivalence is an eval score on a golden set, not a byte diff.

System Design→

Org & Leadership

Preview

What changes at staff, the platform and product boundary as a RACI with one owner per row, paved paths over mandates, owning the bill (showback, forecast alerts, brakes), and an RFC that three teams can disagree with; incident command moved to its own section.

System Design→
04

Interview Prep

6

Full Access

Unlock All 149 Sections

Get full access to the complete guide including worked problems, interview scripts, checklists, and staff-level deep dives.

Unlock Premium