← all posts
§020 · BlogDevelopment

Building Production Ready AI Applications with Claude APIs.

A demo takes an afternoon. Production takes the things nobody demos: retries, evals, cost control, and a plan for the day the model changes.

9 min read

Demo to production
4-6 weeks
Unclear
Cost per request
Tracked per feature
Unmeasured
Regression detection
Eval suite
User reports

The first version always works.

You wire up the API, write a prompt, and the output looks great.

Then a user sends something you did not anticipate, and there is no fallback.

Then the bill arrives and nobody can say which feature caused it.

Production is not a better prompt. It is the scaffolding around the prompt.

§01 · The problem

Where the time actually goes.

  1. 01No evaluation suite before shipping
  2. 02Prompts stored in code with no versioning
  3. 03No timeout, retry, or fallback path
  4. 04Streaming bolted on after launch
  5. 05Cost untracked at the feature level
  6. 06No plan for prompt drift when models update

Every one of these is invisible in a demo and unavoidable in production.

§02 · The mechanism

The AI workflow.

  1. 01

    Define the task and success criteria

    Scoping
  2. 02

    Build the eval set before the feature

    Setup
  3. 03

    Wire the API with retries and timeouts

    Development
  4. 04

    Add guardrails and a fallback path

    Development
  5. 05

    Instrument cost and latency per call

    Automation
  6. 06

    Run evals on every prompt change

    Validation

A person closes the loop: the workflow ends on a human or a check against a defined outcome.

Scoping
A decision about what is in and out
Setup
One-time configuration, done before the loop runs
Development
Engineering work inside the workflow
Automation
Deterministic. No model involved
Validation
Checking the result against a defined outcome

§03 · The difference

Before vs after.

BeforeAfter
Prompt written directly in the handlerPrompts versioned like any other artifact
Quality judged by eyeballing outputsEval suite scores every change
One failure mode takes down the featureRetries, timeouts, and a graceful fallback
Cost discovered on the monthly invoiceCost tracked per feature and per user
Model update silently changes behaviourModel updates gated behind evals
Rollback means reverting a deployRollback is a config change

§04 · The measure

Time saved.

TaskBeforeWith AI
Prompt change confidenceHopeEval score
Failure handlingNoneRetry and fallback
Cost attributionWhole accountPer feature
Demo to productionUnclear4-6 weeks

Continue reading

Tell us what you’re building.

Share a few details about what you need, and we’ll get back to you with a quotation.