Learn
3556 pages on how language models behave at inference time, and what that costs.
LLM fundamentals & architecture
What a language model actually does when it answers you, and which parts of the architecture you can feel in latency, quality and cost.
Tokens, tokenization & context windows
The unit you are billed in, the limit you keep hitting, and the arithmetic that connects the two.
Prompt engineering
Which prompting techniques actually change a model's output, which ones better models absorbed, and how to tell the difference on your own workload.
Reasoning models & test-time compute
What changes when a model spends tokens thinking before it answers — in the bill, in the latency, and in the set of tasks that actually get better.
Multimodal AI: vision, audio, video
How models take in pixels, audio and frames — what that costs, where it fails, and which parts of the job still belong to a specialised tool.
RAG & retrieval
How to put your own documents in front of a model: chunking, ranking, filtering, evaluating and paying for the pipeline that does it.
Embeddings & vector search
How text becomes a vector, what nearness in that space does and does not mean, and what it costs to store and search a few hundred million of them.
AI agents & tool use
What an agent actually is once you strip the marketing off it: a loop, a set of tools, and a budget — plus everything that goes wrong when you run one against production.
Structured output & function calling
How to make a next-token predictor emit JSON your program can rely on — what each enforcement mechanism actually guarantees, and what you still have to check yourself.
Fine-tuning & post-training
When changing a model's weights is the right answer, what each method actually costs, and the failure modes that make most fine-tunes a waste of a fortnight.
Local inference errors, string by string
The exact errors local runtimes emit, what each one means, and the fix — starting from the text you pasted into search.
Running local models day to day
Serving, securing, benchmarking and living with a local model — the operational questions that come after it loads.
Testing code that calls an LLM
Unit tests around a non-deterministic dependency — stubbing, recording and asserting on the parts that are yours rather than the model's.
Snapshot and property testing for model output
Golden files, fuzzy matching, invariants and metamorphic relations — how to assert on text that is never byte-identical twice.
Regression suites for prompts
Sizing, scoping and running a suite against a prompt that changes weekly, and why a green suite still misses regressions.
Eval gates in CI
Blocking a merge on a score — where the gate goes, what it costs to run, and how to keep it from becoming the thing everyone overrides.
Flaky tests against a model
Telling a flaky test from a real regression, and what to do with the ones you cannot make deterministic.
Determinism and the cost of testing
Temperature, seeds, fixtures and tiers — making tests repeatable, and not paying twice for the same assertion.
Contract and streaming tests
Proving a provider's API is shaped the way your code assumes, including the streaming path where most of the surprises live.
Testing tool calls and retrieval
Asserting on which tool ran, what it was given, when the loop stopped, and whether the retriever still returns what it did.
Inference, serving & latency
What actually happens when a request reaches a model server, and how to reason about latency, throughput, limits and failures instead of guessing at them.
Rolling out a prompt change
Canaries, shadow traffic, feature flags and rollback — treating a prompt edit as a deploy, because it is one.
Testing AI systems in practice
The specific tests worth writing — timeouts, budgets, schemas, thread safety, redaction — each one a failure somebody has already shipped.
Forecasting a time series
Decomposition, change points, hierarchies and horizons — what the classical methods actually do, and where a foundation model changes the answer.
Machine learning on tabular data
Encoding, leakage, imbalance and validation on the data format most real problems arrive in, where gradient boosting still wins.
Geospatial data and models
Geocoding, spatial indexing, routing and satellite imagery — the coordinate systems and accuracy tiers that decide whether an answer is usable.
Understanding audio that is not speech
Tagging, embedding and anomaly detection over sound — music, machinery, wildlife and everything that is not a transcript.
Understanding video
Frames, shots, tracking and moments — how a model gets from a file to an answer, and what compression and sampling cost you.
Core computer vision tasks
Detection, segmentation, pose and similarity — what each task actually outputs, and why a classifier that tests well still fails in production.
Machine learning on graphs
Embeddings, GNNs, sampling and link prediction — modelling data whose structure is the signal.
Point clouds and 3D
LiDAR, meshes, registration and depth — representations where the choice of format decides what you can compute.
Evaluation, benchmarks & LLM-as-judge
How to find out whether a model is good at your task, when the public numbers stop being evidence, and how to grade at scale without lying to yourself.
Sensor and IoT data
Sampling rates, drift, fusion and edge inference — modelling telemetry from devices that are unreliable by nature.
Logs and event streams
Parsing, clustering, windowing and burst detection over high-volume machine output.
Models over biological sequences
DNA, RNA and protein — alignment, variant calling, embeddings and what a protein language model is actually trained on.
Machine learning on molecules
Fingerprints, SMILES, property prediction and screening — representing chemistry so a model can compute over it.
Embedding and searching code
Indexing a repository by meaning — chunk granularity, cross-language indexes, call graphs and keeping the index fresh.
Extracting invoices and purchase orders
Line items, tax lines, currencies and PO matching — the highest-volume extraction problem there is, and the one with the most edge cases per field.
Receipts, statements and tax forms
Thermal receipts, bank statements and the fixed-box tax forms where a field's meaning is defined by a government schema rather than a layout.
Insurance policies and contracts
Coverage limits, exclusions and the clause types whose absence matters as much as their text.
Deeds, court filings and patents
Public records with centuries-old conventions — legal descriptions, docket structure and priority dates.
Extracting from medical records
Coded clinical data — diagnoses, medications, labs and vitals — where the coding system is the hard part and the handling obligations are real.
Observability & LLMOps
How to see what your model calls are doing in production — what to log, how to trace it, what to alert on, and how to attribute the bill.
CVs, certificates and identity documents
Papers that assert who someone is or what they have done, including the machine-readable zones designed to be parsed.
Shipping, customs and technical documents
Bills of lading, customs declarations, drawings and datasheets — documents built around numbering standards and tables rather than prose.
Meetings, email, chat and filled-in forms
Extraction from documents with no fixed layout at all — threads, transcripts, survey text and handwriting.
Building an extraction pipeline
The machinery every extraction shares: reading order, schema design, validation rules, per-field confidence, review queues and audit trails.
Business, property and inspection documents
Certificates, appraisals, inspection reports and the operational paperwork that runs a company.
Contract clauses and insurance claims
Clause-level extraction where the legal meaning of a phrase decides the field, and the claims documents built on top of it.
Regulated and compliance documents
Chain of custody, certificates of analysis, labels and package inserts — documents whose fields exist because a regulator requires them.
Consumer, travel and closing documents
Vehicle titles, folios, itineraries and mortgage closing statements — where a named form has numbered lines that must reconcile.
Mapping one chat API onto another
Field by field: messages, system prompts, stop sequences, tool schemas, streaming events, usage objects and finish reasons.
SDK and framework migrations
The named version jumps that break a build — openai-python v0 to v1, LangChain to LCEL, LlamaIndex Settings, the Vercel AI SDK majors.
Hallucination & failure modes
Why a language model states false things fluently, which distinct failures the word hides, and how to detect each one in your own system rather than arguing about it.
Re-embedding and model deprecation
What forces a full re-index, what a deprecation notice actually commits a vendor to, and how to plan around both.
Cutting over between providers
Dual-running, fine-tune translation, prompt portability and the cost re-baselining that follows a switch.
Parity gaps, shims and legacy endpoints
What to do when the target provider cannot do what the source could, and how to leave a completions-era API behind.
Moving between model versions
Model name strings, minor version bumps and leaving a managed assistants API for your own loop.
Migrating vector stores and caches
Moving vectors, metadata filters and embedding caches without silently degrading retrieval.
Mapping capabilities and parameters
Logit bias, logprobs, seeds, caching, structured output, context windows — the features that do not map one to one.
Migrating pipelines and agents
Batch jobs, eval harnesses, guardrails, tool definitions and few-shot examples across a provider boundary.
Contracts, runbooks and rollback
What a clause commits you to, what a runbook must contain, and when to trigger a rollback.
Auditing a codebase before a cutover
Finding every hardcoded assumption, centralising configuration, and load-testing the target before traffic moves.
Compliance and fine-tune migration
Vendor assessments, access control, training configs and what a fine-tune's metrics mean on a new base model.
LLM cost engineering
What an inference bill is actually made of, and the arithmetic for deciding which change to it is worth an engineer's week.
Routing, cost tracking and multi-tenancy
Router config, in-flight requests during a cutover, budget caps, PII handling and per-tenant provider choice.
What a migration does to your prompts
Seventy specific things that change when the model underneath a prompt changes — formatting habits, refusals, arithmetic, personas, length.
AI security & prompt injection
The vulnerability classes that come with putting a language model in production, and the architectural controls that actually reduce them.
Privacy, compliance & data residency
Where a prompt physically goes, who processes it on the way, what is kept and for how long — and which of those are decisions you control.
AI governance, policy & society
How the rules around AI are actually built — which institutions have real authority, how each policy instrument bites, and where the evidence is genuinely unsettled.
Building reliable AI applications
The distributed-systems patterns an AI feature needs — idempotency, deadlines, breakers, queues, degradation — and the parts of each that change when the dependency is slow, non-deterministic and billed per attempt.
AI hardware, GPUs & compute
The arithmetic that decides what a model costs to run: memory bandwidth, VRAM, interconnect and utilisation, derived rather than benchmarked.
Open-weight models & local inference
What you can actually run on hardware you control, what the licence actually lets you do with it, and how to work both out from first principles rather than from folklore.
AI for developers & coding agents
What a model can and cannot do to a codebase, and the loops, context and review workflow that decide which of those you get.
AI in industry: vertical playbooks
What changes when a language model meets a specific industry: the sign-off that has to happen, the format the data arrives in, the metric that decides whether it works, and the failure that costs money.
AGI, superintelligence, alignment & the long future
The arguments about where AI is going, stated at the strength their proponents state them — with the definitions pinned down, the evidence attributed, and the predictions labelled as predictions.
- What Would Count as AGI? Definitions That Can Be Tested
- The Technological Singularity, Explained
- Intelligence Explosion: The Argument and Its Weak Points
37 more in agi, superintelligence, alignment & the long future →
Machine learning foundations
The layer under the language models: how a model is fitted, how it fails, and how you find out which of those is happening.
NLP fundamentals & classical tasks
The pre-2020 toolkit — tokenizing, BM25, taggers, classifiers, edit distance — and an honest account of which parts a language model has replaced and which parts still win.
Data engineering for AI
Getting documents out of the formats they arrive in and into a store you can index, update and reproduce — the part of an AI feature that is most of the work and none of the demos.
Synthetic data & dataset curation
How to generate, filter, deduplicate and document a dataset — and what the published research actually says about training on data a model produced.
AI product design & UX
How to design an interface around a component that is slow, non-deterministic, sometimes confidently wrong, and billed per interaction.
Search, ranking & recommendation
How a ranked list is built, measured and defended — the evaluation mathematics, the tuning loop and the product decisions that sit on top of whatever retrieval engine you chose.
Enterprise adoption & change management
The artefacts an AI programme actually runs on — the scoring rubric, the pilot charter, the budget structure, the risk register — rather than a maturity model.
AI careers, skills & teams
What the work in this field actually consists of, what each role produces, and how to learn, hire, interview for and survive it without believing anybody's forecast.
Reading AI research
How to read a machine learning paper well enough to tell a real result from a well-presented one, and what the field's landmark papers actually say.
AI in science & discovery
Where machine learning has genuinely changed how research gets done, described by the method and by the verification step that still has to happen.
Robotics & embodied AI
Why putting a model in a body is a different problem from putting one behind an API — the control deadline, the missing data, the simulation gap and the fact that failure is physical.
AI economics, markets & business models
The structure underneath the industry's numbers — where value is captured, why prices fall, and what a metered cost of goods does to a software business.
AI myths, hype & media literacy
How to read a claim about AI — from a launch post, a demo or a headline — by finding the step where the evidence stops supporting the conclusion.
Context engineering
What occupies the model's window on this request, in what order, assembled by what code, and what gets evicted when the next thing no longer fits.
Shipping AI features: patterns & anti-patterns
The decisions around shipping an AI feature — what to build first, which shape works, what not to build at all, and the anti-patterns that are attractive enough to cost you a quarter.
Build it: end-to-end AI tutorials
Twenty complete AI builds — architecture, the code that runs, the failure you will actually hit, and what the thing costs to keep running.
Python for AI: hands-on recipes
Twenty short Python recipes for calling, streaming, retrying, parsing, caching, testing and profiling language models, each ending in code that runs.
TypeScript, React and the web
Calling models from TypeScript and getting the tokens into a browser: streaming, cancellation, sanitising, auth, rate limits and the runtime limits you will hit.
Frameworks and SDKs
What each AI framework's core abstraction actually is, how a real project is structured around it, where the abstraction stops helping, and what it costs to leave.
Errors and troubleshooting
The error strings a model API actually returns, what the numbers inside them mean, and how to tell which of the causes you have before you start changing things.
AI facts, numbers and statistics
The numbers behind AI, either derived in front of you from first principles or traced to the publisher who actually produced them.
The history of AI
What the founding documents of artificial intelligence actually said, separated from the folklore that grew up around them.
The maths behind AI
The twenty pieces of maths that actually appear in a working language model, each derived on the page with arithmetic you can reproduce.
Architectures beyond the transformer
How the other neural architectures work — convolutions, recurrence, state space models, autoencoders, diffusion, splatting — and what each one traded to get what it got.
Reinforcement learning
The field behind RLHF, explained for an engineer who knows language models and has never trained an agent: policies, rewards, value, and the arithmetic underneath each.
Diffusion and generative media
How diffusion models turn noise into an image, what every dial in a generation UI multiplies, and the arithmetic behind the GPU-seconds each picture costs.
Speech, audio and voice engineering
How speech becomes tokens and tokens become speech, and the latency and cost arithmetic that decides whether a voice product feels human.
Benchmarks, one at a time
What each named LLM benchmark actually contains, the exact arithmetic that turns answers into a score, and what that score does and does not license you to conclude.
AI search visibility
How assistants find, fetch and cite pages — separating the mechanisms you can verify from the tactics that are only being sold.
Infrastructure and operations
Running AI systems that are already live: containers, Kubernetes, autoscaling, spot capacity, deploys, monitoring, runbooks and the quarterly capacity review.
Databases and storage for AI
Postgres, pgvector, SQLite, Redis and object storage for AI applications — real DDL, real index parameters, and the storage arithmetic worked out rather than asserted.
Knowledge graphs and structured knowledge
How to model, extract, resolve and query structured knowledge — with the queries that similarity search cannot answer, and the parts that break at scale.
Classical ML in production
The working practice of machine learning on tables: label definitions, leakage, calibration, thresholds and causal claims, worked with numbers.
Regulation, jurisdiction by jurisdiction
What the AI rules of each major jurisdiction actually require, which of them are in force, and the documents you need when somebody asks you to prove it.
Prompt recipes and pattern library
Twenty complete, copyable prompts — one per task — each annotated line by line, with the failure it prevents and the signal that says it has stopped working.
AI for people who do not write code
Methods for using AI well without programming: how to ask, how to check the answer, and where the honest limits are.
Writing, media and creative work
Where a language model genuinely helps a writer, where it flattens the work, and the specific edits and checks that tell the two apart.
Edge and on-device AI
Running models on phones, laptops, single-board computers and microcontrollers, where memory, power and bundle size are hard limits rather than line items.
Interpretability and model internals
What is actually inside a trained model, how researchers find out, and which of those techniques survive contact with a real system.
Field notes
First-hand accounts of building and running an LLM gateway, alongside the engineering procedures that came out of them.
OpenAI model behaviour
How OpenAI's models and API actually behave at the edges: context and output limits, caching thresholds, streaming event shapes, and the parameters whose documented meaning differs from the obvious reading.
Claude model behaviour
Anthropic's API as it behaves in practice — streaming event types, prefilling, token counting, tool use and the limits that shape how a Claude integration is written.
Gemini model behaviour
The Gemini API's own vocabulary — finishReason, safety settings, function-calling modes, stopSequences — and what each one does to a response you were expecting.
Llama model behaviour
Llama as a weights family rather than an endpoint: tokenizer, chat template, licence terms, context windows and what changes between versions.
Mistral model behaviour
Mistral's API and open weights — streaming shape, tool calling, function declines, and the parameters that behave differently from OpenAI's near-identical names.
Qwen model behaviour
The Qwen family's licences, sizes, sampling parameters and multilingual behaviour, for people running or calling them rather than reading about them.
DeepSeek model behaviour
DeepSeek's reasoning models and their distilled variants: how reasoning content is exposed, why the system prompt behaves unusually, and what each size actually holds.
Cohere model behaviour
Cohere's API on its own terms — its citation model, its RAG-shaped request format, rerank, and the parameters that have no equivalent elsewhere.
Grok model behaviour
xAI's API surface, its OpenAI-compatible edges and where that compatibility stops, version by documented version.
Small model behaviour
Phi and Gemma at the small end: what a 1B–4B model's context window, tokenizer and multimodal input actually cost, and where the small end stops being a smaller version of the large one.
Hybrid model architectures
Models that are not plain transformers — Mamba hybrids, sliding-window attention, mixture-of-experts routing — and the behaviour those choices produce at inference time.
Token cost by language and script
Why the same sentence costs a different number of tokens in different languages, derived per script from how the tokenizer was built rather than asserted from a table.
Transliteration, romanization and script handling
Moving text between scripts without losing what the original encoded — for search, for sorting, for forms, and for the systems downstream that only accept ASCII.
- How AI Converts Chinese Names to Pinyin
- Converting Japanese Text to Romaji With AI
- Romanizing Arabic Text for Search and Sorting
47 more in transliteration, romanization and script handling →
Locale-correct output
Dates, numbers, plurals, addresses and names as a locale actually writes them, and why a model that gets the language right still gets the format wrong.
Multilingual generation quality
Where AI-generated text in a language goes subtly wrong — gender, register, regional variety, spelling convention — and what causes each failure.
Multilingual pipelines
Building a pipeline that survives more than one language: prompt structure, code-switching, detection, routing and evaluation when the input is not English.
The EU AI Act, article by article
What each obligation in the AI Act actually requires, read from the instrument itself rather than from a summary of it — who it binds, when it bites, and what evidence satisfies it.
AI under the GDPR and EU data law
Where an AI system meets European data protection law: lawful basis, DPIAs, transfers, automated decisions, and what happens to a trained model when a subject exercises a right.
US AI regulation, state and sector
The patchwork as it actually stands — state statutes, sector regulators and agency guidance — each read from the text that binds rather than from the press release.
International AI governance and standards
AI rules and standards outside the EU and US, and the voluntary frameworks that increasingly function as the baseline a buyer asks you to meet.
AI litigation and enforcement
What courts and regulators have actually decided about AI so far, each case stated with its posture and its date, and what the ruling does and does not settle.
Running AI workloads on AWS
Bedrock, SageMaker and the serverless plumbing around them — what each service actually does to a model call, and which of them you do not need.
Running AI workloads on Google Cloud
Vertex AI, Cloud Run and BigQuery ML, read from the API and the quota page rather than from the console walkthrough.
Running AI workloads on Azure
Azure OpenAI deployments, AI Foundry and the surrounding compute — deployment types, quota, and the failure modes that only show up under load.
AI at the edge: Workers, Vercel and Netlify
What an edge runtime can and cannot do with a model call, and where the limits — CPU time, body size, function duration — actually bite.
Serving models on Kubernetes
GPU scheduling, autoscaling and container build decisions for model serving, at the level of the manifest that has to be correct.
Operating AI infrastructure
Queues, infrastructure as code, CI, spend control, private networking and secrets — the parts that decide whether a working deployment stays working.
Quantization formats and what they cost
GPTQ, AWQ, GGUF's K-quants and the rest — what each one actually does to the weights, and where the quality goes when it goes.
llama.cpp, flag by flag
The flags that decide whether a local model fits, runs fast, or silently truncates your context — read from the behaviour rather than the help text.
Ollama and the desktop local-model runtimes
Ollama, LM Studio, KoboldCpp, Jan, LocalAI and the rest — what each one sets on your behalf, and what it does not tell you it set.
Local models on Apple Silicon
MLX, unified memory and what a Mac can actually hold — where Apple Silicon wins for local inference and where it stops.
Hardware for local inference
Consumer GPUs, single-board computers and NPUs — what fits, what it costs, and which spec is the one that actually binds.
Running speech and embedding models locally
Whisper and the open embedding models on your own hardware — sizing them, serving them, and what quantizing them costs.
Model files, adapters and conversion
GGUF, safetensors, ONNX and LoRA adapters — converting between them, checking what you downloaded, and which conversions do not exist.
VRAM arithmetic for local models
How much memory a model and its context actually need, derived rather than guessed, and what happens at the moment it does not fit.