Skip to content
datarekha
Blog Production AI · GATE DA · how concepts actually work · Page 2 of 13

From theory to the systems that demand real understanding.

Long-form pieces on how production-AI teams orchestrate agents, serve models, and build the stack, plus GATE DA essays that turn probability, linear algebra, DBMS, ML, and AI into durable concepts.

295 posts · 20 categories
Data Engineering Aug 15, 2026

The shuffle is the bill

Two Spark jobs read the same data and write the same answer. One costs six times more. The difference is almost always a wide transformation nobody noticed.

12 min read Read
SQL Aug 15, 2026

Why your index isn't being used

You built the index. The planner ignored it. Five query shapes silently disable an index, and four of them are things you wrote without thinking.

11 min read Read
LLMs Jun 18, 2026

activation checkpointing makes GPU memory a scheduling decision

Large-model training is constrained by more than weights. Activation checkpointing changes which forward tensors survive, trading recomputation for a smaller peak-memory footprint.

9 min read Read
RAG Jun 18, 2026

RAG poisoning is an evidence-integrity problem

A retrieval system can reason perfectly from corrupted evidence. Defending RAG means governing what enters the corpus, preserving provenance, isolating tenants, and treating retrieved text as untrusted data.

10 min read Read
Infrastructure Jun 18, 2026

Six system-design boundaries that prevent category mistakes

Stateless vs stateful, Lambda vs ECS, database vs cache, queue vs stream, retrieval vs reranking, and monitoring vs tracing—explained as operational contracts.

11 min read Read
Agents Jun 18, 2026

Token theft in AI agents is an architecture failure

Prompt injection gets the attention, but credentials turn a confused model into an authenticated attacker. The fix is to keep tokens out of model context and authorize every action at runtime.

11 min read Read
Infrastructure Jun 12, 2026

How vLLM actually serves a 7B model

Follow one request through vLLM — the scheduler, the KV-cache blocks, prefill vs decode, and what happens when 90,000 tokens of cache no longer fit.

13 min read Read
Infrastructure Jun 12, 2026

The vector-search memory wall: why HNSW eats RAM, and how quantization cuts the bill 32×

HNSW is fast because the whole graph lives in RAM — which is exactly why it gets expensive. At 100M vectors you're paying for ~600GB of memory before you serve a single query. Here's the math, and how binary quantization plus reranking is rewriting the cost model in 2026.

11 min read Read
LLMs Jun 11, 2026

MHA, MQA, GQA, and MLA: attention efficiency trade-offs

MHA, MQA, GQA, and MLA offer different ways to shrink or restructure the KV cache for LLM inference. What each design trades in quality, compute, memory, and implementation complexity.

10 min read Read
ML Jun 10, 2026

AutoML raised the floor, not the ceiling

AutoML can make a strong tabular baseline cheap. AutoGluon's 2025 release notes report a benchmark result under a five-minute budget, but that vendor report is not evidence of a current 2026 leader. The ceiling still depends on trustworthy data, domain features, and problem framing.

9 min read Read
Agents Jun 10, 2026

Context engineering: why accumulated context can degrade your agent

For multi-step agents, context engineering complements prompt engineering by curating the smallest high-signal working set at each step. Accumulated or irrelevant context can degrade reliability even when it fits the window.

11 min read Read
Infrastructure Jun 10, 2026

Don't auto-ship retrained models: collapse, feedback, and the challenger gate

Retraining can produce a worse model—from bad data, a pipeline bug, or learning from outcomes collected under its own serving decisions. Champion-challenger automates retraining while limiting the blast radius of regressions.

9 min read Read
ML Jun 10, 2026

Feature engineering still matters on many tabular problems

On many medium-sized tabular problems, engineered, point-in-time features can matter more than switching among strong algorithms. This is an engineering heuristic, not a universal law; TabPFN's Nature benchmark result makes the raw-versus-engineered comparison worth testing rather than settling it in advance.

9 min read Read
Infrastructure Jun 10, 2026

GPU compute isn't always the bottleneck: why decode can become a memory problem

During decode, LLM serving can depend on both HBM capacity and bandwidth: every step reads model weights and the relevant KV state, with KV traffic becoming especially important for long contexts and larger batches. Paged allocation reduces wasted capacity, and continuous batching can improve throughput and utilization, depending on the workload and its compute, bandwidth, communication, and latency limits.

13 min read Read
Infrastructure Jun 10, 2026

Loading a model file can run code: MLSecOps in 2026

Downloading an untrusted pickle-backed artifact and loading it with an unrestricted or vulnerable deserializer can be as dangerous as running an untrusted script. Real malicious models have shipped on public hubs — here's the ML attack surface and the defenses that belong in your pipeline.

9 min read Read
Agents Jun 10, 2026

MCP is becoming the tool-integration boundary — now comes the hard part

MCP is becoming a common boundary for AI tools and data. The remaining work is making it trustworthy under real identity systems, retries, state, registries, optional UI, and long-running operations.

9 min read Read
Infrastructure Jun 10, 2026

When much of your traffic is easy: use routing to cut LLM costs

When much of your LLM traffic is easy, route easy requests to a cheaper model, escalate uncertain cases, and cache safe repeats—but measure successful tasks, because a cheap wrong answer is not a saving.

10 min read Read
Infrastructure Jun 10, 2026

Batch can be 100x cheaper for low-utilization, predictable workloads

The default mental model of 'serving a model' is a live API answering in milliseconds. For many predictable workloads, that is the expensive wrong choice — and the hybrid precompute-to-Redis pattern gives you batch economics with real-time lookup latency.

9 min read Read
Statistics Jun 10, 2026

Peeking makes A/B tests lie; CUPED reduces the traffic cost

Peeking can raise the false-positive rate from 5% to 26.1% in a specific small A/B-test simulation. Predeclared endpoints and sequential inference keep monitoring honest; CUPED reduces variance and traffic cost without fixing peeking.

9 min read Read
Agents Jun 10, 2026

Prompt injection is the SQL injection of the AI era

Both attacks come from the same root cause — the system can't separate trusted instructions from untrusted data. In agents it becomes a confused-deputy problem, and a single filter won't save you.

9 min read Read
LLMs Jun 10, 2026

Running an LLM on your laptop: GGUF, llama.cpp, and the Q-soup

A 7B model now fits on a laptop. GGUF, llama.cpp, and quantization tiers like Q4_K_M — decoded, so running LLMs locally stops being intimidating.

11 min read Read
Infrastructure Jun 10, 2026

Many ML data failures are silent: the case for data contracts

Many ML data-quality failures stay silent when inputs remain type-compatible but their meaning changes. An enforced contract can block declared, testable violations at a chosen boundary before they poison retraining or serving; semantic guarantees require explicit producer-side checks against canonical data, paired representations, trusted baselines, or an equivalent mechanism.

9 min read Read
ML Jun 10, 2026

You can't be fair three ways — and the EU AI Act clock is ticking

A concrete lending example separates demographic parity, equalized odds, predictive parity, and score calibration, then turns their trade-offs into an operational fairness and EU AI Act checklist.

9 min read Read
Infrastructure Jun 10, 2026

Your GPUs are mostly idle: FinOps for the AI era

A practical guide to the cost of GPU allocation, useful work, and the fixes that turn idle accelerator time into completed runs and successful inferences.

9 min read Read