AI Systems

An AI feature breaks in ways the demo never shows: the instruction falls off the end of the context, a one-byte change empties the cache, retrieval answers from half a table, the loss turns to NaN. Each lesson here shows one of those breaks in a simulation, then the change that holds.

01
TOKENISATION
The prompt fits in characters, and the instruction falls off the front
L215 MIN
02
LLM RATE LIMITS
Under the request limit, out of tokens, and the retries make it worse
L215 MIN
03
PROMPT CACHE PREFIX
One changed byte at the top, and the whole cache misses
L215 MIN
04
RAG CHUNKING
The bot quoted the right table and gave the wrong fee
L215 MIN
05
HNSW RECALL
The index got worse and the latency graph got better
L216 MIN
06
KV CACHE BATCHING
The batch waits for its longest request, and the memory waits for tokens that never come
L218 MIN
07
SPECULATIVE DECODING
A draft that guesses wrong costs more than it saves
L216 MIN
08
LEARNING RATE
Too big blows up, too small never arrives, and the start is the steepest part
L216 MIN
09
FP16 OVERFLOW
Sixteen bits, 65,504, and a loss that turns to NaN
L216 MIN
10
DATA LEAKAGE
100% on the test set, half right in production
L214 MIN