# Vibe Engines > Free, interactive learning for AI and backend engineers — by Saurabh Singh, > a senior AI engineer building in the open. Full-length technical handbooks, > step-by-step system-design walkthroughs, and browser-based developer tools, > all free, all without sign-up. ## What this site is Vibe Engines is an open educational resource for software engineers, AI/LLM builders, and people preparing for senior and staff engineering interviews. Its three pillars are: - **Learning Paths** (18) — goal-oriented, ordered courses that thread content across formats (become an AI engineer, pass the system-design interview, crack the coding interview, …). The best starting point for a specific goal: /learn. - **Topics** (14) — cross-format hubs (RAG, LLM engineering, agents, AI evaluation, distributed systems, caching, algorithms, interview prep, …). Each hub aggregates every handbook, system design, challenge, lab and tool on that subject — the best entry point for following one subject across formats: /topics. - **Handbooks** (160) — full-length, interactive guides on agentic AI, LLM evals, RAG, system-design fundamentals, and language interview prep (Angular, Python). - **System Design Walkthroughs** (62) — each builds a real large-scale system (Uber, WhatsApp, a key-value store, a payment system, …) one concept at a time through an interactive diagram, foregrounding the trade-offs interviewers probe. - **AI System Design Walkthroughs** (61) — the same interactive treatment for AI/LLM architectures (conversational AI, RAG, agents, inference serving, vector databases, semantic search), foregrounding the trade-offs behind shipping LLM systems: /ai-system-design. - **Free Developer Tools** (54) — browser-based, no-signup visualizers and calculators (consistent-hashing ring, capacity estimator, quorum explorer, RAG chunking playground, LLM cost planner, and more). - **Algorithms, Played** (98) — classic algorithms taught as playable games: you drive the problem and lose on instinct, then meet the algorithm that solves it, with full theory, a worked trace and a quiz. - **Labs** (51) — AI and engineering concepts (gradient descent, …) taught as playable games: you drive the idea, fail on instinct, then meet the method that works, with full theory, a worked trace and a quiz. - **Coding Challenges** (68) — interview-style problems you solve in the browser in Python or TypeScript, spanning DSA and AI engineering (softmax, cosine similarity, top-k retrieval, token-F1), with hidden tests and instant feedback. Everything runs client-side and is free. Author: Saurabh Singh (Senior AI Engineer). Contact: singh71297@hotmail.com. Primary topics: agentic AI, LLM systems, RAG, AI evaluations, distributed systems, and system design. ## Key facts - 160 technical handbooks, 62 system-design walkthroughs, 61 AI system-design walkthroughs, 25 roadmap(s), 54 free tools, 98 algorithm game(s), 51 interactive lab(s), 68 coding challenge(s), 108 paper breakdown(s), 8 video course(s). - All content is free, self-contained, and requires no account. - Canonical handbook/roadmap/system-design pages live at /handbook/, /roadmap/, and /systemdesign/; AI system designs at /ai-system-design/; tools at /tools/; algorithm games at /algorithm/. - License: free to read and cite; AI training/index use permitted with attribution (linking back to the canonical URL). See /terms for full terms. ## Actions — do a task in the browser (no signup) Each free tool performs one concrete task. Map a user intent to the tool that does it, then send the user (or act) at the URL: - Watch keys rebalance on the hash ring as nodes come and go → https://vibeengines.com/tools/consistent-hashing - Back-of-the-envelope math for system design, with the reasoning shown → https://vibeengines.com/tools/capacity-estimator - Paste a document, pick a strategy, see the actual chunks and tokens → https://vibeengines.com/tools/rag-chunking - Model an agent’s context window and see where the tokens (and dollars) go → https://vibeengines.com/tools/context-cost-planner - Set N, R and W and instantly see your consistency–availability trade-off → https://vibeengines.com/tools/quorum-explorer - Compose services in series and parallel to find your real uptime → https://vibeengines.com/tools/availability-calculator - Design an eval rubric and generate the judge prompt for it → https://vibeengines.com/tools/llm-judge-builder - Build a function-calling tool definition visually, get valid JSON out → https://vibeengines.com/tools/tool-schema-designer - Paste your numbers and see p50, p90, p95 and p99 — the tail, not the average → https://vibeengines.com/tools/percentile-calculator - Enter your token usage and see the monthly bill across every major model → https://vibeengines.com/tools/model-pricing-comparator - Pick your item count and false-positive rate — get bits, memory and hash count → https://vibeengines.com/tools/bloom-filter-sizing - Fire requests at a rate limiter and watch tokens drain, refill and throttle → https://vibeengines.com/tools/token-bucket-simulator - See your prompt fill the context window — and where it overflows → https://vibeengines.com/tools/context-window-visualizer - Paste text, get tokens — plus what it costs and how much window it eats → https://vibeengines.com/tools/token-counter - Will that model fit on your GPU? Weights + KV cache + overhead, computed → https://vibeengines.com/tools/gpu-vram-calculator - What will that fine-tune actually cost? GPUs, hours, dollars — before you rent anything → https://vibeengines.com/tools/fine-tuning-cost-estimator - The memory that actually caps your concurrency — per token, per sequence, per batch → https://vibeengines.com/tools/kv-cache-calculator - Price your RAG index before you build it: embedding spend, vector storage, query costs → https://vibeengines.com/tools/embedding-cost-calculator - Where does the second go? Build the request waterfall and find the TTFT bottleneck → https://vibeengines.com/tools/latency-budget-builder - How fast are you spending the error budget — and when does the pager fire? → https://vibeengines.com/tools/slo-burn-calculator - Every model that matters, one sortable table — priced at YOUR input:output ratio → https://vibeengines.com/tools/model-comparison - How much compute, time and money to train a model of N params on D tokens → https://vibeengines.com/tools/training-compute-calculator - Concurrency = throughput × latency. Give any two, get the third → https://vibeengines.com/tools/littles-law-calculator - Model prompt-cache hit rate, the write premium, and your real $/request → https://vibeengines.com/tools/prompt-caching-calculator - Paste a JSON Web Token, read its header, claims and expiry — offline → https://vibeengines.com/tools/jwt-decoder - Type an IPv4 CIDR block, get the network, broadcast, range and host count → https://vibeengines.com/tools/cidr-calculator - Epoch ↔ human date, in seconds or milliseconds, UTC and local → https://vibeengines.com/tools/unix-time-converter - Generate v4 UUIDs and ULIDs in bulk — cryptographically random, in-browser → https://vibeengines.com/tools/uuid-ulid-generator - Write a pattern, paste text, see every match and capture group live → https://vibeengines.com/tools/regex-tester - Encode or decode Base64, Base64URL and percent-encoding — UTF-8 safe → https://vibeengines.com/tools/base64-url-tools - Click permissions to get the octal, or type octal to see the rwx → https://vibeengines.com/tools/chmod-calculator - See a password’s entropy in bits and how long it would take to crack → https://vibeengines.com/tools/password-entropy - Write a cron expression, read it in plain English, see the next run times → https://vibeengines.com/tools/cron-builder - Paste a one-line query, get readable, indented SQL → https://vibeengines.com/tools/sql-formatter - Paste CSV or TSV, get a clean, aligned Markdown table → https://vibeengines.com/tools/md-table-generator - Compare two blocks of text and see exactly what changed, line by line → https://vibeengines.com/tools/diff-checker - Enter two variants’ conversions and see if the difference is real → https://vibeengines.com/tools/ab-significance-calculator - Size a topic’s partitions from your throughput and consumer targets → https://vibeengines.com/tools/kafka-partition-calculator - Size a DB connection pool from QPS and latency — and check the DB’s limit → https://vibeengines.com/tools/connection-pool-sizer - Estimate how much disk a B-tree index will take before you create it → https://vibeengines.com/tools/db-index-size-estimator - Validate and pretty-print JSON — or diff two JSON documents by value → https://vibeengines.com/tools/json-format-diff - See what a cache buys you: latency saved and backend load removed → https://vibeengines.com/tools/cache-roi-calculator - Project how big your data gets — and when you’ll run out of disk → https://vibeengines.com/tools/storage-growth-forecaster - Turn a target rate and burst into concrete token-bucket parameters → https://vibeengines.com/tools/rate-limit-designer - See why an agent’s cost grows faster than its number of steps → https://vibeengines.com/tools/agent-loop-cost-estimator - How many shards you need from data size, QPS and per-shard limits → https://vibeengines.com/tools/sharding-planner - See what vector dimensions cost in memory before you pick them → https://vibeengines.com/tools/embedding-dim-tradeoff - The latency numbers every engineer should know — scaled to human time → https://vibeengines.com/tools/latency-numbers-interactive - Compare cloud GPU hourly rates and estimate a job’s compute cost → https://vibeengines.com/tools/gpu-rental-prices - Given an NPU’s TOPS and RAM, see which local models fit and how fast they prefill → https://vibeengines.com/tools/npu-model-fit-calculator - Project the METR doubling curve: when do agents reliably handle day- and week-long tasks? → https://vibeengines.com/tools/agent-time-horizon-explorer - Paste a SKILL.md and score it against a Claude-Skills quality rubric — before an agent has to use it → https://vibeengines.com/tools/skill-linter - What applies on 2 Aug 2026 vs later — mapped to the engineering artifacts you actually have to ship → https://vibeengines.com/tools/eu-ai-act-timeline - Indicative 2026 AI-engineering comp bands by role, level and company tier → https://vibeengines.com/tools/ai-salary-explorer Other interactive actions: solve a coding problem → /challenge · run an algorithm or lab step-by-step → /algorithm, /lab · walk a system design → /systemdesign, /ai-system-design · look up a term → /glossary. ## Learning Paths (start here) - [Become an AI Engineer](https://vibeengines.com/learn/ai-engineer): From prompting to retrieval to agents to evaluation and serving — the full arc of shipping LLM-powered features, threaded through handbooks, system designs, runnable challenges and tools. - [Ace the AI Engineer Interview](https://vibeengines.com/learn/ai-interview): The AI interview handbooks paired with the runnable challenges behind the questions — so you can explain softmax, embeddings and evals and then implement them on the spot. - [Ship an AI Product](https://vibeengines.com/learn/ai-startup): The build → ship → grow arc for a one-person AI startup: the on-site lessons for the engineering, woven together with open-source tools — Inkwell, VolfPack, PromptPlay — for prototyping, finding your first users, and marketing a launch without a team. - [Master LLM Evaluation](https://vibeengines.com/learn/llm-evals): Shipping an LLM feature is easy; knowing whether it is good is the hard part. Build the vocabulary of evals, design a judge rubric, implement a metric by hand, then evaluate agents and a real production system. - [ML Engineering Foundations](https://vibeengines.com/learn/ml-foundations): The core math and primitives behind modern ML, made runnable: feel how models learn, implement the functions every model relies on, then assemble them into a recommender and a retrieval pipeline. - [Pass the System Design Interview](https://vibeengines.com/learn/system-design-interview): Build the vocabulary and the trade-off intuition first, practice the back-of-envelope numbers, then rehearse a dozen canonical designs from a URL shortener to a payment system. - [Level Up as a Backend Engineer](https://vibeengines.com/learn/backend-engineer): The distributed-systems fundamentals, then the systems that put them to work — a key-value store, a cache, a message queue, an ID generator — with tools to build the intuition. - [Reliability & Scale (SRE)](https://vibeengines.com/learn/reliability-sre): The reliability engineer’s toolkit: turn nines into real downtime, size capacity before it bites, then study the patterns — quorums, rate limiting, caching, queues — that absorb load and keep services alive under pressure. - [Crack the Coding Interview](https://vibeengines.com/learn/coding-interview): Follow the DSA roadmap, play the patterns as interactive games, then prove you can implement them by solving the matching challenges in your browser. - [Advanced Algorithms & Data Structures](https://vibeengines.com/learn/advanced-dsa): The specialized machinery behind real systems — range-query trees, string automata, network flow, and probabilistic sketches — each played as an interactive visualization, in a coherent order. - [Master Context Engineering](https://vibeengines.com/learn/context-engineer): The discipline that replaced prompt-tweaking, learned end to end: tokens and budgets, the four operations (write, select, compress, isolate), compaction and memory, cache-aware prompts — threaded through the handbook, labs, tools, papers and system designs. - [Become a Forward Deployed Engineer](https://vibeengines.com/learn/forward-deployed-engineer): The complete FDE track, in order: understand the role, learn to discover and scope, prototype fast, integrate with real systems, deploy in the customer’s world, demo, harden, and hand off — threaded through deep handbooks and hands-on Python/TypeScript challenges you actually solve. - [Build an LLM From Scratch](https://vibeengines.com/learn/llm-from-scratch): No black boxes. Start at raw bytes and end at an aligned assistant — tokenization, embeddings, attention, the full forward pass, the training loss, and RLHF — each idea paired with a runnable challenge or lab that makes you build the piece by hand. - [System Design in 30 Days](https://vibeengines.com/learn/system-design-in-30-days): A structured month through the canonical system designs — from a URL shortener to Uber — each built on the fundamentals it needs: capacity math, caching, partitioning, consistency. Design the system, then implement the primitive underneath it. - [The 4-Week Interview Sprint](https://vibeengines.com/learn/4-week-interview-sprint): A dense, ordered sprint: week one drills the coding patterns, week two the harder graph and DP problems, week three switches to system design, and week four handles the behavioral round, resume and offer. Every coding step is runnable. - [Distributed Systems Deep Dive](https://vibeengines.com/learn/distributed-systems-deep-dive): The hard core of distributed systems, threaded from the CAP theorem through Raft, quorums, vector clocks and CRDTs to real designs. Each protocol is paired with a simulator to drive it and a challenge to implement one step of it yourself. - [The Papers Bootcamp](https://vibeengines.com/learn/papers-bootcamp): The papers that built modern AI, sequenced so each one earns the next — from word2vec and the Transformer through scaling laws, RLHF, chain-of-thought, RAG, LoRA and MoE, out to vision and diffusion. Every entry is a plain-English breakdown, not the raw PDF. - [AI for Product Managers](https://vibeengines.com/learn/ai-for-pms): A concept-first path for product managers: the AI stack, the build decisions (RAG vs fine-tuning, big vs small model), the cost and quality levers, and the risk surface — paired with interactive calculators so you can pressure-test a plan in a meeting, not just nod along. ## Browse by Topic (cross-format hubs) - [RAG & Retrieval](https://vibeengines.com/topic/rag-retrieval): Retrieval-augmented generation end to end — chunking, embeddings, similarity search and ranking — across a system design, a hands-on tool, and runnable challenges. - [LLM Engineering](https://vibeengines.com/topic/llm-engineering): Building with large language models — prompting, decoding, inference serving and cost — from the handbooks down to the softmax that powers every token. - [AI Agents & Tools](https://vibeengines.com/topic/ai-agents): Agentic systems — tool calling, orchestration and the interfaces that let models act — with the agent system design, the agentic interview handbook, and a tool-schema designer. - [AI Evaluation](https://vibeengines.com/topic/ai-evaluation): How you know an AI system actually works — LLM-as-judge, agent evals, and metrics like token-F1 — the half of AI engineering that separates demos from production. - [ML Foundations](https://vibeengines.com/topic/ml-foundations): The math under the models — gradient descent, softmax, embeddings, similarity and ranking — taught as playable labs and runnable challenges. - [Distributed Systems](https://vibeengines.com/topic/distributed-systems): Consistency, consensus, replication and coordination — the CAP-theorem-shaped trade-offs at the heart of every large-scale system, with handbooks, system designs and interactive tools. - [Databases & Storage](https://vibeengines.com/topic/databases-storage): Storing data at scale — transactions, isolation, indexing, ledgers and sync — from the concurrency handbook to systems like Dropbox, a payment ledger and a key-value store. - [Caching & Performance](https://vibeengines.com/topic/caching-performance): Making systems fast — caching strategies, CDNs, rate limiting and low-latency design — with a capacity estimator and the systems that live or die on cache hit rates. - [Real-time & Messaging](https://vibeengines.com/topic/realtime-messaging): Pushing data the moment it changes — WebSockets, fan-out, streaming and message queues — across chat, feeds, notifications and collaborative editing. - [Algorithms & DSA](https://vibeengines.com/topic/algorithms-dsa): Data structures and algorithms taught as playable games and runnable challenges — graphs, sorting, search and dynamic programming, the half of every interview loop you can practice. - [AI for Professionals](https://vibeengines.com/topic/ai-for-professionals): AI for people whose job is not software — lawyers, doctors, engineers of the physical world. Workflow recipes, the safety rules that actually matter, and zero code. - [Interview Prep](https://vibeengines.com/topic/interview-prep): Everything pointed at the interview loop — AI and system-design handbooks, language Q&A, the DSA roadmap and runnable coding challenges in one place. - [Forward Deployed Engineering](https://vibeengines.com/topic/forward-deployed-engineering): The trending customer-facing engineering role: discover the problem on site, prototype fast, integrate with the customer’s systems, deploy in their environment, demo, harden, and hand off — everything for becoming a Forward Deployed Engineer. - [Developer Utilities](https://vibeengines.com/topic/developer-utilities): The fast, offline, no-sign-up utilities you reach for daily — decode a JWT, plan a subnet, convert an epoch, generate an ID. Everything runs in your browser; nothing is sent anywhere. ## Handbooks - [The Prompting Handbook](https://vibeengines.com/handbook/prompting-handbook): A friendly, hands-on field guide for everyday humans — learn the CRISP framework, spot bad prompts, practice with real recipes, play a drag-and-drop game, and test yourself with a quiz. No code required. - [The Agentic AI Interview Handbook](https://vibeengines.com/handbook/llm-interview): Twenty topics every senior AI engineer should be able to reason about live — from eval pipelines to reliability patterns for generative systems. - [The Senior AI Engineer Interview Handbook](https://vibeengines.com/handbook/senior-ai-engineer): 60 questions across architecture, production incidents, agentic systems, RAG, evals, cost, safety, and leadership — what staff-level AI interviewers actually probe for. - [50 Angular Interview Questions](https://vibeengines.com/handbook/angular-interview): A visual handbook covering components, change detection, RxJS, signals, routing, forms, performance, and testing — what interviewers actually probe for in senior Angular roles. - [50 Python Interview Questions](https://vibeengines.com/handbook/python-interview): Fundamentals to advanced: data structures, OOP, iterators & generators, the GIL, asyncio, memory, testing, and the standard library — a visual walk through everything a Python interview touches. - [51 LLM Evals Interview Questions](https://vibeengines.com/handbook/llm-evals-interview): Golden sets, LLM-as-judge, regression testing, offline vs online evals, RAG evals, agent evals, red-teaming, and observability — demystified for interviews and production. - [The Agent Evaluations Handbook](https://vibeengines.com/handbook/agent-evals): A self-contained handbook on evaluating AI agents — theory, interactive widgets, and practical guidance. Trajectory evals, tool-use scoring, LLM-as-judge, observability, and reliability for PMs, engineers, and founders. - [The System Design Fundamentals Handbook](https://vibeengines.com/handbook/system-design-fundamentals): The load-bearing ideas behind every distributed system — the CAP theorem and consistency models, concurrency and locking, partitioning and replication, and consensus and coordination — each tied to a real worked design you can study interactively. - [CAP Theorem & Consistency Models](https://vibeengines.com/handbook/cap-theorem): What a distributed system can promise when the network splits — CP vs AP, why "CA" is a myth, PACELC, and the full spectrum from linearizable to eventual consistency. Part of System Design Fundamentals. - [Concurrency, Locks & Isolation Levels](https://vibeengines.com/handbook/concurrency-and-locking): How overlapping operations stay correct — race conditions, optimistic vs pessimistic locking, the four isolation levels and their anomalies, MVCC, and distributed locks with fencing tokens. Part of System Design Fundamentals. - [Partitioning, Sharding & Replication](https://vibeengines.com/handbook/partitioning-and-replication): How one dataset becomes many — range vs hash partitioning, consistent hashing and virtual nodes, hot partitions, replication topologies, replication lag, and quorums. Part of System Design Fundamentals. - [Consensus, Transactions & Coordination](https://vibeengines.com/handbook/consensus-and-coordination): How nodes that can crash still agree on one truth — majority quorums, Raft and Paxos, leader election, two-phase commit vs the saga pattern, and idempotency for exactly-once effects. Part of System Design Fundamentals. - [The Agent Patterns Handbook](https://vibeengines.com/handbook/agent-patterns): The design patterns behind every LLM agent — the ReAct Thought–Action–Observation loop, tool/function calling, plan-and-execute, reflection, memory, multi-agent orchestration, and the failure modes (loops, hallucinated tools, recovery, human-in-the-loop) that break agents in production. - [The LLM Serving Handbook](https://vibeengines.com/handbook/llm-serving): How to serve large language models fast and cheap — prefill vs decode, the KV cache, continuous batching and PagedAttention (vLLM), quantization, speculative decoding, and the latency-vs-throughput tradeoffs that decide your inference bill. - [The Transformers Handbook](https://vibeengines.com/handbook/transformers): The architecture behind every LLM, built up from scratch — tokens and embeddings, positional encoding, self-attention (query/key/value), multi-head attention, the transformer block (FFN, residuals, layer norm), and how a decoder-only model generates text autoregressively. - [The RAG Handbook](https://vibeengines.com/handbook/rag): Retrieval-augmented generation end to end — why LLMs need it, chunking, embeddings and vector search, hybrid retrieval, two-stage reranking, grounded generation with citations, and how to evaluate a RAG system so a quietly-drifting index never fools you. - [The Fine-Tuning Handbook](https://vibeengines.com/handbook/fine-tuning): When to fine-tune vs RAG vs prompting, full fine-tuning vs parameter-efficient methods, how LoRA and QLoRA make it cheap enough for a single GPU, why the data matters more than the method, catastrophic forgetting, and how to evaluate and decide. - [The Vector Databases Handbook](https://vibeengines.com/handbook/vector-databases): How vector search actually works — why brute-force kNN doesn't scale, distance metrics, approximate nearest neighbor, the HNSW, IVF and product-quantization indexes and their recall/latency/memory tradeoffs, metadata filtering, updates, scaling, and when you need a dedicated vector DB vs pgvector. - [The Kafka Handbook](https://vibeengines.com/handbook/kafka): Apache Kafka as a distributed append-only log, not a queue — topics, partitions and offsets, producers, consumers and consumer groups, per-key ordering, replication and ISR, delivery semantics (at-least-once and exactly-once), retention vs log compaction, and when Kafka beats a message queue. - [The Redis Handbook](https://vibeengines.com/handbook/redis): Redis as an in-memory data-structure server, not just a cache — the core structures (strings, hashes, lists, sets, sorted sets), why single-threaded is fast, RDB vs AOF persistence, eviction and TTL, the classic patterns (cache, rate limiter, leaderboard, session, queue, pub/sub), high availability with replication, Sentinel and Cluster, and when it's the wrong tool. - [The SQL Handbook](https://vibeengines.com/handbook/sql): What the database does underneath your SELECT — the relational model and keys, joins (inner/left/right/full), indexes and B-trees, the query planner and reading EXPLAIN, transactions and ACID, isolation levels and the anomalies they prevent, normalization vs denormalization, and the pitfalls (N+1, missing indexes, SELECT *). - [The Kubernetes Handbook](https://vibeengines.com/handbook/kubernetes): The one idea under all the YAML — declare desired state, and a control loop makes reality match. Covers the orchestration problem, pods, deployments and replicasets, services and networking, the reconciliation loop and self-healing, the scheduler, config/secrets and health probes, autoscaling, and when you actually need Kubernetes. - [The Observability Handbook](https://vibeengines.com/handbook/observability): Seeing inside production — monitoring vs observability, the three pillars (metrics, logs, traces) and what each answers, structured logging, metric types and the cardinality trap, distributed tracing, the golden signals and SLIs/SLOs/error budgets, alerting on symptoms not causes, and correlating all three during an incident. - [The React Interview Handbook](https://vibeengines.com/handbook/react-interview): What senior React interviews actually probe — components and JSX, props vs state, the render cycle with the virtual DOM and reconciliation, hooks and the rules of hooks, why components re-render and when memoization helps (and hurts), keys and lists, controlled inputs, and context vs prop drilling. - [The Networking Handbook](https://vibeengines.com/handbook/networking): How a request actually travels — the layered model, IP addressing and routing, TCP vs UDP, the TCP handshake and head-of-line blocking, DNS resolution and caching, HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC), TLS/HTTPS, and why round-trip latency, not bandwidth, dominates. - [The Diffusion Models Handbook](https://vibeengines.com/handbook/diffusion-models): How AI images are really made — generation as iterative denoising, the forward noising and reverse denoising processes, the elegant noise-prediction training objective, sampling and the steps-vs-speed dial, conditioning and classifier-free guidance, latent diffusion (Stable Diffusion), and why diffusion beat GANs and VAEs. - [The Reinforcement Learning Handbook](https://vibeengines.com/handbook/reinforcement-learning): Learning to act by trial and error — the agent-environment loop, cumulative reward and discounting, exploration vs exploitation, value functions and Q-learning, policy gradient methods (REINFORCE/PPO), why RL is unstable and reward hacking happens, model-free vs model-based, and how RLHF turned LLMs into assistants. - [The Behavioral Interview Handbook](https://vibeengines.com/handbook/behavioral-interview): The round that decides your level — why behavioral interviews matter and what they signal, the STAR method with a worked example, building a flexible story bank, leadership and ownership, conflict, failure, ambiguity and prioritization, thoughtful questions to ask, and the red flags that sink good candidates. - [The Model Context Protocol (MCP) Handbook](https://vibeengines.com/handbook/mcp): The open standard connecting AI agents to the outside world — why M×N bespoke integrations collapse to M+N, the host/client/server roles over JSON-RPC, the three primitives (tools, resources, prompts), the connect→discover→call session lifecycle, when MCP earns its keep, and the security sharp edges (a server's output is untrusted input). - [The Loop Engineering Handbook](https://vibeengines.com/handbook/loop-engineering): Stop prompting your agents — design the system that prompts them for you. The inner vs outer loop, the four loop types (heartbeat, cron, hook, goal), the six building blocks (automations, worktrees, skills, MCP connectors, subagents, external memory), stopping conditions and the verification split, state across runs, cost engineering, and the six failure modes that burn tokens at 3am. - [The Context Engineering Handbook](https://vibeengines.com/handbook/context-engineering): The discipline that replaced prompt-tweaking: curating everything the model sees under a finite attention budget. The anatomy of a production context window, the three taxes on an overstuffed one (context rot, cost, behavioral drift), the four operations (write, select, compress, isolate), agent-specific patterns like compaction and just-in-time retrieval, six production habits, and where it sits in the prompt → context → loop → harness stack. - [The Agent Skills Handbook](https://vibeengines.com/handbook/agent-skills): Packaged, on-demand expertise for AI agents: what a skill folder actually is (SKILL.md + scripts + resources), progressive disclosure and why the system prompt couldn't do it, the skills vs tools vs MCP vs fine-tuning decision table, six habits of skills that actually trigger, and why third-party skills are supply-chain dependencies to review like code. - [The Agentic Coding Handbook](https://vibeengines.com/handbook/agentic-coding): Working with coding agents — Claude Code, Cursor and their cousins — without drowning in AI slop. The loop + tools + context anatomy, the CLAUDE.md instruction file (your highest-leverage artifact), the plan-then-verify workflow, skills/subagents/hooks, the vibe-coding review dial, the security sharp edges (injection, secrets, dangerous commands), and the team norms that keep quality from eroding. - [The On-Device AI Handbook](https://vibeengines.com/handbook/on-device-ai): Small models, everywhere: why 1–14B models got frontier-adjacent (distillation + textbook data), the napkin law of local inference (tokens/sec ≈ bandwidth ÷ bytes), quantization and the llama.cpp / GGUF / Ollama / MLX stack, the honest local-vs-cloud decision table, four hybrid patterns that ship, and the evals craft of choosing a small model that actually fits the device. - [The AI Security Handbook](https://vibeengines.com/handbook/ai-security): Your app now reads the internet and believes it. Why prompt injection is a design problem filters cannot solve, the lethal trifecta (private data + untrusted content + exfiltration), defense in depth from least privilege to output validation, where PII actually leaks (logs, embeddings, weights), MCP/model supply-chain trust, and the red-team eval suite that gates CI. - [The Git Internals Handbook](https://vibeengines.com/handbook/git-internals): Learn the model and the commands become obvious. Git as a content-addressed database: blobs, trees and commits; branches as 41-byte files; the three trees behind add/commit/reset; what merge and rebase mechanically do (and why rewriting shared history is a law, not a preference); the reflog recovery recipe; packfiles. - [The Docker Handbook](https://vibeengines.com/handbook/docker): A container is a lie told by the kernel — namespaces (what a process sees) plus cgroups (what it uses), not a VM. Image layers and the cache-ordering rule that halves build times, multi-stage Dockerfiles that ship small, volumes vs bind mounts, name-based networking, Compose, and the handoff to Kubernetes. - [The PostgreSQL Internals Handbook](https://vibeengines.com/handbook/postgres-internals): UPDATE never updates, and a janitor keeps it working. Heap pages and tuples, MVCC's row versions (xmin/xmax visibility arithmetic), VACUUM, bloat and the wraparound scare, B-trees, HOT updates and index-only scans, the WAL's three superpowers (recovery, replication, PITR), reading the planner honestly, and why PgBouncer is infrastructure. - [The GPU Fundamentals Handbook](https://vibeengines.com/handbook/gpu-fundamentals): The bottleneck is never where you think. SIMT and warps, the memory hierarchy from registers to HBM, arithmetic intensity and the roofline (compute-bound vs bandwidth-bound), where LLM workloads actually land, why FlashAttention was inevitable, the kernel stack from CUDA to Triton to torch.compile, and the multi-GPU interconnect story. - [The API Design Handbook](https://vibeengines.com/handbook/api-design): An API is a promise you keep for years. Choosing REST vs gRPC vs GraphQL honestly, resource-modeling REST so consumers can guess it, contract-first gRPC and protobuf evolution, the retry-safe semantics that survive real networks (idempotency keys, cursor pagination, structured errors), versioning without breaking clients, and why agent tool schemas are the newest API surface. - [The Distributed Training Handbook](https://vibeengines.com/handbook/distributed-training): When the model doesn't fit, split it four ways. What actually eats training memory, data parallelism and all-reduce, ZeRO/FSDP sharding stages, tensor parallelism inside a layer, pipeline parallelism across layers (and the bubble micro-batching hides), 3D parallelism, the communication-overlap that decides MFU, and the memory tricks (mixed precision, gradient accumulation, activation checkpointing) you reach for first. - [RAG vs Fine-Tuning](https://vibeengines.com/handbook/rag-vs-fine-tuning): The most common wrong turn in AI engineering — reaching for fine-tuning when you needed retrieval, or vice versa. The one distinction that decides it (knowledge vs behavior), a head-to-head table, when to use each, and why the strongest systems combine them: fine-tune for behavior, RAG for knowledge. - [Kafka vs RabbitMQ](https://vibeengines.com/handbook/kafka-vs-rabbitmq): They both "move messages", which is exactly why teams pick the wrong one. Kafka is a durable, replayable log where consumers track their own offset; RabbitMQ is a smart broker that routes each message and deletes it on ack. The remember-vs-forget core difference, throughput and ordering trade-offs, and how to choose. - [Redis vs Memcached](https://vibeengines.com/handbook/redis-vs-memcached): Both put data in RAM by a key, so they look interchangeable — but Memcached does one thing (a lean multithreaded cache) while Redis is a data-structure server with persistence, replication and pub/sub. The one-job-vs-many split, a feature table, and why most teams now default to Redis. - [SQL vs NoSQL](https://vibeengines.com/handbook/sql-vs-nosql): Framed as a war, it’s really a menu. Relational databases give you schema, joins and ACID; NoSQL is an umbrella of document/key-value/wide-column/graph stores that drop some of that for flexibility and horizontal scale. The relationships-vs-scale core difference, the CAP trade-off, and why to start relational. - [PostgreSQL vs MySQL](https://vibeengines.com/handbook/postgres-vs-mysql): Both are excellent free relational databases you can build a company on, so the choice is about character, not capability: Postgres prizes correctness, rich types and advanced features; MySQL prizes simplicity and read-heavy speed. The real differences, when each wins, and why Postgres became the modern default. - [gRPC vs REST](https://vibeengines.com/handbook/grpc-vs-rest): Both let services talk, and you often want both. REST over HTTP/JSON is universal, cacheable and debuggable — the right skin for public APIs; gRPC uses typed protobuf over HTTP/2 for fast, streaming service-to-service calls. The audience-decides rule, a trade-off table, and the REST-at-the-edge, gRPC-inside pattern. - [MCP vs Function Calling](https://vibeengines.com/handbook/mcp-vs-function-calling): Pitted against each other, but they live at different layers — like comparing USB-C to sending data. Function calling is the model capability to emit a structured tool request; MCP is the open standard for discovering and connecting to tool servers. How MCP uses function calling, and when each matters. - [50 System Design Interview Questions](https://vibeengines.com/handbook/system-design-interview): The questions that actually come up in senior and staff loops, each with a concise, defensible answer you can say out loud: scaling and estimation, load balancing, caching, databases and sharding, CAP and consistency, message queues, reliability, and the classic design scenarios like URL shorteners and news feeds. Mark what you master as you go. - [AI for Lawyers](https://vibeengines.com/handbook/ai-for-lawyers): The practical middle ground for legal professionals: where AI genuinely helps (first drafts, brief summaries, review triage), the three non-negotiable rules — confidentiality, verify every citation, you sign it you own it — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the five questions to ask any AI vendor. No coding required. - [AI for Doctors](https://vibeengines.com/handbook/ai-for-doctors): The practical middle ground for clinicians: where AI genuinely helps (notes from dictation, discharge instructions, prior auths, literature summaries), the three non-negotiable rules — PHI needs a BAA, verify everything clinical, the chart is yours — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the six questions to ask any clinical AI vendor. No coding required. - [AI for Civil Engineers](https://vibeengines.com/handbook/ai-for-civil-engineers): The practical middle ground for civil and structural engineers: where AI genuinely helps (observation reports, RFI responses, meeting minutes, plain-language explanations), the three non-negotiable rules — the adopted code is the authority, calculations get checked independently, your stamp is yours — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the vendor questions that matter. No coding required. - [The Embeddings Handbook](https://vibeengines.com/handbook/embeddings): Meaning as geometry: how text and images become vectors so that similar meaning lands nearby, why cosine similarity measures direction not length, how L2-normalization makes the dot product equal cosine (so vector databases just take dot products), the curse of dimensionality, and how it all powers semantic search and RAG — with worked math and runnable code. - [The AI Cost Engineering Handbook](https://vibeengines.com/handbook/ai-cost-engineering): AI spend is a sum over tokens: input-tokens × input-price + output-tokens × output-price, per million. Why output tokens dominate the bill (usually ~5× input), how prompt caching pays off from the very first reuse, and the full lever set — shorter outputs, caching, model routing, batching, context trimming — that cuts spend without cutting quality. With worked math and a runnable cost calculator. - [The Structured Outputs Handbook](https://vibeengines.com/handbook/structured-outputs): How LLMs return guaranteed-valid JSON for function calling and tool use. Why prompting for JSON is unreliable, how constrained decoding masks illegal tokens to −∞ so output is valid by construction (not by hope), the spectrum from JSON mode to full schema enforcement, and the trade-offs — including why "valid" is not "correct". With worked math and runnable code. - [The Model Routing Handbook](https://vibeengines.com/handbook/model-routing): Send each request to the cheapest model that can handle it. How a cheap-smart cascade works, why you pay the cheap model on everything so the escalation rate is the key lever, the break-even math (r* = 1 − c_cheap/c_big), predictive routers vs cascades, and the confidently-wrong pitfall. With worked math and a runnable cost model. - [The Agent Memory Handbook](https://vibeengines.com/handbook/agent-memory): A finite context window forces a memory strategy. Short-term (context) vs long-term (external store), how eviction (FIFO) and summarization (compression) keep a growing conversation in the token budget, and how retrieval recalls a fact long after it scrolled out of context — the memory-as-OS idea. With worked budget math and runnable code. - [The Guardrails Engineering Handbook](https://vibeengines.com/handbook/guardrails-engineering): The input and output filters that keep an LLM system safe. Why no single filter is enough, how layering independent guardrails drives the combined miss rate down multiplicatively (defense in depth: ∏ miss_i), why false positives compound the other way (1 − ∏(1−fp_i)), the independence caveat, and where to place each layer. With worked math and runnable code. - [The Synthetic Data Handbook](https://vibeengines.com/handbook/synthetic-data): Using LLMs to generate training and eval data. Why quality filtering beats raw volume (effective size = generated × pass rate), what model collapse is and why recursive training on unfiltered self-generated data shrinks diversity (Var_k = s^k · Var_0 → 0), and a safe generate-filter-mix pipeline. With worked math and runnable code. - [The Harness Engineering Handbook](https://vibeengines.com/handbook/harness-engineering): The loop that wraps a model into an autonomous agent — plan, act, observe — and why its most important property is bounds. A stuck agent with no hard stop loops forever, burning money, so the harness enforces max steps AND a cost budget. Geometric success math (P(done ≤ k) = 1 − (1−p)^k, E[steps] = 1/p) and a bounded loop you can run — with worked math and runnable code. - [The LLM Observability Handbook](https://vibeengines.com/handbook/llm-observability): Tracing an AI request as a tree of spans. Why total latency is the critical path — the max end time, not the sum of durations, because parallel spans overlap — while cost is the sum across every span, how to find the bottleneck span, and what to log for every LLM call (including percentiles over averages). With worked math and runnable code. - [The Prompt Caching Handbook](https://vibeengines.com/handbook/prompt-caching): How prompt caching actually works. Why caches key on the exact prefix and break at the first differing token, why cache-aware ordering (fixed content first, variable last) is the single biggest lever on hit rate, how TTL and cache breakpoints work, and the invisible mistakes (a timestamp up top, non-deterministic serialization) that silently kill caching. With worked math and runnable code. - [The Evals in CI Handbook](https://vibeengines.com/handbook/evals-in-ci): Turn LLM quality into a regression gate, like unit tests for code. A golden set scored on every change, and why the gate needs both an aggregate threshold AND per-case no-regression — because a healthy average can hide a broken case (mean stays up while one case collapses). How to wire it into the PR pipeline, handle non-determinism with a tolerance band, and avoid a flaky gate. With worked math and runnable code. - [The Sandboxing Handbook](https://vibeengines.com/handbook/sandboxing): Safely running untrusted or agent-generated code. Why deny-by-default beats a block-list (you can't enumerate all evil, so enumerate the little good), how least-privilege allowlists shrink the escape surface, why resource caps are needed on top of policy, and the layers of isolation from seccomp to microVMs. With worked policy math and runnable code. - [The Local LLM Stack Handbook](https://vibeengines.com/handbook/local-llm-stack): Running LLMs locally with ollama and llama.cpp. The one equation that decides what fits — weight memory = params × bits per weight ÷ 8 — how quantization shrinks a 7B model from 14GB (fp16) to 3.5GB (4-bit) to fit a consumer GPU, why 4-bit is the sweet spot, and the local stack (GGUF, ollama, llama.cpp). With worked memory math and a runnable fits-in-VRAM calculator. - [The PII in LLM Pipelines Handbook](https://vibeengines.com/handbook/pii-in-llm-pipelines): Handling personal data safely with the redact-before-send pattern: detect PII, replace each value with a stable placeholder before the model sees it, restore the real values in the response — so personal data never crosses the trust boundary to the provider. The leak invariant, consistent placeholders, detection limits, and defense in depth (minimization, BAA/DPA, local models). With worked math and runnable code. - [The Multi-Agent Orchestration Handbook](https://vibeengines.com/handbook/multi-agent-orchestration): Coordinating multiple LLM agents on one task — and when not to. Why coordination overhead grows quadratically (N(N−1)/2 pairs) while useful work divides only linearly, so past an optimal team size more agents make a system slower, pricier, and less reliable, how to find where the U-curve turns, and the patterns (orchestrator-workers, handoff, routing) that keep coordination near-linear. With worked math and a runnable optimal-team-size calculator. - [The Data Engineering for AI Handbook](https://vibeengines.com/handbook/data-engineering-for-ai): The pipeline that turns raw documents into usable data for RAG and training — ingest, chunk, deduplicate, quality-filter. How overlapping chunking works, why deduplication restores diversity, and why the usable dataset is a compounding fraction of the raw pile (raw × dedup-rate × quality-rate) — because quality beats quantity for both retrieval and training. With worked yield math and a runnable pipeline. - [The Browser & Computer-Use Agents Handbook](https://vibeengines.com/handbook/browser-computer-use-agents): LLM agents that operate a UI like a human — no API required. The observe-act-verify loop, why grounding (identifying which element to click on a cluttered, shifting page) is the dominant source of failure, and why grounding errors compound: task success is per-step accuracy to the power of the number of steps (0.9¹⁰ ≈ 35%), so long UI tasks are brittle. Plus the prompt-injection surface. With worked math and runnable code. - [The A2A Agent Interop Handbook](https://vibeengines.com/handbook/a2a-agent-interop): Letting heterogeneous agents from different teams work together. The two agreements A2A needs: capability discovery (agents advertise their skills so others can find and route to them) and a shared message schema (so one agent's output chains into another's input). Why both are required — a capable partner you can't talk to is useless — plus schema drift, capability lies, and how A2A relates to MCP. With worked math and runnable code. - [The WebSockets & Real-Time Handbook](https://vibeengines.com/handbook/websockets-realtime): Why "live" is hard on a protocol that can't push. Polling makes you wait on average half the interval to learn of an event (a 10s poll = ~5s staleness) and wastes a request every time nothing changed — and shrinking the interval only multiplies the waste. A WebSocket keeps one persistent full-duplex line open so the server pushes the instant something happens: latency ≈ one network hop, zero empty requests. The poll-vs-push latency math, when to use SSE instead, and the stateful-scaling pitfalls. With worked math and runnable code. - [The Voice AI Real-Time Agents Handbook](https://vibeengines.com/handbook/voice-ai-realtime-agents): Why a voice agent is a stopwatch, not a chat box. It's a three-stage pipeline — speech-to-text → LLM → text-to-speech — and the user waits for all three, so end-to-end latency is the sum of the stages. Human turn-taking breaks down past ~800ms, so the whole game is keeping that sum under the conversational budget: find the bottleneck (usually the LLM), shave the slowest stage first, cut network hops, and stream so the stages overlap. Plus endpointing, interruption handling, and why time-to-first-audio beats the naive sum. With worked math and runnable code. - [The Caching Patterns Handbook](https://vibeengines.com/handbook/caching-patterns): Why the fastest query is the one you never run. A cache serves requests from a fast store and falls back to a slow source on a miss, so average latency is a hit-rate-weighted blend of the two paths — h·t_cache + (1−h)·t_source, dominated by the miss term. That makes hit rate the one number that decides a cache's value. The patterns (cache-aside, write-through, write-back), the eviction policy, and the two famously hard problems — invalidation/staleness and the cache stampede — that turn a speedup into an outage if you get them wrong. With worked math and runnable code. - [Cryptography for Engineers](https://vibeengines.com/handbook/cryptography-for-engineers): Encryption from XOR up. The one-time pad — XOR each byte with a random, message-length, single-use key — is the only provably unbreakable cipher, and its three rules teach the whole subject. XOR is its own inverse (a⊕k⊕k=a), so decrypt is the same op; a zero key is the identity (why keys must be random); and the fatal mistake: reuse the key on two messages and c₁⊕c₂=p₁⊕p₂ — the key cancels and secrecy dies (the VENONA blunder). Scales to symmetric (AES) + public-key + nonces + TLS, and the engineer's rules: never roll your own, never reuse a nonce, secure randomness, hash passwords slowly. With worked math and runnable code. - [The OAuth & Auth Deep Dive](https://vibeengines.com/handbook/oauth-auth-deep): How "Sign in with Google" lets an app act for you without ever seeing your password. OAuth swaps your credentials for a scoped, revocable token, delivered via a short-lived authorization code that's worthless on its own — turning it into a token needs a back-channel exchange the browser can't make. Two parameters guard the flow: state (a random value echoed back, blocking forged/CSRF responses) and PKCE (challenge = SHA-256(verifier), so a stolen code can't be redeemed without the secret). Plus authentication vs authorization, OIDC/ID tokens, and the traps (implicit flow, unvalidated tokens, wide scopes, token leaks). With worked math and runnable code. - [The Operating Systems Fundamentals Handbook](https://vibeengines.com/handbook/os-fundamentals): How your machine runs hundreds of programs on a few cores and a fixed slab of RAM — by sharing what isn't enough. Two tricks carry the weight: round-robin scheduling slices CPU time into quanta so no process starves (paying for fairness in context-switch overhead), and virtual memory pages hot data into physical frames, faulting to disk on a miss and evicting the least-recently-used page (LRU) — so more frames means fewer faults. Plus the vocabulary (process/thread/context switch/system call/page fault/kernel vs user mode) and the traps (thrashing, over-threading, the million-to-one memory hierarchy). With worked math and a runnable scheduler + pager simulation. - [The Linux Internals Handbook](https://vibeengines.com/handbook/linux-internals): Linux runs the world on one idea: everything is a file. A document, the keyboard, a socket, another program's output — all reached through a small integer (a file descriptor) with the same four calls: open, read, write, close. The descriptor table allocates the lowest free integer (0/1/2 = stdin/stdout/stderr), which is exactly how the shell redirects output; a pipe is a kernel FIFO whose two ends wire a | b so one tool's output becomes another's input; and fork/exec split process creation from program loading, opening the window where descriptors get wired. Plus the traps (fd leaks → EMFILE, pipe backpressure/deadlock, zombie processes). With worked math and a runnable fd-table + pipe. - [The Compilers Basics Handbook](https://vibeengines.com/handbook/compilers-basics): How a flat string like "2 + 3 * 4" becomes the meaning 14 (not 20). A compiler works in stages: tokenize the text into atoms, parse the tokens by precedence, then evaluate. Built around a tiny arithmetic pipeline — tokenize → shunting-yard → RPN eval — where the single precedence comparison is exactly where "*" is encoded to bind tighter than "+", and parentheses override it. Then scale the same skeleton to real languages (AST, semantic analysis, optimization, IR/codegen, LLVM) and dodge the traps (parsing nested grammars with regexes, conflating stages, ignoring error positions). With worked math and a runnable end-to-end calculator. - [The Browser Internals Handbook](https://vibeengines.com/handbook/browser-internals): How a browser turns a tree of tags and a pile of CSS into a scrolling, animating picture at 60fps. The render pipeline — parse → style → layout → paint → composite — is ordered and dependent, so the cost of a visual change is how far back it reaches. Layout (reflow) is the expensive stage because boxes are interdependent (cost grows with node count); geometric changes (width, top, adding a node) force it, paint-only changes (color) skip it, and transform/opacity stay on the composite-only fast path. Plus layout thrashing (interleaved read/write forces a sync reflow each time — batch them), and virtualizing giant DOM trees. With worked math and a runnable reflow calculator. - [The Rust Handbook](https://vibeengines.com/handbook/rust): Rust refuses the old memory trade-off (safe-but-slow GC vs fast-but-dangerous manual free) with one idea: ownership. Every value has exactly one owner, freed when the owner's scope ends — no garbage collector, no manual free, never freed twice. Assigning or passing a value moves it (invalidating the original, so no double-free/use-after-move); to share you borrow under one rule — any number of shared references XOR exactly one mutable — which makes data races impossible; and clone() deep-copies when you truly need two. All checked at compile time, so safety costs nothing at runtime. Plus the guarantees table and the traps (cloning to silence the checker, fighting instead of listening, reaching for unsafe/Rc/RefCell too early). With worked rules and a runnable borrow-checker model. - [The Go Handbook](https://vibeengines.com/handbook/go): Go makes concurrency approachable with one motto: don't communicate by sharing memory; share memory by communicating. Instead of threads poking at locked shared state, cheap goroutines (start with "go f()", run hundreds of thousands, multiplexed onto a few OS threads) pass data through channels — typed pipes that carry the synchronization. The whole model hinges on one rule: when does an operation block? An unbuffered channel (cap 0) blocks a send until a receiver is ready (a rendezvous); a buffered channel (cap N) blocks only when full/empty; and a blocked op with no partner is a deadlock (which Go's runtime detects and panics on). Plus goroutine leaks and when a mutex is still the right tool. With worked rules and a runnable channel model. - [The TypeScript Handbook](https://vibeengines.com/handbook/typescript): Why TypeScript surprises people from Java/C#: its type system is structural, not nominal — it matches by an object's shape, not a declared name. A value is assignable to a type if it has every property the type requires with a matching type ("if it walks like a duck…"), so a wider object (extra props) fits a narrower target but a missing property never does. Object literals get one extra rule — the excess-property check — that flags undeclared props to catch typos (which is why extracting to a variable can make a type error vanish). Plus structural vs nominal trade-offs, branded types, and the traps (any disables checking; types are erased so validate external data at the boundary). With worked math and a runnable assignability checker. - [The React Handbook](https://vibeengines.com/handbook/react): React lets you write UI declaratively — return a description of what it should look like — and makes it fast with reconciliation: it builds a lightweight virtual DOM, diffs it against the previous tree, and applies only the minimal real-DOM changes. For lists it matches items by key: a key in both old and new means reuse the element in place (keep its DOM node + state), a new key mounts, a gone key unmounts — so a pure reorder with stable keys costs zero. The famous bug: using the array index as a key breaks on reorder/insert, because an index is a position not an identity, so React reuses the wrong element and state leaks to the wrong row. Plus unnecessary re-renders, memo/useMemo/useCallback, and why the virtual DOM isn't automatically fast. With worked math and a runnable reconciler. - [The Salary Negotiation Handbook](https://vibeengines.com/handbook/salary-negotiation): The expected-value case for always countering an offer. A polite counter is accepted with some probability p and otherwise the employer just holds the original (they essentially never rescind over a reasonable ask), so EV = p·counter + (1−p)·original beats accepting for any p>0 — heads you win, tails you break even. Your BATNA (best alternative) is your real leverage and your accept-floor; improve it before the conversation with competing offers. And a base bump compounds — its lifetime value is a geometric series, ≈$55k for a $10k raise over 5 years at 5%, not $50k. Plus how to actually do it (research, let them anchor, counter in writing, negotiate the whole package and level) and the traps. With worked math and a runnable EV calculator. - [The Code Review Culture Handbook](https://vibeengines.com/handbook/code-review-culture): The quantitative case for code review plus the human norms that make it pay off. A defect costs ~1× to fix in review, ~10× in test, ~100× in production — so review, the earliest human checkpoint, catches bugs at the cheapest stage and returns many times the reviewer's time (net = bugs-caught × the prod-vs-review gap − review cost). But the ROI is only realized when the culture is right: small PRs (a giant diff gets a rubber-stamp = negative value), automated style so humans never nit it, prompt reviews, blocking-vs-nit clarity, and the golden rule — critique the code, not the coder. Plus how to give/receive feedback and the traps. With worked math (defect-cost curve + review ROI) and a runnable calculator. - [The EU AI Act Handbook](https://vibeengines.com/handbook/eu-ai-act): The world's first comprehensive AI law, made legible for engineers. The key idea: it regulates AI by the risk of the use case, not the technology — the same model is unregulated in a spam filter and heavily regulated in a hiring tool. Every system sorts into one of four tiers: unacceptable (banned — social scoring, manipulation, most real-time public biometric ID), high-risk (hiring, credit, medical, education, law enforcement… → risk management, data governance, human oversight, conformity assessment, registration), limited-risk (transparency — chatbots disclose they're AI, deepfakes labelled), and minimal-risk (no obligations — the vast majority). Because tiering is a concrete rule, classification is deterministic. Plus the GPAI/foundation-model layer, what engineers should actually do, and the traps (optimistic self-classification, retrofitting compliance). With a worked classification model and runnable code. - [The AI Product Engineering Handbook](https://vibeengines.com/handbook/ai-product-engineering): A demo isn't a product. Getting an impressive LLM demo takes an afternoon; turning it into something you can charge for at scale is the brutal last mile where most AI features die. Product engineering rests on two numbers a demo never shows: unit economics (every request costs tokens — cost = in·p_in + out·p_out per million, which sets your gross margin and whether you're profitable) and the eval gate (ship a change only if its measured quality clears a bar AND its margin clears a bar — blocking cheap-but-wrong and great-but-unprofitable alike). Plus the reliability stack (evals, structured outputs, retries/fallbacks, caching, guardrails, observability) that keeps a flaky, pricey, non-deterministic model dependable in production. With worked math and a runnable cost/margin/ship-decision calculator. - [The Resume & Portfolio Handbook](https://vibeengines.com/handbook/resume-portfolio): Your resume has two readers and the first isn't human. Most applications hit an ATS (applicant tracking system) that scores keyword coverage against the job — coverage = |resume ∩ required| / |required| — and auto-filters anything below a threshold, so a qualified engineer gets rejected on missing keywords. Step one: clear the machine by tailoring keywords in the posting's own words (for skills you have) in a clean single-column format that parses. Step two: win the human with quantified-impact bullets — a bullet with a number ("reduced latency 40%") beats a vague responsibility ("worked on the backend"). Plus what an engineer's portfolio needs (a few working, well-documented projects, curated not exhaustive) and the traps. With worked math (ATS coverage + gate, bullet impact) and a runnable resume scorer. - [The Staff Engineer Behaviors Handbook](https://vibeengines.com/handbook/staff-engineer-behaviors): The hardest promotion in engineering — senior to staff — trips people up because they aim at the wrong target: writing more/better code, when the level is a change in the unit of impact. Senior is measured by own output; staff+ by leverage — the output you create in others (an architecture that unblocks three teams, a standard that speeds everyone, a mentee who levels up). Total impact = own_output + Σ multipliers, a team-wide boost is worth team_size × per_person_boost, and staff-level is the threshold where leverage dominates personal output. Covers Larson's four archetypes (tech lead / architect / solver / right hand), glue work and why it's under-credited, how to operate (work on what matters, write relentlessly, influence without authority, multiply others, stay technically credible), and the traps (hero IC, architecture astronaut, invisible glue). With a worked leverage model and runnable code. - [AI for Accountants](https://vibeengines.com/handbook/ai-for-accountants): The practical middle ground for accounting and tax professionals: where AI genuinely helps (first drafts, document summaries, reconciliation triage, plain-language client explanations), the three non-negotiable rules — client-data confidentiality (incl. IRC §7216), verify every number and authority, you sign it you own it — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the five questions to ask any AI vendor. No coding required. - [AI for Teachers](https://vibeengines.com/handbook/ai-for-teachers): The practical middle ground for educators: where AI genuinely helps (lesson plans, differentiating materials into reading levels, first-draft feedback and rubrics, quiz generation, parent emails), the three non-negotiable rules — student-data privacy (FERPA), verify every fact and answer key, you are still the teacher — five workflow recipes with exact prompts, how to handle AI in students' own work (detectors are unreliable), and the questions to ask any AI vendor. No coding required. - [AI for Architects](https://vibeengines.com/handbook/ai-for-architects): The practical middle ground for architectural practice: where AI genuinely helps (concept ideation, first-draft narratives and specs, document summaries, research starting points, early renderings), the three non-negotiable rules — you stamp it you own it, verify every code/zoning/structural claim against the adopted code, protect confidential client and site data — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Real Estate](https://vibeengines.com/handbook/ai-for-real-estate): The practical middle ground for agents and brokers: where AI genuinely helps (listing descriptions, client follow-ups, market-data summaries, process explanations, social content), the three non-negotiable rules — fair-housing compliance (AI easily generates illegal steering language), verify every fact and number, you are not giving legal/tax/appraisal advice — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Marketers](https://vibeengines.com/handbook/ai-for-marketers): The practical middle ground for marketers: where AI genuinely helps (first-draft copy, ideation, repurposing one asset into many formats, briefs, research/analytics summaries), the three non-negotiable rules — never publish fabricated claims/stats/testimonials (FTC false-advertising risk), stay on-brand and recognizably human, verify facts and respect IP — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for HR](https://vibeengines.com/handbook/ai-for-hr): The practical middle ground for HR and recruiting: where AI genuinely helps (job descriptions, first-draft policies, structured interview guides, internal comms, anonymized feedback summaries), the three non-negotiable rules — AI never makes a consequential decision about a person (a human decides), actively guard against discrimination/bias (EEOC + NYC Local Law 144 + EU AI Act high-risk), protect sensitive candidate/employee data — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Financial Analysts](https://vibeengines.com/handbook/ai-for-financial-analysts): The practical middle ground for financial analysis: where AI genuinely helps (summarizing filings and transcripts, first-draft memos and commentary, structuring/stress-testing model logic, first-pass qualitative research), the three non-negotiable rules — verify every number/calculation/source (models miscalculate and fabricate figures), MNPI and confidential data never touch an unapproved tool (information barriers, securities law), the analysis and recommendation and accountability are yours — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Journalists](https://vibeengines.com/handbook/ai-for-journalists): The practical middle ground for reporters and editors: where AI genuinely helps (transcription, document/report summaries, headline and structure ideas, research starting points, plain-language explainers), the three non-negotiable rules — verify everything and never publish an unverified fact or quote (models fabricate quotes and sources), protect your sources and confidential material, be transparent and never pass AI text off as reporting (plagiarism/attribution) — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Product Managers](https://vibeengines.com/handbook/ai-for-product-managers): The practical middle ground for PMs: where AI genuinely helps (PRD/spec drafts, synthesizing research you actually gathered, competitive-scan starting points, pressure-testing your reasoning, stakeholder comms), the three non-negotiable rules — never let AI fabricate user data/metrics/findings (it invents plausible insights representing nobody), prioritization and product judgment stay human, protect confidential roadmap and customer data — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [AI for Sales](https://vibeengines.com/handbook/ai-for-sales): The practical middle ground for sales reps: where AI genuinely helps (personalized outreach from real research, follow-ups, call summaries from your notes, objection prep, CRM drafts), the three non-negotiable rules — never make a false product claim or over-promise (AI invents features/results = misrepresentation that breaks deals and trust), protect prospect data and follow call-recording/consent law, the relationship and discovery and close stay human — five workflow recipes with exact prompts, a spot-the-danger judgment exercise, and the questions to ask any AI vendor. No coding required. - [RAG vs Long Context](https://vibeengines.com/handbook/rag-vs-long-context): A 1M-token window makes it tempting to skip retrieval entirely — but bigger context doesn’t mean the model reads it evenly, and it isn’t cheap. The "lost in the middle" attention problem, cost-at-scale math, and the retrieve-then-go-long pattern that combines both. - [LoRA vs Full Fine-Tuning](https://vibeengines.com/handbook/lora-vs-full-fine-tuning): LoRA freezes the base model and trains a tiny low-rank adapter; full fine-tuning updates every weight. Why a low-rank update can work at all, memory and storage trade-offs, multi-task adapter serving, and when the extra cost of full fine-tuning is worth it. - [MCP vs A2A](https://vibeengines.com/handbook/mcp-vs-a2a): Different layers, not rivals: MCP connects an agent to its own tools and data; A2A connects one autonomous agent to another. Why one protocol wasn’t enough for both jobs, and how a single agent uses both — MCP as its hands, A2A as its voice to peers. - [Agents vs Workflows](https://vibeengines.com/handbook/agents-vs-workflows): Autonomy is a cost, not a default. Workflows hardcode the path in your own code; agents let the model decide its next step at runtime. Why it’s a spectrum, not a binary, and the decision rule for when unpredictability actually justifies an agent loop. - [Embeddings vs Keyword Search](https://vibeengines.com/handbook/embeddings-vs-keyword-search): Embeddings match meaning even with zero shared words; keyword search (BM25) matches exact terms with a precision embeddings can’t guarantee. Why the two fail in genuinely complementary ways, and why hybrid search with fusion is the modern RAG default. - [Kafka vs Kinesis](https://vibeengines.com/handbook/kafka-vs-kinesis): Same partitioned-log model underneath, different operational surface: Kafka is self-run and portable with a huge ecosystem; Kinesis is fully AWS-managed with a hard per-shard throughput ceiling. Retention, cost model, and the lock-in trade-off. - [REST vs Webhooks vs SSE](https://vibeengines.com/handbook/rest-vs-webhooks-vs-sse): Three ways client and server move data, split by who exposes an endpoint and whether the connection stays open: REST pulls, webhooks flip who runs the server, SSE keeps one connection open for a live push. How real systems run all three at once. - [Monolith vs Microservices](https://vibeengines.com/handbook/monolith-vs-microservices): Microservices don’t remove complexity, they relocate it from the codebase into the network. Why the real trigger to split is organizational (Conway’s Law), not code size, and why "monolith first" is the pattern behind most successful splits. - [LLM vs SLM](https://vibeengines.com/handbook/llm-vs-slm): The choice is about deployment constraints, not just raw capability: LLMs run in the cloud with broad reasoning; SLMs run on-device with near-zero latency, cost, and full privacy. Why the capability gap is shrinking fast, and the model-routing pattern that uses both. - [GPU vs TPU](https://vibeengines.com/handbook/gpu-vs-tpu): GPUs are flexible general-purpose processors with the CUDA ecosystem behind them; TPUs are ASICs purpose-built around the systolic array for matmul, on Google Cloud only. Why that specialization is efficient exactly where it fits, and a liability the moment it doesn’t. - [Streaming vs Batch](https://vibeengines.com/handbook/streaming-vs-batch): Batch processes on a schedule; streaming reacts per-event. The real engineering cost of streaming isn’t speed, it’s correctness under disorder — event time vs processing time, watermarks, exactly-once semantics. The Lambda and Kappa architectures that combine both. - [OLTP vs OLAP](https://vibeengines.com/handbook/oltp-vs-olap): One storage-layout decision explains the whole comparison: row-oriented OLTP makes fetching one record cheap, column-oriented OLAP makes aggregating one column across millions of rows cheap. Why you can’t run heavy analytics well on your production database. - [Raft vs Paxos](https://vibeengines.com/handbook/raft-vs-paxos): Provably equivalent in power, radically different to implement: Raft bets on a strong leader to make consensus reasoning-friendly; Paxos’s more general, leaderless formulation is more flexible and notoriously hard to get right. Why etcd and Kubernetes chose Raft. - [CP vs AP Databases](https://vibeengines.com/handbook/cp-vs-ap-databases): CAP theorem’s forced choice, precisely stated: CP systems refuse some requests to guarantee consistency during a partition; AP systems keep serving, possibly stale, data. Why this trade-off only bites during an actual partition, and how real systems pick per data type. - [LLM API Pricing](https://vibeengines.com/handbook/llm-api-pricing): Every major provider’s API pricing in one comparable table, per million tokens — Anthropic Claude, OpenAI GPT, Google Gemini — pulled from official docs on 2026-07-21, not aggregators. Batch and prompt-caching discounts, a cross-provider tier map, and a fully worked chatbot cost example. - [Tokenizer Efficiency Benchmark](https://vibeengines.com/handbook/tokenizer-efficiency-benchmark): An original, reproducible benchmark of 9 real tokenizers across English prose, code, and non-English text — measuring characters-per-token and encode speed, with a fidelity check that catches the trap where a lossy tokenizer looks “efficient” only because it silently drops characters it can’t represent. - [The Forward Deployed Engineer: Role & Mindset](https://vibeengines.com/handbook/fde-role-and-mindset): The fastest-growing engineering title in AI, demystified: what an FDE actually does (owns the customer outcome, not the ticket), how it differs from a software engineer, solutions engineer, and consultant, the mindset shifts it demands, a week in the life, and how to break in. - [Customer Discovery & Scoping for FDEs](https://vibeengines.com/handbook/customer-discovery-and-scoping): How FDEs find the real problem before building the wrong one: the wrong-problem tax, watching users instead of asking, the questions that surface truth, defining success as one number, scoping the smallest slice that proves value, and the red flags that mean a deployment will stall. - [Customer Integration Patterns for FDEs](https://vibeengines.com/handbook/customer-integration-patterns): Integration is where POCs die. The FDE playbook: the five integration families (REST/GraphQL, webhooks, files/SFTP, database/CDC, queues), auth into customer systems (API keys, OAuth, mTLS), reliability at the edge (idempotency, retries with jitter, webhook verification, dead-letter), and mapping messy customer data. - [Rapid Prototyping for FDEs](https://vibeengines.com/handbook/rapid-prototyping-for-fdes): How FDEs build a convincing prototype in days, not months: throwaway-first thinking, the smallest demoable vertical slice, choosing a boring fast stack, faking the non-core parts honestly (hardcode / stub / Wizard-of-Oz), demo-driven development, and knowing when to throw it away versus harden. - [Deploying in Customer Environments](https://vibeengines.com/handbook/deploying-in-customer-environments): Ship where the customer can actually run it: the four deployment targets (your SaaS, the customer’s cloud/VPC, on-prem, and air-gapped), what changes as you move right — data egress, updates, model hosting, secrets, observability, and your own access — plus packaging portably and the air-gapped update path. - [The Demo & Storytelling Playbook](https://vibeengines.com/handbook/demo-and-storytelling): A demo is a performance, not a code review. How FDEs prep (their data, rehearse, a fallback recording), structure the story (open with the problem, show-then-explain, land the "so what"), recover from a live failure without debugging on stage, read the audience (exec / IT / user), and follow up while it’s hot. - [Security & Compliance for FDEs](https://vibeengines.com/handbook/security-and-compliance-for-fdes): Enough security to earn a customer’s "yes": what SOC 2, HIPAA, GDPR and PCI actually ask, how to handle data and secrets, what a security review checks, and the AI-specific risks (prompt injection, data leakage to model providers, PII in prompts) an FDE has to manage. - [Solutions Engineering & Stakeholder Management](https://vibeengines.com/handbook/solutions-engineering-and-stakeholder-management): The non-code half of the FDE job: mapping the room (champion, blocker, decision-maker, user), managing scope creep with a visible later-list, saying no kindly, setting expectations and surfacing risk early, and multi-threading so one person can’t sink the deployment. - [From POC to Production: Hardening](https://vibeengines.com/handbook/poc-to-production-hardening): The gap between "it demoed" and "people depend on it": how FDEs harden a proof of concept into a real system — reliability (sad-path handling, idempotency, backpressure, validation), observability (structured logs, metrics, health checks), security and config hygiene, and the harden-versus-rebuild decision. - [Handoff & Enablement for FDEs](https://vibeengines.com/handbook/handoff-and-enablement): How FDEs hand off a deployment without becoming a permanent, unpaid support team: why the exit is the goal, what to hand off (runbook, docs, architecture, who-to-call), how to write a runbook that survives 2 a.m., enabling the customer’s team hands-on, and defining the exit up front. - [Learning a Customer’s Domain Fast](https://vibeengines.com/handbook/learning-a-domain-fast): How FDEs get dangerous in a new field in a week: why domain fluency is a superpower, learning from the customer’s real data, running SME interviews that teach you (the naive-question license), building a glossary of their terms, finding the 80/20 of a domain, and how fluency compounds trust. - [AI App Patterns for FDEs](https://vibeengines.com/handbook/ai-app-patterns-for-fdes): The AI toolkit a modern FDE deploys: RAG over the customer’s documents, agents that drive their workflows, and evals as the acceptance test — plus how to choose between prompting, RAG, agents, and fine-tuning, and how to ship AI honestly with a good-enough bar and a human in the loop. - [Test-Time Compute & Reasoning Models](https://vibeengines.com/handbook/test-time-compute): Why letting a model think longer at inference — long chain-of-thought, sampling with self-consistency, best-of-N with a verifier, and search — can beat a much larger model on hard problems. How o1/o3- and DeepSeek R1-style reasoning models are trained to use a thinking budget, the train-time vs test-time scaling trade, and when spending the extra compute actually pays. - [RL from Verifiable Rewards (RLVR)](https://vibeengines.com/handbook/rlvr-verifiable-rewards): The training technique behind modern reasoning models: reinforcement learning where the reward comes from a programmatic check (a unit test passing, a math answer matching) instead of a gameable learned reward model. How it differs from RLHF, the GRPO/PPO loop, why reasoning behaviors emerge in DeepSeek R1-Zero, and where verifiable rewards run out. - [World Models](https://vibeengines.com/handbook/world-models): What it means for AI to learn a predictive model of an environment it can imagine inside — the basis of model-based RL, planning, and controllable simulation. The three families (latent control models like Dreamer, generative interactive video like Genie/Sora, and JEPA), how a latent world model learns and acts in imagination, and the debate over whether video generators really understand physics. - [GraphQL vs REST](https://vibeengines.com/handbook/graphql-vs-rest): GraphQL vs REST, decided by who chooses the shape of the response: REST exposes many fixed resource URLs and the server decides what each returns; GraphQL exposes one endpoint and the client asks for exactly the fields it needs. Over- and under-fetching, HTTP caching vs the N+1 problem, versioning, and when each wins — plus why "REST services behind a GraphQL gateway" is so common. - [MoE vs Dense Models](https://vibeengines.com/handbook/moe-vs-dense-models): Mixture of Experts vs dense LLMs, decided by which parameters fire per token: a dense model runs every parameter on every token; an MoE routes each token to a few expert sub-networks, holding far more total parameters but activating only a fraction. The compute win, the memory tax (all experts must sit in VRAM), load balancing, and when each wins. - [Encoder vs Decoder Models](https://vibeengines.com/handbook/encoder-vs-decoder-models): Encoder vs decoder Transformers, decided by which way attention flows: an encoder reads the whole input at once (bidirectional) to build representations — great for classification, NER and embeddings (BERT); a decoder generates left to right (causal) — great for chat, code and agents (GPT). Encoder-decoder models like T5 do both. When to reach for each, and why real systems chain them. - [Quantization vs Distillation](https://vibeengines.com/handbook/quantization-vs-distillation): Quantization vs distillation for shrinking LLMs, decided by what you change: quantization keeps the same model but stores its weights in fewer bits (FP16 → INT8/INT4); distillation trains a smaller student model to imitate a bigger teacher. One compresses the representation, the other the architecture — the quality-vs-size frontier of each, and why teams often distill then quantize. - [Cross-Encoder vs Bi-Encoder](https://vibeengines.com/handbook/cross-encoder-vs-bi-encoder): Cross-encoder vs bi-encoder for semantic search, decided by when the query meets the document: a bi-encoder embeds query and document separately so document vectors precompute and scale to millions; a cross-encoder feeds them together for a far more accurate relevance score, but runs per pair at query time. Why production retrieval uses a bi-encoder to retrieve and a cross-encoder to rerank. - [SQL vs Vector Database](https://vibeengines.com/handbook/sql-vs-vector-database): SQL vs vector databases, decided by the kind of question you ask: a relational database answers exact, structured queries over rows (WHERE price < 50); a vector database answers similarity queries over embeddings (find the items most like this). Exact filters vs approximate nearest neighbors, B-tree vs HNSW, pgvector, and why most real systems need both. - [Batch vs Real-Time Inference](https://vibeengines.com/handbook/batch-vs-realtime-inference): Batch vs real-time (online) inference, decided by whether a human is waiting: batch processes many inputs together offline for maximum throughput and lowest cost per token; real-time answers one request at a time with low latency. GPU utilization, continuous batching, and why most AI products run both. - [Orchestration vs Choreography](https://vibeengines.com/handbook/orchestration-vs-choreography): Orchestration vs choreography for coordinating microservices, decided by where control lives: orchestration puts one central coordinator in charge of a workflow; choreography lets services react to events with no central controller. Central visibility vs loose coupling, the saga pattern, and when to use each. - [Optimistic vs Pessimistic Locking](https://vibeengines.com/handbook/optimistic-vs-pessimistic-locking): Optimistic vs pessimistic locking, decided by how likely two writers collide: pessimistic locks a row before editing so others wait; optimistic edits without a lock and checks a version on write, retrying on conflict. Contention, deadlocks, retry storms, and when each wins. - [TCP vs UDP](https://vibeengines.com/handbook/tcp-vs-udp): TCP vs UDP, decided by whether every byte must arrive: TCP is connection-oriented and guarantees reliable, in-order delivery with flow and congestion control; UDP is connectionless and fires packets with no guarantees and almost no overhead. Head-of-line blocking, why real-time uses UDP, how QUIC/HTTP-3 gets both, and when each wins. - [Process vs Thread](https://vibeengines.com/handbook/process-vs-thread): Process vs thread, decided by whether they share memory: a process is an independent program with its own isolated memory; a thread runs inside a process and shares its memory. Isolation and safety vs cheap, fast, shared-memory concurrency — creation and context-switch cost, crash blast radius, the Python GIL, and when to use each. - [Mechanistic Interpretability](https://vibeengines.com/handbook/mech-interp-for-engineers): The engineer's guide to reading a model — interpretability as a debugger, not a séance. Why features live in superposition (not one per neuron), how sparse autoencoders pull monosemantic features back out, how attribution and circuit tracing find why a model did something (contribution of input i to output = the summed path weight W2·W1, validated causally by ablation), feature steering as a direct intervention, and an honest map of what you can debug today versus what is still research. Worked math plus a runnable 2-layer circuit tracer. - [Agentic Payments](https://vibeengines.com/handbook/agentic-payments): How to let an agent pay without letting it drain your account. The x402 machine-native checkout (HTTP 402: server returns payment terms, agent pays and retries with proof), signed MANDATES that scope spending like OAuth scopes for money (AP2), and spend caps enforced BEFORE execution — authorize ⟺ amount ≤ per-txn AND spent+amount ≤ total AND merchant ∈ allowed. The runaway-agent threat and why the cap belongs in the payment layer, not the prompt. Worked math plus a runnable mandate-and-cap enforcer that stops a looping agent cold at its budget. - [Diffusion LLMs](https://vibeengines.com/handbook/diffusion-llms): Text generation that isn't one token at a time. Why autoregressive decoding is latency-bound (N tokens = N sequential passes), how block diffusion denoises B tokens in K steps to emit B/K tokens per pass (⌈N/B⌉·K total passes, speedup B/K) for reported 1,000+ tokens/sec, the crucial image-vs-text split (continuous Gaussian noise over pixels vs a discrete masking corruption over tokens), and the speed-quality knob (fewer steps = faster but more parallel-commitment error). Worked math plus a runnable AR-vs-diffusion pass counter. - [Agent Supply-Chain Security](https://vibeengines.com/handbook/agent-supply-chain-security): The other door into your agent — the one you open yourself. Every skill and MCP server you INSTALL is third-party code running with permissions, an install-time threat distinct from runtime prompt injection. Why compromise risk compounds with dependency count (1−(1−p)^N: 20 deps at 5% each ≈ 64%), how blast radius = the capabilities a compromised component holds and least-privilege (grant = needed ∩ offered) bounds it, and the two levers — vet to lower p, sandbox to bound damage. Worked math plus a runnable risk-and-blast-radius model. - [RL Environments Engineering](https://vibeengines.com/handbook/rl-environments-engineering): The build side of verifiable rewards — the reasoning models everyone celebrates are taught by the ENVIRONMENT, not the algorithm. Why RL learns only from reward variance p(1−p) (zero signal when every attempt passes or fails, peak at a 50% pass rate) so tasks must sit in the difficulty band, why a gameable verifier corrupts training (precision = correct ÷ all rewarded; every false positive is a lie the model learns), and how to engineer difficulty curricula and verifier soundness. The theory of reward hacking lives in the verifiable-rewards handbook; this is how to build around it. Worked math plus a runnable learning-signal and verifier-precision model. - [MCP Apps](https://vibeengines.com/handbook/mcp-apps): Interactive UIs inside Claude and ChatGPT — the first official UI extension to the Model Context Protocol. How a third-party UI runs as a SANDBOXED IFRAME (no ambient authority — can't touch the host DOM, storage, or network), why every capability call crosses a postMessage JSON-RPC bridge (method + params + id, response with the same id), and how the HOST MEDIATES each request against an allowlist (method ∈ allowlist ? execute : error −32601) so the app can only do what the host chose to expose. Sandbox + bridge + allowlist = the whole security model. Distinct from the MCP-server backend. Worked protocol plus a runnable host-mediation gatekeeper. - [Self-Improving Agents](https://vibeengines.com/handbook/self-improving-agents): Agents that get better from their own production traces improve on exactly two axes, with opposite properties. MEMORY: store a solved trajectory/skill for exact recall — instant to add and forget, but no generalization (a notebook). WEIGHTS: fine-tune on FILTERED correct traces — generalizes to unseen similar tasks, but bakes in what you trained on and is hard to reverse (a habit). Why you filter traces before training (a loop trained on its own confident errors drifts or collapses — same what-you-reinforce-is-what-you-get rule as RL), and the safety rails that follow from permanence: filter first, prefer reversible, canary before rollout, watch for drift/gaming. Cites STaR, Voyager, Reflexion as the mechanism family. Worked math plus a runnable memory-vs-weights model. - [Long-Horizon Agents](https://vibeengines.com/handbook/long-horizon-agents): Why a 10-step task the agent nails becomes a 100-step task it never finishes — reliability COMPOUNDS: a single run of k steps succeeds with probability p^k (95% per step, 100 steps = 0.6%). The fix is engineering, not a better model: CHECKPOINT progress so a failure doesn't restart from zero, and RESUME + retry the failed segment only — a c-step segment retried r times succeeds 1−(1−p^c)^r, so the whole task climbs to [1−(1−p^c)^r]^(k/c), turning that 0.6% into ~51% at the same per-step reliability. The METR time-horizon idea and how reliability engineering extends it. The pass@k-vs-pass^k measurement lives in the agent-evals handbook (linked, not re-derived). Worked math plus a runnable no-checkpoint-vs-checkpointed model. - [AI-Assisted Interviews](https://vibeengines.com/handbook/ai-assisted-interviews): The 2026 technical-interview FORMAT (distinct from the content handbooks): AI is now allowed in the room, so the exam shifts from writing algorithms from memory to working WITH AI — code-comprehension rounds, AI-fluency rubrics, and frontier-lab eval-design rounds. The one equation behind the shift: when the AI is correct with probability p, a reviewing human's value is pure review skill — final = p·(1−p_falsepos) + (1−p)·p_catch — so a skilled reviewer lifts output above the AI alone while a careless one (breaks correct code, catches little) drags it BELOW raw AI (an unskilled AI user is net-negative). The new round types and how to prepare (read/audit/test, not just write). Worked math plus a runnable reviewer-value model. - [Autoregressive vs Diffusion LLMs](https://vibeengines.com/handbook/autoregressive-vs-diffusion-llms): Autoregressive vs diffusion language models, decided by how text is generated: autoregressive models emit one token at a time left-to-right, each conditioned on all previous; diffusion LLMs refine every position in parallel over a fixed number of denoising steps. Decode latency, KV cache, revisability, the quality gap, and where block diffusion fits. - [Agent Skills vs MCP](https://vibeengines.com/handbook/agent-skills-vs-mcp): Agent Skills vs the Model Context Protocol, decided by what each adds: a Skill is packaged knowledge and procedure loaded into the agent’s context to change how it behaves; MCP is a protocol that grants live tools and data over a wire at runtime. Portability, token cost, security surface, and why the two compose rather than compete. - [Vibe Coding vs Spec-Driven Development](https://vibeengines.com/handbook/vibe-coding-vs-spec-driven-development): Vibe coding vs spec-driven development, two ways to build with AI: vibe coding is conversational and exploratory — prompt, run, keep what works; spec-driven development writes a precise spec first and has the agent implement against it with tests as the contract. The spec→plan→tasks→implement loop, where each breaks, and how to combine them. - [Claude Code vs Codex vs Gemini CLI](https://vibeengines.com/handbook/claude-code-vs-codex-vs-gemini-cli): Three terminal-native agentic coding tools from Anthropic, OpenAI and Google that share one loop — read the repo, plan, edit files, run commands, iterate. How they differ on model, extensibility, openness and permissions, what the reported mid-2026 market numbers say (handled with care), and how to actually choose. - [vLLM vs TGI vs SGLang](https://vibeengines.com/handbook/vllm-vs-tgi-vs-sglang): Three open-source LLM serving engines that all do continuous batching but differ in their signature KV-cache trick: vLLM’s PagedAttention (removes fragmentation), SGLang’s RadixAttention (shares repeated prefixes), and TGI’s production-hardened Hugging Face integration. Where each wins, why "fastest" is a workload question, and how to choose. - [The AI-Era Backend Engineer](https://vibeengines.com/handbook/ai-era-backend-engineer): How the backend-engineer job changes in the AI era — and how to be the one who gets more valuable, not less. Boilerplate, CRUD and first-draft tests get cheap; system design, debugging, security judgment and production ownership become the moat. The new stack (reviewing AI code, spec-driven development, evals + cost/latency for LLM features), five AI-augmented workflows, a judgment exercise, and a 90-day plan. - [The AI-Era Frontend Engineer](https://vibeengines.com/handbook/ai-era-frontend-engineer): How the frontend-engineer job changes in the AI era — and how to be the one who gets more valuable. Component scaffolding, CSS and markup get cheap; interaction and UX judgment, accessibility, performance and perceived latency, state architecture, and building AI-native interfaces (streaming, chat, copilot) become the moat. The new stack, five AI-augmented workflows, a judgment exercise, and a 90-day plan. - [The AI-Era Product Manager](https://vibeengines.com/handbook/ai-era-product-manager): How the product-manager job changes in the AI era — and how to be the PM who gets more valuable. PRDs, research synthesis and comms get cheap; judgment, taste, user truth and accountability become the moat, plus a new stack: evals literacy, the unit economics of AI features, and agent/AI UX. Five AI-augmented workflows, a judgment exercise, and a 90-day plan. The career companion to AI for Product Managers (tool literacy). - [The AI-Era DevOps Engineer](https://vibeengines.com/handbook/ai-era-devops-engineer): How the DevOps / platform-engineer job changes in the AI era. Pipeline YAML, Dockerfiles, boilerplate IaC and scripts get cheap; reliability, incident response, security, cost/FinOps and platform-as-product become the moat — plus a new stack: reviewing AI-generated infrastructure for blast radius, AIOps signal-vs-noise, and golden paths. Five AI-augmented workflows, a judgment exercise, and a 90-day plan. - [The AI-Era Data Engineer](https://vibeengines.com/handbook/ai-era-data-engineer): How the data-engineer job changes in the AI era. SQL, pipeline glue and connector code get cheap; data modeling, quality and contracts, cost, lineage and the semantic layer become the moat — plus a new high-demand specialty: building the data pipelines that feed AI (RAG ingestion, embeddings, eval datasets). Five AI-augmented workflows, a judgment exercise, and a 90-day plan. ## System Design Walkthroughs - [Design Uber](https://vibeengines.com/systemdesign/uber-system-design): Build a planet-scale ride-hailing system. Learn how to handle real-time location tracking, matching algorithms, scalability, and payments. - [Design a URL Shortener](https://vibeengines.com/systemdesign/url-shortener-system-design): Build a URL shortener (think Bitly or TinyURL). Learn how to mint unique short codes with base62, make the read-heavy redirect path sub-millisecond with caching, shard billions of mappings, and track clicks asynchronously. - [Design WhatsApp](https://vibeengines.com/systemdesign/whatsapp-system-design): Build a real-time messaging system. See how persistent WebSockets, a session registry, offline inbox queues, the ✓✓ delivery receipts, group fan-out, media on a CDN, and end-to-end encryption fit together. - [Design Twitter](https://vibeengines.com/systemdesign/twitter-system-design): Build Twitter's news feed. Learn the social graph, why fan-out on write beats read-time merging, how a precomputed timeline cache makes feed reads O(1), how ranking surfaces the best tweets, and how a hybrid model solves the celebrity problem. - [Design YouTube](https://vibeengines.com/systemdesign/youtube-system-design): Build a planet-scale video platform. See how raw uploads become an adaptive-bitrate ladder through an async transcoding pipeline, how a CDN serves immutable segments from the edge, how tiered blob storage holds exabytes affordably, and how view counts stay async. - [Design a Rate Limiter](https://vibeengines.com/systemdesign/rate-limiter-system-design): Build a distributed rate limiter. Learn where to put the check, how to key and tier limits, the token-bucket and sliding-window algorithms, why shared atomic counters in Redis avoid race conditions, and the fail-open vs fail-closed trade-off. - [Design Dropbox](https://vibeengines.com/systemdesign/dropbox-system-design): Build a file sync engine. See how splitting metadata from bytes, content-addressed block storage with deduplication, delta sync, a push-then-pull notification service, and conflict-safe versioning fit together to keep files consistent across every device. - [Design Ticketmaster](https://vibeengines.com/systemdesign/ticketmaster-system-design): Build an event-booking system. Tackle the double-booking problem head-on: seat inventory, short-lived holds with TTLs, exactly-once purchases via ACID transactions, payment sagas with idempotency, and a virtual waiting room that tames the on-sale stampede. - [Design a Notification System](https://vibeengines.com/systemdesign/notification-system-design): Build a multi-channel notification system. See how one API, a message queue and a worker fleet decouple slow third-party delivery, how preferences and quiet hours gate every send, how templates fan out to push, SMS and email, and how delivery tracking, retries, dedup and rate limits keep it reliable. - [Design Typeahead (Autocomplete)](https://vibeengines.com/systemdesign/typeahead-system-design): Build a search typeahead. See how a prefix trie turns search into an O(L) walk, how a prefix-keyed cache answers the skewed common case in under a millisecond, how precomputed top-k ranking surfaces the best ten, how an offline builder keeps suggestions fresh from query logs, and how to personalize and shard. - [Design a Message Queue](https://vibeengines.com/systemdesign/message-queue-system-design): Build a distributed message queue like Kafka. See how an append-only commit log, partitions keyed for order, consumer groups with server-side offsets, leader/follower replication, controller-driven leader election, retention and compaction, and exactly-once guarantees fit together. - [Design a Key-Value Store](https://vibeengines.com/systemdesign/key-value-store-system-design): Build a distributed key-value store like DynamoDB. See how consistent hashing places keys, how replication and tunable quorums (R + W > N) trade consistency for availability, how vector clocks resolve conflicts, and how gossip membership, hinted handoff and read repair keep it alive through failure. - [Design a Distributed Cache](https://vibeengines.com/systemdesign/distributed-cache-system-design): Build a distributed cache like Redis or Memcached. See how cache-aside shields the database, how consistent hashing shards across nodes, how TTL and LRU/LFU eviction bound memory, how replication and invalidation keep it correct, and how to survive cache stampedes and hot keys. - [Design a News Feed](https://vibeengines.com/systemdesign/news-feed-system-design): Build a social news feed. See how the social graph, pull vs push fan-out, a precomputed feed cache, relevance ranking, the hybrid model that tames the celebrity problem, blending multiple content sources, and cursor pagination fit together. - [Design a Web Crawler](https://vibeengines.com/systemdesign/web-crawler-system-design): Build a distributed web crawler. See how a URL frontier drives the fetch–parse–enqueue loop, how a bloom-filter seen-set stops infinite re-crawling, how politeness and robots.txt keep you a good citizen, how DNS caching and content dedup remove bottlenecks, and how to shard the frontier by host and dodge traps. - [Design Google Docs](https://vibeengines.com/systemdesign/google-docs-system-design): Build a real-time collaborative editor. See how edits become tiny operations, how OT and CRDTs resolve concurrent edits so every copy converges, how ops broadcast over WebSockets, how an op log plus snapshots give history and recovery, and how presence, offline sync and per-document sharding fit together. - [Design a Job Scheduler](https://vibeengines.com/systemdesign/job-scheduler-system-design): Build a distributed job scheduler (cron at scale). See how a durable job store indexed by run time, a due scanner, a ready queue feeding a worker pool, idempotent at-least-once execution, leader election to avoid double-fires, retries with backoff and a DLQ, and time-wheel sharding fit together. - [Design Netflix](https://vibeengines.com/systemdesign/netflix-system-design): Build a planet-scale video streaming service. See how the play path splits authorization from byte delivery, how origin storage and CDN edges serve immutable segments, how an adaptive-bitrate ladder adapts to any connection, how a parallel transcoding pipeline builds it, and how Open Connect, recommendations and QoE events fit together. - [Design Instagram](https://vibeengines.com/systemdesign/instagram-system-design): Build a photo-sharing app. See how splitting media from metadata, a CDN for immutable images, async image processing, a precomputed feed cache, asynchronous like/view counters, TTL-based ephemeral stories, and sharding fit together to serve billions of photos. - [Design Pastebin](https://vibeengines.com/systemdesign/pastebin-system-design): Build a text-paste service. See how base62 key generation, separating metadata from blob storage, a cache and CDN for the read-heavy immutable path, TTL expiration, privacy flags and size limits, and async analytics fit together. - [Design an ID Generator](https://vibeengines.com/systemdesign/distributed-id-generator-system-design): Build a distributed unique ID generator like Twitter Snowflake. See why auto-increment and UUIDs fall short, how a 64-bit ID packs a timestamp, machine id and sequence to stay collision-free and time-sortable without per-ID coordination, how machine ids are assigned, and how clock skew is handled. - [Design a Search Engine](https://vibeengines.com/systemdesign/search-engine-system-design): Build a web search engine. See how an inverted index turns search into list lookups, how query parsing mirrors indexing, how an offline indexer builds postings, how BM25 and PageRank rank results, and how document-sharded scatter-gather, result caching and a fresh index scale it to billions of pages. - [Design an Ad Click Aggregator](https://vibeengines.com/systemdesign/ad-click-aggregator-system-design): Build a real-time ad click aggregator. See how a thin ingest API and event stream absorb millions of clicks a second, how a stream processor aggregates into time windows, how dedup keys give exactly-once counts, how a raw event lake and batch recompute reconcile the numbers, and how fraud filtering and watermarks handle the sharp edges. - [Design Airbnb](https://vibeengines.com/systemdesign/airbnb-system-design): Build a lodging marketplace. See how listings and geo search with filters, per-listing availability calendars, atomic booking that never double-books, payment hold-and-capture with idempotency, event-driven reviews and reindexing, and read replicas fit together. - [Design Slack](https://vibeengines.com/systemdesign/slack-system-design): Build a team chat app. See how channel messaging and per-channel history, real-time delivery over WebSockets with a session registry, cross-server fan-out via pub/sub, ephemeral presence and typing, message search, unread counts and notifications, and channel sharding fit together. - [Design Google Maps](https://vibeengines.com/systemdesign/google-maps-system-design): Build a mapping and navigation service. See how pre-rendered map tiles on a CDN, a weighted road graph, A* shortest-path routing, contraction hierarchies for instant long routes, crowdsourced traffic for live ETAs, geocoding, and regional graph partitioning fit together. - [Design a Stock Exchange](https://vibeengines.com/systemdesign/stock-exchange-system-design): Build a stock exchange matching engine. See how an in-memory order book with price-time priority matches orders, how pre-trade risk checks guard the core, how a single sequencer and single-threaded engine give deterministic low-latency matching, and how market-data feeds, journaling/replay, clearing and symbol partitioning fit together. - [Design a Payment System](https://vibeengines.com/systemdesign/payment-system-design): Build a payment system like Stripe. See how a payment is modeled as a state machine of authorize and capture, how idempotency keys prevent double-charges, how a double-entry ledger keeps every cent auditable, how tokenization shrinks PCI scope, and how async webhooks, reconciliation and a durable retryable worker handle slow banks and failure. - [Design a CDN](https://vibeengines.com/systemdesign/cdn-system-design): Build a Content Delivery Network like Cloudflare or Akamai. See why distance is the enemy, how edge PoPs cache content near users, how anycast/GeoDNS routes to the nearest edge, how Cache-Control TTLs and tiered shield caches protect the origin, how versioned URLs and purge solve invalidation, and how stale-while-revalidate keeps it fast and up. - [Design a Load Balancer](https://vibeengines.com/systemdesign/load-balancer-system-design): Build a load balancer like NGINX or HAProxy. Learn why you scale out instead of up, how one entry point fronts a pool of stateless servers, how balancing algorithms (round-robin, least-connections, weighted, hashing) pick a server, how health checks evict dead boxes, L4 vs L7 routing, and how to make the balancer itself redundant. - [Design an API Gateway](https://vibeengines.com/systemdesign/api-gateway-system-design): Build an API gateway like Kong or Amazon API Gateway. See how one front door decouples clients from your microservices, how it routes by path, offloads authentication and rate limiting to the edge, aggregates responses (BFF) and caches hot GETs, stays stateless and pooled, and isolates a failing service with timeouts and circuit breakers. - [Design DNS](https://vibeengines.com/systemdesign/dns-system-design): Build the Domain Name System. See why one central name→IP table can't work, how a delegated hierarchy of root, TLD and authoritative servers splits the namespace, how a recursive resolver walks it, how caching with TTLs makes lookups instant, how replication and anycast make it DDoS-proof, and how GeoDNS, DNSSEC and propagation work. - [Design Object Storage](https://vibeengines.com/systemdesign/object-storage-system-design): Build an object store like Amazon S3. See why one disk caps capacity, durability and availability, how a flat bucket/key namespace scales to trillions of immutable objects, how a metadata service maps keys to chunk locations, how replication and erasure coding deliver eleven-nines durability, how read-after-write consistency is anchored in metadata, and how multipart uploads, tiering and background repair work. - [Design a Distributed File System](https://vibeengines.com/systemdesign/distributed-file-system-system-design): Build a distributed file system like GFS or HDFS. See why one file server caps capacity and throughput, how huge files split into large chunks across chunkservers, how a single master serves only metadata while clients stream bytes directly, how rack-aware replication survives correlated failures, how a leased primary orders pipelined writes, and how the master is made recoverable. - [Design a Time-Series Database](https://vibeengines.com/systemdesign/time-series-database-system-design): Build a time-series database like InfluxDB or Prometheus TSDB. See why a row-per-point SQL table melts, how series = metric + tags models the data, how columnar storage with delta-of-delta timestamps and XOR values shrinks points to ~1–2 bytes, how an LSM write path with a WAL swallows the firehose, how sharding by series and downsampling work, and why cardinality is the real scaling limit. - [Design a Metrics & Monitoring System](https://vibeengines.com/systemdesign/metrics-monitoring-system-design): Build a monitoring system like Prometheus or Datadog. See why SSH-and-grep can't scale, how counters, gauges and histograms instrument the golden signals, pull vs push collection, storing the sample firehose in a time-series database, splitting alerting into a rule evaluator and an alert manager that dedupes and routes, dashboards, HA collectors and federation, and why you must monitor the monitor. - [Design a Distributed Tracing System](https://vibeengines.com/systemdesign/distributed-tracing-system-design): Build a distributed tracing system like Jaeger or Honeycomb. See why metrics and logs can't explain one slow cross-service request, how spans sharing a trace id form a waterfall, how trace context propagates in headers across every hop, how spans are emitted fire-and-forget through agents to a collector, why tail-based sampling keeps the errors and slow traces, and how the trace store serves both assembly and search. - [Design a Log Search System](https://vibeengines.com/systemdesign/log-search-system-design): Build a log aggregation and search system like the ELK stack or Loki. See why grep-over-SSH can't scale, how structured logs and shipper agents get data off ephemeral hosts, how a Kafka buffer absorbs bursts, how a parse/enrich pipeline feeds an inverted index, how time-based sharding and scatter-gather search billions of lines in milliseconds, and how hot-warm-cold retention bounds cost. - [Design a Feature Flag System](https://vibeengines.com/systemdesign/feature-flags-system-design): Build a feature flag / experimentation platform like LaunchDarkly. See why redeploying to toggle a feature is slow and risky, how a flag store + dashboard lift decisions out of code, how an SDK evaluates flags locally with zero network calls, how consistent-hash bucketing gives sticky percentage rollouts, how local cache + streaming + edge deliver a millisecond kill switch, and how exposure events turn a flag into an A/B experiment. - [Design a Leaderboard](https://vibeengines.com/systemdesign/leaderboard-system-design): Build a real-time leaderboard for millions of players. See why SQL ORDER BY + COUNT rank melts at scale, how a sorted set (Redis ZSET) gives O(log N) update/rank and O(log N + K) top-K, how relative "around me" boards work, why sharding a global ranking is uniquely hard, how time-windowed boards reset cleanly, and how a durable store backs the rebuildable in-memory index. - [Design a Distributed Counter](https://vibeengines.com/systemdesign/distributed-counter-system-design): Build a distributed counter for view counts and likes at massive scale. See why a single UPDATE row melts under write contention, how sharding into N sub-counters trades read cost for parallel writes, how batching through a stream cuts write volume, how a cached total makes reads O(1), how HyperLogLog counts uniques in a few KB, and how idempotency keys make increments exactly-once. - [Design a Digital Wallet](https://vibeengines.com/systemdesign/digital-wallet-system-design): Build a digital wallet like PayPal or Venmo. See why a mutable balance column is dangerous, how an append-only double-entry ledger makes balance derived and money conserved, how atomic debit+credit transfers survive a mid-transfer crash, how idempotency keys stop double-charges, how per-account locking prevents double-spend, how cross-shard transfers use sagas, and how pending/settled states and reconciliation handle slow bank rails. - [Design a Fraud Detection System](https://vibeengines.com/systemdesign/fraud-detection-system-design): Build a real-time fraud detection system like Stripe Radar. See why static rules fail against an adaptive adversary, how real-time features (velocity, device, geo) from a feature store carry the signal, how an ML model blends with rules under an ~80ms budget, how streaming aggregations keep features fresh, how the chargeback/label feedback loop retrains the model, and how allow/deny/step-up decisioning and graph features handle nuance and fraud rings. - [Design a Video Conferencing System](https://vibeengines.com/systemdesign/video-conferencing-system-design): Build a video conferencing system like Zoom or Google Meet. See why real-time media needs UDP/WebRTC not TCP, why a peer-to-peer mesh explodes at N², how an SFU lets each peer upload once and forwards streams, how simulcast adapts quality per receiver, how signaling with SDP and ICE/STUN/TURN connects peers across NATs, and how geo-distributed cascaded SFUs scale to huge global calls. - [Design a Live Streaming System](https://vibeengines.com/systemdesign/live-streaming-system-design): Build a live video streaming system like Twitch or YouTube Live. See why it optimizes for cheap CDN fan-out instead of ultra-low latency, how ingest accepts one broadcaster push, how transcoding builds an adaptive bitrate ladder, how HLS/DASH segmenting turns live video into cacheable HTTP files, how a CDN fans them to millions, the latency-vs-scale dial, and how live chat and DVR/VOD fit in. - [Design a Food Delivery System](https://vibeengines.com/systemdesign/food-delivery-system-design): Build a food delivery system like DoorDash or Uber Eats. See why it's a three-sided marketplace plus a real-time logistics engine, how the order lifecycle is a durable state machine, how the dispatch engine optimizes courier assignment (who and when, not nearest-now), how location tracking and geo-indexing work, how ETA is an ML sum of prep + travel + wait, and how geo-sharding and surge balance supply and demand. - [Design a Proximity Service](https://vibeengines.com/systemdesign/proximity-service-system-design): Build a proximity / nearby-search service like Yelp or "find drivers near me". See why SQL distance queries degrade to full scans, the 2D indexing problem, how geohash encodes 2D into a locality-preserving 1D key, how quadtrees and S2 cells adapt to density, the cell-boundary problem, caching hot cells, and how moving objects and geo-sharding are handled. - [Design a Distributed Lock](https://vibeengines.com/systemdesign/distributed-lock-system-design): Build a distributed lock (mutual exclusion across machines) like Redis locks, Redlock or etcd/ZooKeeper locks. See why a "locked=true" flag deadlocks and races, how atomic acquire grants to exactly one, how a TTL lease auto-releases a dead holder, how ownership tokens make release safe, why fencing tokens are the real safety mechanism against pauses, and why correctness-critical locks need a consensus quorum. - [Design a Service Discovery System](https://vibeengines.com/systemdesign/service-discovery-system-design): Build a service discovery system like Consul, etcd, Eureka or Kubernetes DNS. See why hardcoded IPs break in a dynamic fleet, how a service registry maps names to live instances, how self-registration and health checks keep it accurate, the client-side vs server-side discovery tradeoff, why the registry needs consensus (CP) or accepts AP staleness, and how caching and watches keep lookups fast and fresh. - [Design a Flash Sale System](https://vibeengines.com/systemdesign/flash-sale-system-design): Build a flash-sale / limited-inventory system for a massive concurrent drop. See why read-then-decrement oversells, how admission control and a virtual waiting room pace the thundering herd, how an atomic inventory decrement guarantees exactly N buyers win, how reserve-then-confirm with a hold TTL and async order processing work, and how to tame the single hot inventory key with fairness and anti-bot defenses. - [Design a Collaborative Editor](https://vibeengines.com/systemdesign/collaborative-editor-system-design): Build a real-time collaborative document editor like Google Docs, Notion or Figma. See why a whole-document lock kills concurrency, how naive position-based edits corrupt a document, how Operational Transformation's central sequencer works and where it bottlenecks, how CRDTs remove that bottleneck with causal, order-independent merges, why presence/cursors live outside the document's durable history, and how offline-first editing and tombstone garbage collection round out the design. - [Design a Calendar System](https://vibeengines.com/systemdesign/calendar-system-design): Build a shared calendar like Google Calendar or Outlook. See why storing every recurring occurrence explodes storage, how RRULE-based recurrence is expanded at read time with exceptions layered on top, how free/busy conflict detection stays fast via interval overlap, the timezone/DST trap that can silently shift a recurring meeting by an hour, how invite/RSVP fan-out avoids blocking the organizer, how reminders scale via a time-bucketed trigger index, and how devices sync incrementally. - [Design a Hotel Booking System](https://vibeengines.com/systemdesign/hotel-booking-system-design): Build a hotel/room booking platform like Booking.com or Marriott. See why read-then-decrement inventory oversells rooms, how a multi-night stay needs an all-or-nothing atomic transaction across every date, how reserve-then-confirm with a hold TTL prevents both overselling and cart-abandonment loss, why dynamic pricing is cached rather than computed live, how search is split from the strongly-consistent booking path (CQRS), and how controlled overbooking is a business policy the same atomic system enforces. - [Design a Dating App](https://vibeengines.com/systemdesign/dating-app-system-design): Build a swipe-based dating app like Tinder or Hinge. See why a live full-table nearby scan doesn't scale, how a geospatial index plus a swiped-exclusion set fixes candidate generation, the mutual-match race condition and how a database uniqueness constraint guarantees exactly one match, how ranked feeds are precomputed rather than live, why blocking is deliberately the strictest-consistency path in the whole system, and how bot/fake-profile detection runs quietly, asynchronously, off the hot path. - [Design a Ride-Matching Engine](https://vibeengines.com/systemdesign/ride-matching-system-design): Build the matching and dispatch engine at the heart of a ride-hailing platform — the specific subsystem deciding which driver gets which rider, not the trip lifecycle or payments. See why straight-line distance is a bad proxy for real ETA, why greedy one-at-a-time matching is globally suboptimal, how batch matching solves an assignment-optimization problem across a short window, surge pricing as supply/demand balancing, ingesting driver locations at write-heavy scale, and fairness for idle drivers. - [Design a Logging Pipeline](https://vibeengines.com/systemdesign/logging-pipeline-system-design): Build the ingestion pipeline that collects, buffers and delivers logs from thousands of services — the write path, not the query/search side. See why synchronous writes to a central log server are dangerous, local agent buffering, bounded backpressure and overflow policy, batching for throughput, where structured parsing should happen, at-least-once delivery with dedup, sampling at high volume, and why a logging storm can take down the very system it was meant to observe. - [Design an Email System](https://vibeengines.com/systemdesign/email-system-design): Build an email system like Gmail or Outlook. See why raw inbound mail can't land straight in a mailbox, retry-with-backoff for unreliable delivery across the open internet, layered spam/authentication filtering, per-user mailbox sharding, thread reconstruction via message headers instead of subject lines, delivery dedup and bounce-loop prevention, and IMAP-style incremental multi-device sync. - [Design an Online Judge](https://vibeengines.com/systemdesign/online-judge-system-design): Build a code-execution judge like LeetCode, Codeforces or HackerRank's backend. See why running submitted code inline is a security catastrophe, what real sandboxing has to guarantee beyond just a container, async queue-based execution for contest-scale bursts, verdict determination across hidden test cases, CPU-time (not wall-clock) resource limits for fairness, judge determinism, and fair queueing so one flood of submissions can't starve everyone else. - [Design Webhook Ingestion at Scale](https://vibeengines.com/systemdesign/webhook-ingestion-at-scale-system-design): Build a reliable webhook ingestion pipeline — the backbone of every integration. Learn signature verification and replay protection, acknowledging fast with a durable queue, idempotent processing that turns at-least-once delivery into effectively exactly-once, bounded retries with a dead-letter queue, replay after a fix, and monitoring consumer lag and DLQ depth. - [Design a Customer Data Integration Pipeline](https://vibeengines.com/systemdesign/customer-data-integration-pipeline-system-design): Build the pipeline that ingests a customer’s messy data on almost every deployment. Learn source connectors (API, SFTP, database, change-data-capture), staging, validation and mapping to a canonical schema, quarantining bad rows instead of dropping them, incremental sync by checkpoint, idempotent upsert loads with backfill, and reconciliation that proves the data landed. - [Design Multi-Tenant Customer Isolation](https://vibeengines.com/systemdesign/multi-tenant-customer-isolation-system-design): Serve many customers from one system without ever leaking data between them. Learn tenant context propagation, the data-isolation spectrum (row-level, schema-per-tenant, database-per-tenant), preventing noisy neighbors with per-tenant quotas, per-tenant encryption keys and config, and audit plus automated cross-tenant tests that make isolation provable. - [Design an Audit Logging & Compliance Trail](https://vibeengines.com/systemdesign/audit-logging-and-compliance-trail-system-design): Build the audit system that passes a customer’s security review. Learn structured capture of who-did-what-when, an append-only immutable (WORM) store, tamper-evidence with hash chaining, retention and archival for compliance windows, and access-controlled querying that redacts sensitive data and audits the auditors. ## AI System Design Walkthroughs - [Design a Conversational AI](https://vibeengines.com/ai-system-design/conversational-ai-system-design): Build a production conversational AI system (think ChatGPT). See how the request path splits an inference gateway from the model servers, how the context window is assembled and token-budgeted, how conversation memory is stored and recalled, how tokens stream back over a persistent connection, and how guardrails gate every prompt and response. - [Design a RAG Pipeline](https://vibeengines.com/ai-system-design/rag-pipeline-system-design): Build a retrieval-augmented generation pipeline. See how documents are chunked and embedded, how a vector store answers semantic search, how two-stage retrieval with reranking finds the best passages, how the prompt is grounded to stop hallucination, and how evals keep a quietly-drifting index honest. - [Design an AI Agent System](https://vibeengines.com/ai-system-design/ai-agent-system-design): Build an autonomous AI agent. See how the plan-act-observe loop turns a goal into action, how the model emits typed tool calls, how a sandboxed executor runs them safely, how working and long-term memory fit together, and how budgets and approval gates keep a multi-step agent from running away. - [Design an LLM Inference Server](https://vibeengines.com/ai-system-design/llm-inference-serving-system-design): Build an LLM inference serving system. See how a request queue absorbs spiky traffic, how the prefill/decode split and continuous batching keep GPUs full, how the KV cache and paged attention make each token cheap, how tensor sharding fits a giant model, and how autoscaling rides demand — all balancing latency against throughput,. - [Design a Recommendation System](https://vibeengines.com/ai-system-design/recommendation-system-design): Build a large-scale recommendation system. See how a two-stage retrieve-and-rank funnel picks the best few from millions, how two-tower embeddings and ANN generate candidates fast, how a heavy ranking model scores engagement, how a feature store stays consistent between training and serving, and how the feedback loop keeps recommendations fresh. - [Design a Vector Database](https://vibeengines.com/ai-system-design/vector-database-system-design): Build a vector database. See why "k nearest of a billion vectors" needs its own index, how a distance metric ranks similarity, how IVF cells and an HNSW graph make search sub-linear, how product quantization fits billions in RAM, how metadata filtering and sharding hold up — and how ANN fails silently when you starve the search. - [Design Semantic Search](https://vibeengines.com/ai-system-design/semantic-search-system-design): Build a semantic search engine. See why keyword search misses meaning, how a single shared embedding model puts documents and queries in one space, how the chunk→embed→index ingest path is built, how hybrid BM25 + vector fusion catches exact terms, how a cross-encoder reranks the shortlist — and how a model-version upgrade silently randomizes results. - [Design an LLM Gateway](https://vibeengines.com/ai-system-design/llm-gateway-system-design): Build an LLM gateway and model router. See why apps should call one provider-agnostic API instead of vendor SDKs, how adapters normalize every provider, how a capability-first router picks a model, how retries and failover survive a provider outage, how per-tenant limits and budgets isolate a shared quota, how caching cuts cost and latency — and how cost-only routing silently wrecks quality. - [Design an LLM Cache](https://vibeengines.com/ai-system-design/llm-cache-system-design): Build a prompt & response caching layer for LLMs. See why repeated and near-duplicate prompts should skip the model, how an exact-match cache keys on the normalized request, how a semantic cache reuses answers above a tuned similarity threshold, how prompt-prefix (KV) reuse cheapens even misses, how TTL and invalidation keep it fresh — and how a loose threshold silently serves wrong answers. - [Design a Fine-Tuning Pipeline](https://vibeengines.com/ai-system-design/fine-tuning-pipeline-system-design): Build an LLM fine-tuning and training pipeline. See how datasets are curated (the real work), how a pretrained base is adapted with LoRA/PEFT, how the distributed training loop is monitored, how a held-out eval gate decides promotion, how a versioned model registry enables rollback, how canary deploys ship safely, and how the production data flywheel compounds — plus why eval-set contamination inflates metrics silently — through an interactive diagram. - [Design a Feature Store](https://vibeengines.com/ai-system-design/feature-store-system-design): Build a feature store for ML. See how one feature definition kills training/serving skew, how a shared pipeline computes features once, how the offline store serves point-in-time-correct training data, how the online store serves millisecond lookups, how a versioned registry makes features reusable assets, how batch + streaming keep them fresh, and how drift monitoring catches silent decay. - [Design Content Moderation](https://vibeengines.com/ai-system-design/content-moderation-system-design): Build a content-moderation pipeline (text + image). See how a staged funnel hash-matches known-bad content, how text and multimodal classifiers emit per-category scores, how OCR closes the text-in-image loophole, how a policy engine maps scores to graduated actions, how a human review queue handles the uncertain middle, how appeals and a retraining loop fight adversarial evasion — and why fully trusting the classifier fails — through an interactive diagram. - [Design an AI Coding Assistant](https://vibeengines.com/ai-system-design/ai-coding-assistant-system-design): Build an AI coding assistant (like Copilot or Cursor). See how inline completion / tab prediction meets a sub-second latency budget, how context is assembled with fill-in-the-middle, how repo-aware retrieval grounds completions in the codebase, how a code-specialized model streams suggestions, how debounce/cancel/cache win the milliseconds, how acceptance-rate telemetry measures quality, how an agentic chat mode handles multi-file edits, and why starving the context yields confident wrong code — through an interactive diagram. - [Design Multi-Agent Orchestration](https://vibeengines.com/ai-system-design/multi-agent-orchestration-system-design): Build a multi-agent orchestration / workflow engine. See how an orchestrator decomposes a goal across specialist agents, when NOT to go multi-agent, how shared state coordinates them, how a durable workflow engine checkpoints and resumes, how typed handoffs stop telephone-game degradation, how fan-out/fan-in parallelizes independent work, how budgets and termination prevent runaways, and why uncapped agents loop and burn unbounded cost — through an interactive diagram. - [Design LLM Eval & Observability](https://vibeengines.com/ai-system-design/llm-eval-observability-system-design): Build an LLM evaluation and observability pipeline. See how offline evals and online observability form two loops, how tracing every call is the foundation, how versioned golden datasets become your real benchmark, how programmatic/LLM-judge/human scorers combine, how a CI regression gate blocks regressions, how production monitoring catches drift, how failures feed back as fixtures — and why an unvalidated LLM judge silently corrupts every metric — through an interactive diagram. - [Design an LLM Guardrails System](https://vibeengines.com/ai-system-design/guardrails-system-design): Build an LLM guardrails / safety-filter system. See how a safety pipeline wraps every call, how input guardrails screen PII, prompt-injection and scope, why injection needs defense-in-depth, how output guardrails check toxicity, PII, schema and groundedness, how violations are handled gracefully, how cheap-first layering keeps it affordable, why both over- and under-blocking fail — and how trusting untrusted input lets injection through — through an interactive diagram. - [Design a Text-to-Image Service](https://vibeengines.com/ai-system-design/text-to-image-system-design): Build a text-to-image generation service like Midjourney, DALL·E or hosted Stable Diffusion. See why synchronous generation fails, how the async job pattern accepts fast and works later, how a queue absorbs bursts against fixed GPU capacity, what the diffusion denoising loop actually does, how batching and autoscaling keep the GPU fleet cost-effective, how object storage + CDN deliver images, and why moderation is required on both the prompt and the image. - [Design a Speech-to-Text Service](https://vibeengines.com/ai-system-design/speech-to-text-system-design): Build a speech-to-text / ASR service like Whisper-at-scale or Deepgram. See why batch and streaming transcription have opposite constraints, how a gateway splits the paths over one GPU fleet, how VAD and overlapping chunks feed a fixed model window, what the ASR inference pipeline does, how batching and autoscaling keep GPUs economical, and how post-processing (punctuation, timestamps, diarization) turns raw tokens into a usable transcript. - [Design a Text-to-Speech Service](https://vibeengines.com/ai-system-design/text-to-speech-system-design): Build a text-to-speech / voice synthesis service like ElevenLabs or Play.ht. See why natural TTS is a pipeline (text normalization → acoustic model → vocoder), how batch and streaming differ, why time-to-first-audio is the metric for voice agents, how voices and cloning work, how caching common phrases skips the GPU, how GPU scaling protects the latency budget, and why cloning demands consent and watermarking. - [Design a Realtime Voice Agent](https://vibeengines.com/ai-system-design/voice-agent-system-design): Build a realtime voice AI agent like ChatGPT voice mode or an AI phone agent. See why a sequential STT→LLM→TTS pipeline feels robotic, how streaming and pipelining the three stages cut per-turn latency, how turn-taking (endpointing + barge-in) makes it feel human, how the interruptible orchestrator manages state and clean cancellation, where the latency budget goes, and how tools and transport (WebRTC/SIP) fit in. - [Design an AI Answer Engine](https://vibeengines.com/ai-system-design/ai-answer-engine-system-design): Build an AI answer engine like Perplexity. See why a bare LLM is stale and hallucinates with no sources, how retrieve-then-generate (RAG over the live web) grounds answers, how a query planner rewrites and decomposes questions, how search + fetch + rerank build a tight evidence set, how grounded generation cites every claim, how citation verification catches unsupported statements, and how to defend against prompt injection from web content. - [Design an Embeddings Service](https://vibeengines.com/ai-system-design/embeddings-service-system-design): Build an embeddings service that powers semantic search, RAG and recommendations. See why embedding needs a shared service, how online (low-latency query) and batch (millions of docs) modes differ, what the model outputs, how a batched GPU pipeline indexes a corpus, the critical rule that query and corpus must share the same model version (so a model change re-embeds everything), and how caching by (text, version) saves cost. - [Design a Reranking Service](https://vibeengines.com/ai-system-design/reranking-service-system-design): Build a reranking service — the precision tier of two-stage retrieval for search and RAG. See why vector (bi-encoder) search has great recall but rough ordering, how retrieve-wide-then-rerank-narrow works, why a cross-encoder scores query and candidate jointly for precision, how the top-K latency/cost tradeoff is tuned, how to serve it batched and cached, and why recall gates precision so both stages are essential. - [Design a GraphRAG System](https://vibeengines.com/ai-system-design/graph-rag-system-design): Build a GraphRAG system — knowledge-graph-augmented retrieval. See why vanilla vector RAG fails on multi-hop and global questions, how a knowledge graph of entities and relationships lets retrieval traverse connections, how LLM extraction builds the graph, how community detection and hierarchical summaries enable global questions, how local vs global query modes work, and why hybrid graph+vector retrieval is the strongest form. - [Design a Multimodal RAG System](https://vibeengines.com/ai-system-design/multimodal-rag-system-design): Build a multimodal RAG system that answers questions grounded in images, charts, tables and PDFs. See why text-only RAG loses visual information, how documents are parsed into multimodal chunks, unified multimodal embeddings vs convert-to-text, cross-modal retrieval, why generation needs a vision-language model that actually sees the retrieved images, how assets are stored and served, and the modality-gap and cost tradeoffs. - [Design an Agent Memory System](https://vibeengines.com/ai-system-design/agent-memory-system-design): Build a long-term memory system for an LLM agent or chatbot. See why stuffing the whole history into context fails, how short-term (context window) and long-term (persistent) memory differ, how the write path extracts salient facts, how context is assembled under a token budget, how memories live in vector + structured stores, how recall is RAG over memory, and why consolidation and forgetting keep memory coherent. - [Design a Code Execution Sandbox](https://vibeengines.com/ai-system-design/code-sandbox-system-design): Build a secure code execution sandbox for untrusted, LLM-generated (or user-submitted) code — the runtime behind code agents, online judges and notebooks. See why running code directly is a full compromise, how containers and microVMs isolate it, how resource limits stop hangs and fork bombs, the submit→isolate→capture pipeline, why sandboxes must be ephemeral, how warm pools keep it fast, and how egress control prevents exfiltration. - [Design an LLM Router](https://vibeengines.com/ai-system-design/llm-router-system-design): Build an LLM router that sends each request to the cheapest model that can handle it. See why one-model-for-all overpays on the easy majority and fails the hard minority, how a fast difficulty classifier provides the routing signal, how tiered routing with a cheap-first cascade survives classifier errors, how semantic routing to specialists is cheaper and better, how caching and multi-provider fallback add resilience, and why the quality bar comes before cost. - [Design a Batch Inference System](https://vibeengines.com/ai-system-design/batch-inference-system-design): Build an offline batch LLM inference system that grinds millions of prompts at maximum throughput per dollar. See why looping the online API fails, how the async job model works, how huge and continuous batching saturate the GPU, how a sharded restartable pipeline survives failures, how length bucketing and prefix caching squeeze each batch, and how checkpointing unlocks cheap spot GPUs and batch-discount pricing. - [Design a Synthetic Data Pipeline](https://vibeengines.com/ai-system-design/synthetic-data-system-design): Build a synthetic data pipeline that uses LLMs to generate training and eval data. See why naive "generate 10,000 examples" gives low-diversity, error-prone data, how a strong teacher model generates candidates, how diversity steering avoids mode collapse, how quality filtering and verification (execute code, ground facts) keep only good examples, how the data powers distillation/augmentation/evals, and how to avoid model collapse and contamination. - [Design an RLHF Pipeline](https://vibeengines.com/ai-system-design/rlhf-pipeline-system-design): Build an RLHF alignment pipeline. See why a pretrained base model is capable but unaligned, how supervised fine-tuning teaches instruction-following, why preference comparisons beat demonstrations, how a reward model turns human comparisons into a dense score, how PPO optimizes the policy with a KL constraint to prevent reward hacking, the DPO and RLAIF alternatives, and the reward-hacking, overoptimization and labeler-quality traps. - [Design a Document AI Pipeline](https://vibeengines.com/ai-system-design/document-ai-system-design): Build a document AI / intelligent document processing pipeline that turns PDFs, scans and forms into structured data. See why plain OCR gives characters but loses structure, how preprocessing and OCR produce located text, how layout analysis recovers 2D structure (tables, key-value pairs), how templates vs ML vs VLM extraction produce schema JSON, how validation and confidence catch misreads and hallucinated fields, and how human-in-the-loop review keeps it accurate. - [Design ChatGPT](https://vibeengines.com/ai-system-design/chatgpt-system-design): Design ChatGPT itself — a chat product serving hundreds of millions of weekly users and billions of prompts a day. See why the serving path must be stateless, how conversations shard by id, how the context is rebuilt every turn under a token budget, how a model router becomes the #1 cost lever, how prefix caching kills redundant prefill, how continuous batching squeezes the GPU fleet, and the load-shedding playbook for a capacity crunch. - [Design a Computer-Use Agent](https://vibeengines.com/ai-system-design/computer-use-agent-system-design): Build a computer-use / browser agent — the agent whose only API is the screen. See how the see-think-act loop works one verified action at a time, why perception mixes screenshots with accessibility trees, how set-of-marks grounding turns "click Submit" into coordinates, why execution lives in a disposable sandboxed VM, how every action is verified against the next frame, where approval gates catch irreversible clicks, and how task memory survives 60-step workflows — through an interactive diagram where you can change the page mid-task. - [Design a Deep Research Agent](https://vibeengines.com/ai-system-design/deep-research-agent-system-design): Build a deep research agent — the system behind every "deep research" product. See how a lead agent decomposes the question into a coverage plan, why parallel sub-researchers get isolated contexts, how the search-read-note loop compounds understanding, why evidence lives as claims-paired-with-sources, how gap-driven iteration ends under a hard budget, and how citation verification keeps the final report honest — through an interactive diagram where you can poison a source. - [Design an AI Meeting Notetaker](https://vibeengines.com/ai-system-design/ai-meeting-notetaker-system-design): Build an AI meeting notetaker. See how a capture bot joins calls with per-speaker audio, why consent is architecture rather than a checkbox, how streaming ASR and diarization turn chaos into an attributed transcript, why extracted decisions and action items must cite timestamped segments, how meeting memory answers questions across months of calls, and how artifacts land in the tools where work happens — through an interactive diagram where you can unleash crosstalk. - [Design a Text-to-Video System](https://vibeengines.com/ai-system-design/text-to-video-system-design): Build a Sora-style text-to-video service. See why minutes-long renders force an async job spine, how safety gates both prompts and pixels, why an LLM expands prompts toward the training distribution, how a GPU scheduler runs queue economics with tiers and preemption, how diffusion transformers denoise spacetime latents jointly for coherent motion, why C2PA provenance and watermarking ship on every render, and how draft-then-final rendering makes iteration affordable — through an interactive diagram with a viral-surge chaos mode. - [Design an Adaptive AI Tutor](https://vibeengines.com/ai-system-design/ai-tutor-system-design): Build an adaptive tutoring system like Khanmigo or Duolingo's AI tutor. See why a fixed question order fails every learner, how a per-skill mastery model picks the next problem, why grading routes structured answers to a deterministic checker and reserves the LLM for open-ended judgment, how the mastery feedback loop closes, why explanations are grounded in a curriculum knowledge base instead of freely generated, how a Socratic hint ladder avoids just giving away the answer, and how a long-term learner profile drives spaced repetition. - [Design an AI Code Review Bot](https://vibeengines.com/ai-system-design/code-review-bot-system-design): Build an automated PR review bot like CodeRabbit or Graphite. See why cheap deterministic linters run before any LLM call, how review is scoped to the diff plus just enough context, how a repo embedding index (RAG over the codebase) supplies cross-file context the diff alone can't show, why every finding is confidence-gated before posting, how a comment ledger prevents re-pushes from spamming old feedback, how secrets are redacted before they ever reach the LLM, and how developer reactions tune down false positives over time. - [Design an Agent Control Plane](https://vibeengines.com/ai-system-design/agent-control-plane-system-design): Build the platform layer that runs a whole fleet of production AI agents — not how one agent coordinates a task, but how an organization deploys, versions, budgets, permissions, monitors, and can instantly kill any of potentially hundreds of independently-running agents. See why ad-hoc agent scripts are an operational blind spot, a central agent registry with versioning, server-enforced per-agent tool permissions, hard cost budgets checked per step, an out-of-band kill switch, full execution tracing, and canary rollout of new agent versions. - [Design a Model Registry (MLOps)](https://vibeengines.com/ai-system-design/model-registry-mlops-system-design): Build the platform that versions, evaluates, promotes and can instantly roll back trained ML models — the governance layer between "a model finished training" and "a model is safely serving production traffic." See why an artifact alone is meaningless without lineage, staged promotion through gated environments, automated evaluation gates that fail closed, shadow/canary deployment because offline metrics aren't sufficient, instant rollback via immutable versioning, and production drift monitoring. - [Design a GPU Cluster Scheduler](https://vibeengines.com/ai-system-design/gpu-cluster-scheduler-system-design): Build a scheduler for a shared pool of expensive GPUs across many teams. See why naive FIFO scheduling starves large distributed jobs and fragments capacity, gang scheduling for all-or-nothing distributed training, topology-aware placement, priority and preemption for latency-sensitive inference versus long-running batch training, fair-share quotas across competing teams, checkpoint-and-resume, and reconciling the scheduler's bookkeeping against real cluster state. - [Design a Data Labeling Platform](https://vibeengines.com/ai-system-design/data-labeling-platform-system-design): Build a human annotation platform like Scale AI or Labelbox — sourcing labels from people, not generating them programmatically. See why a single annotator's answer can't be trusted as ground truth, multi-annotator consensus, secretly-mixed gold-standard items that measure labeler accuracy in real time, skill-based task routing, active learning to prioritize which unlabeled examples matter most, and aligning labeler pay with measured quality. - [Design a Prompt Management & A/B Testing Platform](https://vibeengines.com/ai-system-design/prompt-mgmt-ab-platform-system-design): Build the platform that versions, evaluates, and safely A/B tests prompts in a production LLM application — a much faster-moving artifact than model weights, often edited by non-engineers. See why hardcoded prompts force a full deploy for every tweak, externalizing prompts as versioned config, an offline eval gate before rollout, live A/B testing, guardrail metrics that must not regress, routine one-click rollback, and a review gate suited to non-engineer editors. - [Design Realtime Speech Translation](https://vibeengines.com/ai-system-design/realtime-translation-system-design): Build a live speech-to-speech translator, chaining streaming ASR, MT, and TTS under a tight latency budget. See why record-then-translate feels like a walkie-talkie, streaming partial transcripts, why streaming translation must revise its own output as more context arrives, chunking policy, voice/prosody preservation, disfluency filtering, per-stage latency budgeting, and code-switching. - [Design an AI Ad Creative Platform](https://vibeengines.com/ai-system-design/ai-ad-creative-system-design): Build a platform that generates ad creative at scale for advertisers, built on top of generative models rather than serving them directly. See why one hand-designed creative can't be tested at scale, programmatic variant generation, a brand-safety and ad-policy compliance gate that fails closed, rights and licensing tracking, dynamic multi-armed-bandit budget allocation, a performance feedback loop, and tiered generation cost control. - [Design a Multi-Tenant AI SaaS Platform](https://vibeengines.com/ai-system-design/multi-tenant-ai-saas-system-design): Build an AI product serving many separate customer organizations from shared infrastructure. See why unscoped shared retrieval risks cross-tenant data leaks, enforcing isolation at the data layer, per-tenant customization via configuration, noisy-neighbor prevention with per-tenant quotas, per-tenant cost attribution, data-residency routing, automated onboarding, and defense-in-depth isolation that survives a bug in any single layer. - [Design an Autonomous Email Agent](https://vibeengines.com/ai-system-design/email-agent-system-design): Build an AI agent that triages, drafts, and sends email on a user's behalf, where sending is often irreversible. See why auto-sending everything is dangerous, a human-approval gate scoped to action reversibility, priority triage, context assembly from thread history, tone/style matching, defending against indirect prompt injection hidden in received email, and a full audit trail. - [Design a Sales CRM Agent](https://vibeengines.com/ai-system-design/sales-crm-agent-system-design): Build an AI agent embedded in a CRM that enriches leads, scores priority, drafts outreach, and suggests next actions — writing into a shared system of record and staying a suggester, not an autonomous actor, for relationship-sensitive interactions. See multi-source enrichment with provenance tracking, lead scoring, write-back validation that fails closed, next-best-action suggestion, personalization at scale, activity logging, and stale-data safeguards. - [Design a Support Resolution Agent](https://vibeengines.com/ai-system-design/support-resolution-agent-system-design): Build an AI agent that triages, resolves, and escalates customer support tickets end-to-end. See why answering from general knowledge alone is dangerous when the real answer depends on account-specific state, grounding responses in real account/order data, confidence-based escalation instead of guessing, tiered auto/assisted/escalate resolution, seamless handoff context, outcome-based quality tracking, tone-aware de-escalation, and identity verification against social engineering. - [Design a CI Test-Generation Agent](https://vibeengines.com/ai-system-design/ci-test-gen-agent-system-design): Build an agent that automatically generates tests for new and changed code in a CI pipeline. See why manual tests leave coverage gaps, coverage-gap analysis, generating tests against the real code, mutation testing to verify a test is actually meaningful, flaky-test detection before it poisons CI signal, why a human review gate is still required, and running expensive validation in a background lane. - [Design a Personal Knowledge Assistant](https://vibeengines.com/ai-system-design/personal-knowledge-assistant-system-design): Build an AI assistant grounded in a user's own private documents and notes, where privacy is the central architectural constraint. See why dumping years of personal content into one context window fails, retrieval over messy heterogeneous formats, continuous incremental ingestion, disambiguating with personal context, source attribution, encryption and minimizing third-party exposure, genuine deletion, and recency-aware retrieval for facts that change over time. - [Design an Edge Inference Fleet](https://vibeengines.com/ai-system-design/edge-inference-fleet-system-design): Build the platform that deploys and manages ML inference across a large fleet of edge devices — phones, IoT sensors, kiosks, cars. See why cloud-only inference fails at fleet scale, model compression for severe resource budgets, offline-capable on-device inference, staged rollout that's harder than server rollback, bandwidth-conscious delta updates, telemetry from devices you don't control, graceful degradation, and devices that self-heal their model version on reconnect. - [Design an AI Video Dubbing System](https://vibeengines.com/ai-system-design/ai-video-dubbing-system-design): Build a system that translates and re-synthesizes speech in existing video, synchronized to lip movements — an offline batch problem with its own timing and ethical constraints. See why naive translate-and-overlay drifts out of sync, timing-constrained translation, higher-quality offline voice cloning, the audio-vs-video lip-sync trade-off, cross-segment consistency, consent for voice likeness, review gates scaled by content stakes, and background audio preservation. - [Deploy an LLM in a Customer’s Environment](https://vibeengines.com/ai-system-design/on-prem-llm-deployment-system-design): Deploy a large language model inside a customer’s own environment — the constraint a forward deployed engineer meets when a regulated customer won’t send data to a public API. See why a hosted endpoint is a non-starter, right-sizing the model and precision to the fixed hardware they actually own, serving efficiently on limited GPUs, running with no network egress (air-gapped, no phone-home), shipping model and security updates as signed bundles into a locked-down environment, and getting observability out without exfiltrating customer data. - [Design Secure Document Ingestion + RAG](https://vibeengines.com/ai-system-design/secure-document-ingestion-and-rag-system-design): Build a retrieval-augmented assistant over a customer’s sensitive internal documents, where security — not relevance — is the hard constraint. See why naive RAG leaks documents across users, classifying and tagging access on ingest, permission-aware retrieval that intersects relevance with what the user may see, redacting PII and secrets before the prompt and logs, defending against prompt injection carried inside untrusted documents, and citing sources plus auditing every access so the pipeline can pass a security review. - [Design an Agent Payment Gateway](https://vibeengines.com/ai-system-design/agent-payment-gateway-system-design): Build the platform that lets autonomous agents pay for things mid-task without draining an account — the agent rails, not the human card rails. See why a direct payment credential gives an agent unbounded, unscoped spending power, routing every payment through one mediated gateway, verifying a signed spending mandate (signature, scope, expiry) instead of trusting the agent's claim, enforcing per-transaction and cumulative spend caps BEFORE any settlement, machine-native x402 (HTTP 402) settlement with no human checkout, an immutable audit trail of every decision, and why the gateway must fail closed — so a runaway or hijacked agent is capped at the mandate, not the credit limit. - [Design an MCP Security Gateway](https://vibeengines.com/ai-system-design/mcp-security-gateway-system-design): Build the security layer between an AI host and the MCP servers it connects to — the MCP-protocol-specific threat surface, not a generic LLM guardrail. See why a direct connection implicitly trusts untrusted third-party servers, routing all MCP traffic through a mediating gateway, an explicit server/tool allowlist (deny by default), scanning tool descriptions for injection (attacker-controlled text the model reads as instructions — a channel unique to MCP), issuing narrowly-scoped short-lived tokens per server so a compromised one is bounded to its slice, egress control against exfiltration through tool results, an immutable audit trail, and why the gateway must fail closed. - [Design an Agentic Browser Security Gateway](https://vibeengines.com/ai-system-design/agentic-browser-security-gateway-system-design): Build the enterprise perimeter that contains a whole fleet of agentic browsers without banning them — the fleet-level layer, not one agent's own injection defenses. See why ungoverned agentic browsers are an invisible exfiltration surface (and why a ban just creates shadow usage), routing every action through one gateway, a central org-wide policy engine, taint tracking so data from an untrusted web page can't drive a sensitive action (provenance beats detection), an action allowlist with risk classification, human-approval breakpoints for the irreversible minority, and a fleet-wide immutable audit trail. - [Design a Hybrid Edge-Cloud Agent](https://vibeengines.com/ai-system-design/hybrid-edge-cloud-agent-system-design): Build an on-device agent that runs on the NPU by default and escalates hard queries to the cloud — but where privacy, not just confidence, decides what may leave the device. See why default-to-cloud is default-to-leak, answering on-device by default, a privacy classifier that gates escalation FIRST (must-stay-local data is answered locally even when the model is unsure), confidence-based escalation only for privacy-cleared queries (the cascade math lives in the LLM Router design), redaction to minimize what leaves, and an on-device escalation audit — capability and privacy reconciled by making the boundary a hard constraint confidence can never override. - [Design an RL Environment Farm](https://vibeengines.com/ai-system-design/rl-environment-farm-system-design): Build the infrastructure that trains reasoning models — the environment-and-verifier side of RL with verifiable rewards, not the preference-tuning of RLHF. See why running rollouts inline in the trainer is unsafe and unscalable, sandboxed rollout workers that safely execute untrusted model-generated code, a scheduler that fans rollouts across a fleet and distributes the policy, a SOUND verifier (a gameable one makes the model learn the exploit — reward hacking), a task bank that serves the productive difficulty band (a curriculum, because learning needs reward variance), and a trajectory store that closes the loop — with reward-hacking and sandbox-escape chaos. ## Algorithms (Played, Not Watched) - [Dijkstra: The Last Mile](https://vibeengines.com/algorithm/dijkstra-last-mile): Don't watch Dijkstra's algorithm — play it. Drive a courier through a living isometric city, lose the fastest route to your own instincts, then meet the Dispatcher who floods the streets to find the optimal path every time. Four acts: drive it, watch the frontier, predict the next lock, then break it with a negative cycle. - [Binary Search: The Vault](https://vibeengines.com/algorithm/binary-search): Don't memorize binary search — play it. Crack a vault of sorted dials, burn through guesses by instinct, then meet the Halver who throws away half the search space with every single look and finds any value in O(log n). Three acts — crack it, watch the window collapse, predict the midpoint. - [Quicksort: The Pivot Pit](https://vibeengines.com/algorithm/quicksort): See quicksort actually work — then drive it. Watch the pivot partition an array in place, smaller-left and larger-right; pick your own pivot and feel how its position sets the balance; then feed it an already-sorted list and watch a fixed pivot melt down to O(n²) — and fix it with one random line. Three acts — watch the pivot, pick the pivot, break the worst case. - [Merge Sort: The Cascade](https://vibeengines.com/algorithm/merge-sort): Don't read about merge sort — play it. Watch single-element runs cascade upward into one sorted array, merge two sorted halves by hand by always taking the smaller front, then prove the payoff: O(n log n) on sorted, reversed and shuffled input alike — the guarantee quicksort can't make. Three acts — watch the cascade, merge two runs, prove the guarantee. - [BFS: The Flood](https://vibeengines.com/algorithm/bfs-flood): Don't memorize breadth-first search — play it. Find your own way through a maze, then release the flood that spreads from the start in rings and touches the exit by the shortest path every time, then watch depth-first search dive deep and miss it. Three acts — navigate it, release the flood, BFS vs DFS. - [A* Search: The Ascent](https://vibeengines.com/algorithm/a-star-pathfinding): Don't memorize A* — fly it. Orbit a real 3D mountain, climb it by instinct, then meet the Pathfinder who folds one optimistic guess into Dijkstra's flood so the whole search leans straight at the summit. Four acts in live 3D — climb it, watch the heuristic beat the blind flood, predict the lowest-f pop, then break optimality with a heuristic that lies. - [Sieve of Eratosthenes: Prime Time](https://vibeengines.com/algorithm/sieve-of-eratosthenes): Find every prime under 100 without dividing once. Hit play and watch the multiples fall away in cheerful waves while the primes light up gold — whatever's left standing is prime. A playable take on the 2,000-year-old sieve, with the theory, a worked example and a quiz. - [Build Order: DFS & Topological Sort](https://vibeengines.com/algorithm/dfs-topological-sort): Don't memorize topological sort — play it. Schedule eight interdependent build tasks by hand and feel the constraints bite, then let a depth-first search dive to the bottom of every dependency and surface a valid build order by reversing its finish times. Three acts — schedule it yourself, watch DFS reverse-post-order it, then add one bad edge and watch it detect the cycle and refuse. - [Six Degrees: Union-Find](https://vibeengines.com/algorithm/union-find): Don't memorize the Disjoint Set Union — play it. Wire up nine strangers one handshake at a time and watch separate friend circles merge into one, hit a redundant connection and see it refuse to close a cycle, then click any node to run find and watch path compression flatten the tree so the next lookup is instant. Union by rank, path compression and the near-constant O(α(n)) that powers Kruskal's MST — plus full theory, a runnable challenge and a quiz. - [The Tournament: Heap Sort](https://vibeengines.com/algorithm/heap-sort): Don't memorize heap sort — watch the tournament play out. See an array read as a binary tree, build it into a max-heap where every parent beats its children so the champion sits at the root, then pluck that root maximum to the end again and again as the sorted region grows from the right. Sift-down, the two phases, and why it's O(n log n) in place with no extra memory — plus full theory, a runnable challenge and a quiz. - [The Typo Fixer: Edit Distance](https://vibeengines.com/algorithm/edit-distance): Don't memorize edit distance — watch the grid fill in. See how many insert, delete, and replace edits turn kitten into sitting, as a dynamic-programming table computes each cell from its diagonal, up, and left neighbors, then traces the cheapest path of edits back through the grid. The Levenshtein recurrence, match-is-free, and O(m·n) — plus full theory, a runnable challenge and a quiz. - [The Cheapest Grid: Kruskal's MST](https://vibeengines.com/algorithm/kruskal-mst): Don't memorize Kruskal's algorithm — watch it wire up a network. Connect eight towns for the least total cable by always laying the cheapest edge that doesn't close a loop, with Union-Find rejecting cycles on the fly and the minimum spanning tree turning green edge by edge. Greedy choice, the cut property, and O(E log E) — plus full theory, a runnable challenge and a quiz. - [The Patient Router: Bellman-Ford](https://vibeengines.com/algorithm/bellman-ford): Don't memorize Bellman-Ford — watch the distances settle. Find shortest paths from one source even with negative edge weights by relaxing every edge round after round until nothing improves, then one extra pass to catch a negative cycle. See why Dijkstra's greedy commit breaks on negatives while Bellman-Ford's patience doesn't — O(V·E), plus full theory, a runnable challenge and a quiz. - [The Non-Backtracker: KMP](https://vibeengines.com/algorithm/kmp): Don't memorize KMP — watch the pattern slide. Find a pattern in a text in linear time by never re-reading a character: build the pattern's LPS failure table from its own repeats, then on a mismatch jump the pattern forward instead of restarting the text pointer. See the false start, the jump, and the match — plus the O(n+m) theory, a runnable challenge and a quiz. - [The Word Tree: Trie](https://vibeengines.com/algorithm/trie): Don't memorize the trie — watch words grow into a tree. Insert CAT, CAR, CARD, and DOG letter by letter and see shared prefixes share a path, with a flag marking where each real word ends. Then search a word and a prefix by walking down from the root. The O(length) prefix tree behind autocomplete — plus full theory, a runnable challenge and a quiz. - [The Moving Frame: Sliding Window](https://vibeengines.com/algorithm/sliding-window): Don't memorize the sliding window — watch it glide. Find the best sum of k consecutive numbers in one O(n) pass: as the frame slides, subtract the number leaving and add the number entering instead of re-summing. See the entering and leaving cells light up and the best window lock in — plus the fixed-vs-variable window theory, a runnable challenge and a quiz. - [The Standoff: N-Queens](https://vibeengines.com/algorithm/n-queens): Don't memorize backtracking — watch it try, clash, and undo. Place queens on a board so none attack each other, one column at a time: try a safe row, recurse, and when a column has no safe square, back up and move the previous queen. See placements go down, conflicts flash red, and the search backtrack its way to a solution — plus the pruning theory, a runnable challenge and a quiz. - [The Instant Lookup: Hash Table](https://vibeengines.com/algorithm/hash-table): Don't memorize the hash table — watch it drop keys into buckets. See a hash function scatter names across an array in O(1), then feed it a collision and watch two keys chain in the same bucket — the reason lookups are usually instant but degrade when the table fills. Hashing, collisions, chaining and the load factor — plus full theory, a runnable challenge and a quiz. - [The Chain of Nodes: Linked List](https://vibeengines.com/algorithm/linked-list): Don't memorize the linked list — watch the pointers move. Insert at the head in O(1), delete a node by re-pointing around it, and reverse the whole list by flipping every arrow. Nodes, next-pointers and the O(n) walk — plus full theory, a worked trace and a quiz. - [LIFO & FIFO: Stack & Queue](https://vibeengines.com/algorithm/stack-queue): Don't memorize stacks and queues — watch them fill and drain side by side. A stack pushes and pops at the top (last in, first out); a queue adds at the back and removes at the front (first in, first out). The two O(1) containers behind undo, recursion, BFS and scheduling — plus full theory, a worked trace and a quiz. - [The Ordered Tree: Binary Search Tree](https://vibeengines.com/algorithm/binary-search-tree): Don't memorize the BST — watch it grow. Insert values (smaller left, larger right) so the tree stays sorted, search one path down in O(log n), then feed it sorted input and watch it collapse into a lopsided list — the reason self-balancing trees exist. Plus full theory, a worked trace and a quiz. - [The Segment Tree](https://vibeengines.com/algorithm/segment-tree): Don't memorize the segment tree — watch it answer ranges in log time. Each node stores an interval's sum, so a range-sum query combines a handful of covering nodes in O(log n), and a point update fixes one leaf and ripples to the root — also O(log n). The mutable cousin of the prefix sum — plus full theory, a worked trace and a quiz. - [The Closing Gap: Two Pointers](https://vibeengines.com/algorithm/two-pointers): Don't memorize the two-pointer trick — watch the gap close. On a sorted array, a left and right pointer converge to find a target pair: too big, pull right in; too small, push left out. It turns an O(n²) double loop into one O(n) pass — plus full theory, a worked trace and a quiz. - [The Running Total: Prefix Sums](https://vibeengines.com/algorithm/prefix-sums): Don't memorize prefix sums — watch the running total build. Precompute cumulative sums once in O(n), then answer any range-sum query in O(1) with a single subtraction: sum(i..j) = P[j] − P[i−1]. The trick behind range problems and 2-D image sums — plus full theory, a worked trace and a quiz. - [The Best Streak: Kadane's Algorithm](https://vibeengines.com/algorithm/kadane): Don't memorize Kadane's algorithm — watch the best streak emerge. Find the maximum-sum contiguous subarray in one pass: keep a running sum, drop it the moment it turns negative, and remember the best. The elegant O(n) DP one-liner — plus full theory, a worked trace and a quiz. - [The Loaded Bag: 0/1 Knapsack](https://vibeengines.com/algorithm/knapsack): Don't memorize the knapsack DP — watch the table fill. Maximize value under a weight limit: each cell asks take it or leave it, dp[i][w] = max(leave, value + dp[i-1][w-weight]). Fill the grid, then trace back which items were picked. The canonical DP table — plus full theory, a worked trace and a quiz. - [The Rolling Hash: Rabin-Karp](https://vibeengines.com/algorithm/rabin-karp): Don't memorize Rabin-Karp — watch the hash roll. Find a pattern in text by hashing each window and comparing numbers, rolling the hash forward in O(1): drop the leaving char, add the entering one. On a hash match, verify the characters. The fingerprinting idea behind plagiarism and dedup — plus full theory, a worked trace and a quiz. - [No Comparisons: Counting & Radix Sort](https://vibeengines.com/algorithm/counting-sort): Don't memorize counting sort — watch it sort without a single comparison. Tally how many times each value appears, then emit the values in order straight from the counts — O(n + k), the non-comparison sort that beats the O(n log n) barrier for bounded keys (and the stable pass inside radix sort). Plus full theory, a worked trace and a quiz. - [The Fewest Coins: Coin Change](https://vibeengines.com/algorithm/coin-change): Don't memorize coin change — watch the table fill. Find the fewest coins that make an amount by building the best answer for every amount up from 0: dp[a] = 1 + min over coins of dp[a-coin]. See why grabbing the biggest coin (greedy) fails and DP gets it right — plus full theory, a worked trace and a quiz. - [The Longest Climb: Longest Increasing Subsequence](https://vibeengines.com/algorithm/longest-increasing-subsequence): Don't memorize the LIS — watch it build. For each element, the longest increasing run ending there is one plus the best run ending on an earlier, smaller element: dp[i] = 1 + max(dp[j] for j