The Applied AI Handbook
A six-stage handbook for shipping applied AI: decide, design, build, evaluate, operate, cost, each linked to the reference material behind it.
143 entries across 11 sections: every insight, case study, comparison, pattern, failure mode, and reference page in one browsable index.
Every entry below has a Markdown twin. Add .md to its URL to read the plain version. See /llms.txt for the full rule.
Showing all 143 entries
The twelve flagship guides. Read one front to back before diving into the reference material below.
A six-stage handbook for shipping applied AI: decide, design, build, evaluate, operate, cost, each linked to the reference material behind it.
Should we build this with AI at all: build, buy, or skip?
What shape is the system: pipeline, agent, retrieval, or none of the above?
How do we get from a working notebook to a deployable service?
How do we know it works, and how do we keep knowing after every change?
What breaks in production, and how do we see it before the user does?
What will this actually cost to run, and where does the spend hide?
What InfoSec, Privacy, Risk and Procurement ask before an AI feature ships. Each answer comes with the control and the evidence that pass the gate.
The operating model for delivery with a fleet of coding agents. It has six control surfaces and 22 practices, plus the metrics that catch review debt early.
How to know an AI system works before it ships. Read the eval layers, the checks behind them, and the ways an LLM judge lies.
Agents fail at the tool interface more often than at the model. The design rules for building an interface that holds up in production.
How to interrogate any AI delivery partner, us included, across every gate that matters, and the cases where we're the wrong call.
Where AI spend goes, the levers that move it, and the ways a cost estimate can be wrong before you commit budget.
The standing regime that has to hold a year after the security review passes. Who is accountable, and how to prove the system behaves.
How to ship a change to an AI system, ramp it safely, and reverse it fast if it turns out to be wrong.
The pilot worked. Here is how the rest of your engineers start using it, and the numbers that separate real adoption from seat activation.
MCPMCP is an open standard for connecting LLM applications to tools and data sources. standardizes the wire format. Identity, the catalog and the trust boundary are still yours to build, plus a ten-question gate for a new server.
What occupies a context windowThe context window is the maximum text, measured in tokens, a model can consider at once. at every step of a long run, and how to budget, compact, isolate and measure it before it fails.
Six reference architectures for the systems we build. They sit one level above the patterns below.
All architectures →Answer questions from your own documents and cite the source. The model does not answer from its training data.
An agent that works a queue of cases end to end. It runs in a bounded loop. A human checkpoint covers any action it cannot cleanly undo.
Turn inbound documents into structured records. A person reviews only the cases where the model is unsure.
An assistant embedded in a product you already ship. It is scoped to the signed-in user's own data and permissions.
One call site in front of every model provider. A price change or an outage becomes a config change.
A control plane for running many coding agents at once. The agents do not collide on the same files. You can see what each one costs.
Dated articles on shipping applied AI. What breaks and how to design around it.
All insights →A coding agent optimises for the check and skips the goal. Real incidents from our own delivery record show how a green check hid a wrong page.
Regulation (EU) 2026/1744 pushed the AI Act's high-risk deadline to December 2027. What moved, what didn't, and why the old schedule still pays off.
Prompt injectionPrompt injection is untrusted input crafted to override a model's system prompt or task. can't be filtered away: the model can't reliably tell instructions from data. This is the threat model and the controls that hold up.
An agent that nails the demo stalls in production because reliability compounds across steps. We cover the math, the failure modes, and how to ship anyway.
A reproducible benchmark of cost per successful outcome across four common AI workloads, with every token assumption, price, and overhead multiplier shown.
Models change under you every few months: price, quality, and capability. So we never hardcode a single provider into a client's feature.
Retrieval that looks flawless on ten clean PDFs falls apart on a real corpus. We explain why, and what a retrieval eval requires.
Token costs that look trivial in a demo compound fast at scale. Make cost a first-class metric instead of a surprise on the invoice.
Shipping an AI feature without an eval suiteAn eval suite is a versioned set of test cases that measures whether outputs are good. in CI means every prompt tweak is a guess. This piece lists what an eval suite needs to cover.
A technically honest framework for deciding whether an AI initiative should be built in-house, bought off the shelf, or skipped entirely this year.
The gap between a working AI demo and a production feature is auth, latency, cost and fallbacks. We close it without a rewrite.
Decision guides for the architecture calls that come up on every engagement.
All comparisons →Agentic autonomy and deterministic pipelines aren't a spectrum of ambition. They trade flexibility against reliability, and your workflow decides which.
Self-hosting an open-weight model looks cheaper on paper than it behaves in practice. The real tradeoff against a frontier API, and when each one is right.
Retrieval and fine-tuningFine-tuning trains a model's weights on your own examples, changing its behavior directly. solve different problems but get reached for interchangeably. How to tell which one your case needs, and why we default to retrieval.
A dedicated vector database is a bigger commitment than most retrieval workloads need on day one. This piece shows how to tell if pgvector covers your case.
Engagement write-ups: the problem, what we built, and the measured outcome.
All case studies →A growth-equity firm's term sheet on an 'AI-native' SaaS target got repriced after a two-week check found $1.4M of hidden re-platform cost.
A healthtech's extraction model dazzled in a notebook, then hallucinated on real traffic. An eval harness cut hallucinationsA hallucination is a confident, fluent output that is factually wrong or unsupported. from 12% to 3% in 8 weeks.
A Series B fintech's LLM spend outran revenue on one provider. Model-agnostic routing cut unit cost, vendor risk, and closed a data-residency gap.
A SaaS support platform swapped a keyword search widget for a tenant-isolated retrieval pipeline, cutting escalations and response time with no new headcount.
Named, opinionated patterns for building AI systems that survive production.
All patterns →A fast, cheap classifier routes each request to one narrow specialist agent.
A bounded agent loop runs under an explicit step budget and token ceiling.
Chunk boundaries follow the document's own structure, such as headings and table rows.
A cheap first pass pulls 50 to 100 candidate documents.
The ingest pipeline subscribes to change events from the source system.
A strict JSON schema defines every tool argument.
Each tool gets the narrowest permission its task needs.
A fixed set of human-labelled real cases runs in CI on every prompt or model change.
One trace ID follows a single request across every hop, from retrieval to each model call and tool call.
A cheap, fast model tries every request first.
Put invariant content first in the prompt and per-request content last, so the shared prefix stays byte-identical and the cache hits.
Concrete ways production AI systems break, each with symptoms, root cause, and a fix.
All failure modes →Your retrieval index was built once at ingest and never told the source changed. When a document is edited or deleted, nothing re-embeds the new version or tombstones the old chunk. The stale vector keeps scoring well and keeps getting served with confidence, giving the reader no signal that it is out of date.
The answer exists in the source, but a fixed-size chunker cut it in half at ingest time. A table row lost its header. A procedure lost its trigger condition. Each half scores weakly on its own, the ranker drops both, and retrieval reports nothing when the document plainly contains the answer.
Cosine similarity rewards topical resemblance, not correctness. It can rank a document about the wrong product or the wrong date above the one that answers the query. It can do the same for the negated version of a claim. Embeddings capture topical similarity far more reliably than they capture identifiers, negation, or numbers.
The agent has no step budget, no token budget, and no way to recognize it is stuck. A failing tool call stays in its context and keeps looking like a reasonable next try. The agent keeps trying variations of the same failed approach. Something external, such as a timeout or a human, finally stops it.
Loose tool schemas (free-form string IDs, everything optional) give the model room to fill a gap with something plausible-looking instead of something real. With no server-side validation catching the mismatch before execution, a confidently invented ID reaches a system that expects a real one.
The tool returned HTTP 200 with an error message in the body, or an empty result set. The agent treated the absence of data as evidence and missed the failure. Nothing in the response forced a distinction between "nothing matched" and "something broke."
As the conversation grows, a naive truncation strategy drops the oldest messages to stay under the context window. The oldest messages usually hold the system prompt and the original task state. The agent keeps running with no memory of what it was supposed to do.
Without a labelled eval set, the change was graded against whatever two or three examples the author happened to have open. That is not a test. It's an anecdote. A regression anywhere outside that narrow, unrepresentative sample ships straight to production undetected.
A judge from the same model family as the generator tends to rate that family's output favorably. This is self-preference bias. A single vague rubric ('is this good?') collapses almost everything to a passing score. The eval suite then cannot tell a real regression from noise.
The estimate priced the happy path: one clean call per outcome. Production reality includes retries on malformed or rate-limited calls. It includes fallbacks to a larger model when the first attempt fails. It also includes agent loops that make several calls per completed task. Every one of those multiplies calls per successful outcome without multiplying the original per-token estimate.
A dynamic prefix changes the start of the prompt on every call. Examples are a timestamp, a per-user greeting, a reordered tool list, retrieved chunks placed before the static instructions. Prompt caching only pays off when the shared prefix is byte-identical across requests. One volatile token near the front busts the whole cache.
Yes. Retrieved content arrives on the same channel as instructions. A document, ticket, or webpage crafted or compromised to contain commands can make the model execute them with its real tool permissions. The system has no built-in way to tell 'instruction from us' apart from 'text we retrieved.'
Free, self-serve tools and fixed-scope diagnostics for scoping AI work before you commit budget.
All tools →What AI costs to run in production.
A fast, honest read on whether your data, infra, and process are ready to ship AI.
Which system shape to build, from seven questions about the problem.
A fixed-scope, fixed-fee read on whether you’re actually ready to ship AI.
An investor-grade read on a target’s AI claims, before you commit capital.
Guides, architectures, comparisons, insights, case studies, patterns, failure modes and tools grouped by the six themes that recur across engagements.
All topics →Plain-English definitions for the AI engineering vocabulary that matters.
All glossary terms →Who we are and how an engagement runs.
No entries match that combination. Clear a filter to see more.
Source: https://customlabs.io/library/