CustomLabs
Library

Everything we've published.

142 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.

01 Start here #

The twelve flagship guides. Read one front to back before diving into the reference material below.

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.

01 Decide

Should we build this with AI at all: build, buy, or skip?

7 min read

02 Design

What shape is the system: pipeline, agent, retrieval, or none of the above?

8 min read

03 Build

How do we get from a working notebook to a deployable service?

6 min read

04 Evaluate

How do we know it works, and how do we keep knowing after every change?

6 min read

05 Operate

What breaks in production, and how do we see it before the user does?

8 min read

06 Cost

What will this actually cost to run, and where does the spend hide?

6 min read

AI Security Review

What InfoSec, Privacy, Risk and Procurement ask before an AI feature ships, and the control and evidence that gets you through each gate.

23 min read

The Agentic Delivery Playbook

The operating model for running delivery with a fleet of coding agents: six control surfaces and 22 practices, measured by the metrics that catch review debt early.

26 min read

The Eval Stack

How to know an AI system works before it ships: the eval layers, plus the ways an LLM judge can quietly lie to you.

21 min read

The Agent Tool Interface

Agents fail at the tool interface more often than at the model. The design rules for building an interface that holds up in production.

26 min read

Choosing an AI Delivery Partner

How to interrogate any AI delivery partner, us included, across every gate that matters. It ends with the cases where we're the wrong call.

28 min read

The AI Cost Model

Where AI spend actually goes, the levers that move it, and the ways a cost estimate can already be wrong before you commit budget.

28 min read

The AI Governance Layer

The standing regime that has to hold a year after the security review passes. Who is accountable, and how to prove the system behaves.

30 min read

The AI Release Path

How to ship a change to an AI system and ramp it safely. Reverse it fast if it turns out to be wrong.

34 min read

The Agent Adoption Playbook

The pilot worked. How the rest of your engineers actually start using it, and the numbers that separate real adoption from seat activation.

33 min read

MCP in Production

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.

42 min read

Context Engineering

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.

37 min read

02 Architectures #

Six reference architectures for the systems we actually build, one level up from the patterns below.

All architectures

A coding-agent delivery fleet

A control plane for running many coding agents at once without them colliding on the same files or losing track of what any of it costs.

7 min read

03 Insights #

Dated articles on shipping applied AI. What breaks and how to design around it.

All insights

Model-Agnostic by Design

Models change under you every few months: price, quality, and capability. Here's why we never hardcode a single provider into a client's feature.

7 min read

Your RAG Demo Lied to You

Retrieval that looks flawless on ten clean PDFs falls apart on a real corpus. Here's why, and what evaluating retrieval quality actually requires.

7 min read

04 Comparisons #

Decision guides for the architecture calls that come up on every engagement.

All comparisons

05 Case studies #

Engagement write-ups: the problem, what we built, and the measured outcome.

All case studies

06 Patterns #

Named, opinionated patterns for building AI systems that survive production.

All patterns

Intent router to specialists

A cheap, fast classifier reads each request and routes it to one narrow specialist agent, instead of one god-agent that carries every tool.

6 min read

Bounded agent loop

An agent loop runs under an explicit budget: a maximum step count, a token ceiling, and a wall-clock limit.

6 min read

Structure-aware chunking

Chunk boundaries follow the document's own structure: headings, table rows, list items, section boundaries, instead of a fixed token count.

5 min read

Retrieve-then-rerank

A cheap, high-recall first pass pulls a wide candidate set of 50 to 100 documents likely to contain the right answer.

5 min read

Change-data-capture ingest

The ingest pipeline subscribes to the actual change events of the source system, such as a webhook, a CMS publish hook, or a database trigger.

5 min read

Typed tool contract

Every tool argument is defined by a strict JSON schema: enums for known value sets, validated patterns for IDs, required fields where genuinely needed.

5 min read

Golden-set gate in CI

A fixed, human-labelled set of real cases runs automatically in CI on every prompt or model change.

5 min read

Trace-first observability

One trace ID follows a single request across every hop it takes: retrieval, every model call, every tool call.

5 min read

Model cascade

A cheap, fast model attempts every request first, and a validation signal decides whether that attempt is good enough to return.

5 min read

Stable-prefix prompt caching

The prompt is ordered with everything invariant across calls first: system instructions, tool definitions, few-shot examples.

5 min read

07 Failure modes #

Concrete ways production AI systems break, each with symptoms, root cause, and a fix.

All failure modes

Stale index serves deleted content

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.

4 min read

Chunk boundary splits the answer

The answer exists in the source, but a fixed-size chunker cut it in half at ingest time: a table row split from its header, a procedure split from 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.

4 min read

Similarity is not relevance

Cosine similarity rewards topical resemblance, not correctness. It can rank a document about the wrong product, the wrong date, or the negated version of a claim above the one that actually answers the query, because embeddings represent "about the same thing" far more reliably than they represent identifiers, negation, or numbers.

4 min read

Unbounded agent loop

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 thing to try, so it keeps trying variations of the same failed approach until something external (a timeout, a bill, a human) stops it.

4 min read

Tool argument hallucination

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.

4 min read

Silent tool failure

The tool returned HTTP 200 with an error message in the body, or an empty result set, and the agent read the absence of data as evidence rather than as a failure. Nothing in the response forced a distinction between "nothing matched" and "something broke."

4 min read

Context overflow drops the task

As the conversation grows, a naive truncation strategy drops the oldest messages to stay under the context window. The oldest messages are exactly where the system prompt and the original task state usually live, so the agent keeps running with no memory of what it was actually supposed to do.

4 min read

Vibes-based prompt regression

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.

Judge prefers its own output

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, so the eval suite stops being able to tell a real regression from noise.

4 min read

Retry-amplified spend

The estimate priced the happy path: one clean call per outcome. Production reality includes retries on malformed or rate-limited calls, fallbacks to a larger model when the first attempt fails, and 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.

4 min read

Prompt cache never hits

A dynamic prefix (a timestamp, a per-user greeting, a reordered tool list, retrieved chunks placed before the static instructions) changes the start of the prompt on every call. Prompt caching only pays off when the shared prefix is byte-identical across requests, and one volatile token near the front is enough to bust the whole cache.

4 min read

Injection via retrieved content

Yes. Retrieved content arrives on the same channel as instructions, so a document, ticket, or webpage crafted (or compromised) to contain commands can have 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.'

4 min read

08 Tools & diagnostics #

Free, self-serve tools and fixed-scope diagnostics for scoping AI work before you commit budget.

All tools

AI Cost Calculator

What AI actually costs to run in production — not the sticker price.

Architecture Picker

Which system shape you should actually build, from seven questions about the problem.

09 Topics #

Guides, architectures, comparisons, insights, case studies, patterns, failure modes and tools grouped by the six themes that recur across engagements.

All topics

10 Glossary #

Plain-English definitions for the AI engineering vocabulary that matters.

All glossary terms

11 The studio #

Who we are and how an engagement runs.

Source: https://customlabs.io/library/

navigate select esc close