/Learn
Deep dives

Under the hood.

Panels push past the boxes on your diagram. Go one level down: each component's real run, internal states, code, technology choices and interview questions.

Mobile components · low-level design

5 pages

How the parts inside an offline-first app actually work, with production code.

AI handbook

7 pages

Internals, acceleration, retrieval, customisation, agents, integration and team adoption.

AI internals

How an LLM works inside

LLMs map a token sequence to a probability for every possible next token. Generation repeats that function, appending one token at a time. Latency, cost, hallucination and context limits all follow…

Read the deep dive →
AI acceleration

Making inference fast and cheap

Inference limits come in three kinds: GPU compute during prefill, memory bandwidth during decode, and memory capacity for weights and KV cache. Each acceleration technique relaxes one: smaller numb…

Read the deep dive →
AI retrieval

Embeddings and vector search

Embedding models turn text, images or audio into vectors, so similar meanings land close together. Approximate indexes find the nearest vectors quickly. Together they power semantic search, recomme…

Read the deep dive →
AI customisation

Prompting, RAG or fine-tuning?

Three levers fit a general model to your product: better prompts, retrieval at query time, and new weights. Prompts and retrieval change what the model sees; fine-tuning changes how it behaves.

Read the deep dive →
AI integrations

Tool use, agents and MCP

Tool use lets a model call your functions: it outputs a structured request, your code runs it, and the result returns to the conversation. Agents loop that pattern towards a goal. MCP standardises …

Read the deep dive →
AI integration patterns

Integrating LLMs into products

LLM features behave like ordinary software with one unreliable, slow, expensive dependency. The patterns from payments or search apply: a gateway, contracts, retries, fallbacks, caching, budgets an…

Read the deep dive →
AI leadership

Using AI to accelerate engineering teams

AI adoption questions test principal engineers: how AI changes the way teams build, and how you roll it out responsibly. Cover tools, workflow, guardrails, measurement and culture, not just which a…

Read the deep dive →

AI systems deep dives

Serving, retrieval, fine-tuning, kernels
Tier 2 · Mechanisms · 15 minContinuous Batching & Iteration-Level SchedulingIteration-level scheduling ends the wait for a batch's longest request; prefill stalls become the next bottleneck.Tier 1 · Whole picture · 10 minvLLM Automatic Prefix Caching ArchitectureChained block hashes skip prefill for shared system prompts, and salts keep tenants apart.Tier 2 · Mechanisms · 14 minParent-Child Hierarchical Context RetrievalEmbed small chunks for precise matching, and send large parents to the model for enough context.Tier 1 · Whole picture · 10 minSelective Context Window Token CompressionSpend the token budget on evidence: prune sentences and summarise history before they reach the model.Tier 3 · Edge cases · 15 minQLoRA NormalFloat4 & Double QuantizationNF4 and double quantisation shrink a 7B base to about 3.4 GiB, so training fits a small GPU.Tier 3 · Edge cases · 10 minUnsloth Gradient Calculation AccelerationUnsloth claims faster, lighter fine-tuning through patched model code. Verify its numbers on your own hardware.Tier 1 · Whole picture · 10 minTriton Compiler JIT Codegen PipelineFollows one Python function down to GPU binary, which explains caching, specialisation and autotuning.Tier 1 · Whole picture · 12 minPrompt Patterns: Chain of Thought, Few-Shot, Structured OutputFour patterns cover most prompts. Test each against an eval set rather than trusting folklore.Tier 1 · Whole picture · 12 minCLIP and ViT Multimodal EmbeddingsCLIP places images and text in one vector space, which enables image search with no labels.Tier 2 · Mechanisms · 15 minApp Startup: Cold Start From Tap to First FrameStartup is the first performance number users feel, and most of it is work you chose to do too early.Tier 2 · Mechanisms · 15 minMobile Observability: Crashes, ANRs, Traces and Rollout GatesYou cannot roll back a phone, so telemetry has to catch a bad release while only 1% of users have it.Tier 2 · Mechanisms · 15 minMobile Security: Tokens, Keystore, Pinning and TamperingAssume the phone can be lost, rooted or reverse-engineered, then decide what an attacker still cannot do.Tier 2 · Mechanisms · 15 minReact Native New Architecture: JSI, Fabric, TurboModules and ThreadsMost older React Native advice is about the bridge. Knowing what replaced it shows which advice still holds.Tier 2 · Mechanisms · 15 minReact Native State: Server Cache, Client Store and Render StormsPutting every kind of state in one global store makes one change redraw half the screen.Tier 2 · Mechanisms · 15 minModular React Native for Many Apps: The Modularity LadderCodebases rarely fail from network speed. They fail from merge conflicts and features that can't be removed.Tier 3 · Edge cases · 15 minMemory Leaks in React Native: Three Heaps, One StaircaseA leak can hide in the JavaScript heap, the native heap or the boundary between them, and each needs a different tool.Tier 3 · Edge cases · 20 minOffline Sync in React Native: What to Persist and WhereA queue held in memory loses unsent changes when the OS kills the app. Persist the mutations, and keep them atomic with the local write.Tier 3 · Edge cases · 15 minThe 95/5 Rule and Performance Budgets in CIMost code can stay in React Native. A few pieces belong in native code, and CI should stop performance from slipping.
AI Engineer · deep dives