AI Wisdom

AI Wisdom · Free resource · PDF

The Production-Ready AI System Checklist

The demo worked. Then real users arrived. A 6-page field guide to everything that takes an LLM + RAG system from demo to production, distilled from our featured deep dive.

Free. You also get the AI Wisdom newsletter; unsubscribe in one click.

What's inside

15 sections across 6 pages, grouped here into 10 parts

Every part at a glance: the idea as a diagram, plus two of its checks. Must-haves are marked in red, as they are in the PDF.

01

The production request path

Every hop between the user and the model, and the ones a demo skips.

One request, end to endThe gateway, intent routing, budget check and telemetry are what a demo leaves out.
flowchart LR
  U([User question]) --> G[Gateway<br/>auth, rate limit, tenant]
  G --> O{Intent}
  O -->|meaning| R[Hybrid search<br/>keyword + vector]
  O -->|count or report| S[SQL or filters]
  O -->|chat| D[Direct generation]
  R --> F[Rerank and filter]
  S --> F
  D --> F
  F --> B{Token budget}
  B -->|within| M[Generate answer]
  B -->|over| C[Trim context] --> M
  M --> V[Validate output] --> A([Answer with citations])
  M -.-> T[(Telemetry<br/>traces, cost)]
  • An API gateway in front of every model call: auth, rate limits, tenant ID, cost attribution. Must-have.
  • Output validated before the user sees anything: schema, citations, policy.
02

Where each query should go

RAG is for meaning, not for replacing your database. Send each query down the cheapest correct path.

Route first, then retrieveOnly meaning questions pay for vector search; the rest have cheaper, more accurate paths.
flowchart TD
  Q([Query]) --> I{What is it?}
  I -->|exact lookup<br/>order ID, error code| K[Keyword search]
  I -->|count or total| SQ[SQL or filters]
  I -->|an action| AP[API or workflow]
  I -->|a meaning question| H[Hybrid search + model]
  I -->|general chat| G[Direct generation]
  K --> RS([Answer])
  SQ --> RS
  AP --> RS
  H --> RS
  G --> RS
  • Counts and totals come from SQL or filters: models can’t count your rows. Must-have.
  • Exact lookups use keyword search, because vectors blur exact tokens like error codes.
03

Data tiers

Most queries hit recent data. Stop paying to embed records nobody asks about.

Index by how alive the data isA scheduled job re-tiers records and re-indexes only what moved.
flowchart LR
  H[Hot<br/>changed in 30 days] -->|full vectors + rerank| C1[High cost, worth it]
  W[Warm<br/>active, 30 to 365 days] -->|hybrid index| C2[Medium]
  C[Cold<br/>idle 12+ months] -->|keyword only| C3[Minimal]
  A[Archive<br/>closed accounts] -->|on demand only| C4[Near zero]
  J([Nightly re-tier job]) -.-> H
  J -.-> W
  J -.-> C
  J -.-> A
  • Records untouched for 12+ months are keyword-only, with no vector field.
  • Re-index only the records whose tier changed, not the whole store.
04

Model routing

Use the smallest model that passes your evals for each job.

Match the model size to the jobCurrent names and prices live on the model comparison page; re-run evals before switching.
flowchart LR
  J{Which job?} -->|classify, route, extract| S[Small, fast model]
  J -->|grounded answer, the default| B[Balanced model]
  J -->|hard reasoning, agents, code| F[Flagship model]
  S --> E[Run your evals]
  B --> E
  F --> E
  E -->|passes| P([Ship the smallest that passes])
  E -->|fails| U[Try one size up] --> E
  • Classification and extraction rarely need a flagship model.
  • Re-run evals before moving to a new model generation.
05

The 30-check list

Five groups of checks, with the 11 must-haves marked in red.

What the checks coverSections 4 to 8 of the guide; the scorecard counts the red boxes you can tick.
flowchart LR
  L([Launch checks]) --> R[Request path<br/>gateway, routing,<br/>output validation]
  L --> I[Ingestion and retrieval<br/>hybrid search, metadata,<br/>incremental updates]
  L --> C[Cost control<br/>budget gate, spend per tenant,<br/>semantic cache]
  L --> S[Security<br/>tenant filter, untrusted content,<br/>PII redaction]
  L --> Q[Quality and launch<br/>cite or say I do not know,<br/>evals in CI, rollback]
  • Tenant and permission filters enforced at retrieval time, so search can’t run without one. Must-have.
  • Every chunk carries its source, section, page, timestamp, tenant and document hash. Must-have.
06

Token budget gate

Count before you call. A few lines of code, and the biggest cost lever most teams miss.

Fill the context, then stopChunks arrive ranked by relevance; the gate keeps the best ones that fit and caps the reply.
flowchart TD
  S([Budget = max context<br/>minus prompt and query]) --> N{Next ranked chunk}
  N --> F{Still fits?}
  F -->|yes| K[Add it] --> N
  F -->|no| X[Stop adding]
  N -->|none left| X
  X --> CALL[Call the model<br/>with a reply cap]
  CALL --> L[(Log tokens and cost<br/>per tenant)]
  • A token budget gate before every model call: the SDK won’t stop you sending 50k tokens. Must-have.
  • Set the context limit from your latency and cost budget, not the model’s maximum window.
07

Alert thresholds

Retrieval can quietly degrade for weeks. Eight signals tell you before users do.

One span per call, eight alertsEach model call emits a trace; these are the signals worth paging on.
flowchart LR
  C([Model call]) --> SP[Trace span<br/>intent, hits, tenant,<br/>tokens, latency]
  SP --> A1[Search hit rate<br/>below 80%]
  SP --> A2[Semantic score<br/>falling week on week]
  SP --> A3[I do not know rate<br/>above baseline]
  SP --> A4[Tokens per request<br/>near the gate]
  SP --> A5[Cost per tenant<br/>over 2x average]
  SP --> A6[Latency p95<br/>over target]
  SP --> A7[Answers cut off<br/>by length]
  SP --> A8[Thumbs down<br/>above baseline]
  • Alert when fewer than 80% of queries return at least one search result.
  • Alert when a tenant’s daily cost passes twice its recent average.
08

Failure modes

Seven things that break under real traffic, each with its likely cause and fix.

Symptom, cause, fixThree of the seven; the PDF has the full table.
flowchart LR
  S1[Answers got worse,<br/>nothing errored] --> C1[Embedding model changed,<br/>vectors mixed] --> F1[Pin model per index,<br/>re-embed, re-run evals]
  S2[Bill doubled,<br/>traffic flat] --> C2[Context growing,<br/>retries, agent loops] --> F2[Budget gate, step caps,<br/>spend alerts]
  S3[A user saw another<br/>customer's data] --> C3[No tenant filter<br/>at search] --> F3[Mandatory filter,<br/>tested in CI]
  • Pin one embedding model and version per index, recorded with the index.
  • Back off with jitter, queue and degrade gracefully when search or the model throttles.
09

Evaluation plan

Score retrieval and generation separately, in CI, on every change.

Evals as a merge gateStart with 50 to 100 realistic questions and grow the set from production feedback.
flowchart LR
  CH([Prompt, chunking, embedding<br/>or model change]) --> SET[Run the eval set]
  SET --> RET[Retrieval<br/>recall, MRR, hit rate]
  SET --> GEN[Generation<br/>faithfulness, relevance,<br/>citation accuracy]
  RET --> TH{Above the<br/>pass threshold?}
  GEN --> TH
  TH -->|yes| MG([Merge])
  TH -->|no| BL([Blocked])
  FB[(User feedback)] -.-> SET
  • A versioned eval set runs in CI on every change, with a threshold that blocks the merge. Must-have.
  • Calibrate any LLM-as-judge against human labels before you trust it.
10

30-day rollout + scorecard

A week-by-week plan, then a score that tells you whether you’re ready.

Four weeks to launchCount the 11 red boxes you can honestly tick to see where you are.
flowchart LR
  W1[Week 1<br/>budget gate, tracing,<br/>hybrid search, tenant filter] --> W2[Week 2<br/>evals in CI,<br/>intent routing]
  W2 --> W3[Week 3<br/>data tiers, cache,<br/>spend alerts]
  W3 --> W4[Week 4<br/>load test at 3x,<br/>failure and rollback drills]
  W4 --> SC{Red boxes ticked}
  SC -->|10 or 11| P([Production-ready])
  SC -->|7 to 9| PI([Pilot with friendly users])
  SC -->|under 7| D([Still a demo])
  • Load test at three times your expected peak before launch.
  • Rehearse a rollback of prompts, models and indexes before users need one.

Want the full reasoning and the code?

Every check comes from Building a Production-Ready AI System: the orchestrator, tiered indexing job, token budget gate and telemetry, in C#/.NET on Azure OpenAI and AI Search.