Embeddings mathematically: what cosine similarity measures
The geometry of embedding space: why you normalise, what dimensionality really buys you, and the anisotropy problem nobody mentions.
Tag
Every article tagged Ai. For a structured path, browse Learn.
The geometry of embedding space: why you normalise, what dimensionality really buys you, and the anisotropy problem nobody mentions.
Queries, keys and values with real numbers. Why the scaling factor is sqrt(d_k), what multi-head attention buys, and how causal masking works.
A working decoder-only transformer in 120 lines. Pre-norm, residual streams, why the MLP is 4x wide, weight tying, stable initialisation.
An agent is a loop with tools and a stopping condition. Context growth, error handling, termination — and when to write a chain instead.
Tool calling fails at the interface, not the model. Schema design, descriptions, error contracts, and what MCP actually standardises.
Vibes do not scale and BLEU measures nothing you care about. Eval sets, LLM-as-judge without fooling yourself, and the biases that corrupt it.
Most RAG fails at retrieval, not generation. Build a golden set, measure recall@k, run chunking experiments, add a reranker when data says so.
Fine-tuning teaches behaviour, RAG supplies facts. A decision framework, the LoRA maths, real costs, and the cheaper ladder to climb first.
ANN search trades accuracy for speed. How HNSW graphs and IVF-PQ quantisation work, which knobs move recall, and how to choose an index.
Retrieval-augmented generation in plain Python: split a PDF into chunks, find the relevant ones, and let Claude answer using only those. No vector database required.
Asking a model to reply in JSON works until it does not. Learn why tool schemas beat prompt begging, and how to validate every response before it reaches your code.
BeginnerSend a prompt to an AI model from Python and print the reply — a short, beginner-friendly walkthrough with almost no setup drama.