SproutStackSproutStack home

The AI Engineering Lifecycle

5 min readBeginner-friendlyFree to read

Read a little, play a little. No scary maths, and no rush.

Share:

Demos get applause; lifecycles get users

A demo works once, for you, on your laptop. A product works thousands of times a day for strangers with weird inputs. The gap between those two is a lifecycle: prototype fast, measure honestly, ship carefully, watch constantly, improve weekly. Skip a stage and it bills you later — usually at 2 AM.

Stage 1 — Prototype in days, not months

Build the smallest thing that answers one real question: a script, a prompt, five test documents. No auth, no UI polish, no scale. The prototype's only job is proving the core loop works (retrieve → generate → cite). If it can't answer well on friendly inputs, infrastructure won't save it.

Stage 2 — The eval set is your seatbelt

Before shipping, assemble ~50 golden questions with known-good answers and correct source docs. Every prompt tweak, model swap, or chunking change re-runs the set. Track faithfulness (claims cited?), recall (gold doc retrieved?), abstain rate (says "not found" when appropriate?), plus cost and latency per query. A change that improves answers but doubles cost is a decision, not an accident.

Stage 3 — Ship like it might break

Because it might. Roll out in stages: shadow mode (new system answers alongside old, nobody sees it — compare logs), then canary (5% of real traffic), then full rollout with a one-click rollback (previous prompt version saved, previous index snapshot kept). Your ship checklist: evals green, cost/latency within budget, rollback tested, alerts wired.

Stage 4 — Monitor what actually drifts

Uptime dashboards aren't enough — the model can be "up" and confidently wrong. Watch: hallucination/citation-failure rate, abstain rate, retrieval recall, cost per 1,000 queries, and user corrections (thumbs-down is free eval data). Alert on quality spikes, not just 500s. Review prompts and retrieval weekly — content drifts, models update, yesterday's perfect prompt quietly rots.

Version everything that changes behavior

In an AI system, behavior changes without anyone touching the code. Track these, and log which versions served each request:

  • Prompt version: every edit gets a number.
  • Model version: pin a specific dated model version where the provider offers one. A general alias such as "latest" can change underneath you overnight.
  • Index snapshot: which version of the document index answered.
  • Eval set version: so scores from different months are comparable.

When a user reports a bad answer from Tuesday, these versions let you reproduce exactly what produced it.

A worked example: upgrading the model

The provider releases a new model that is faster and cheaper.

  1. Eval first. On the golden set it improves 45 questions and gets 5 worse, all of them unanswerable questions it now attempts instead of saying NOT FOUND.
  2. Fix the prompt. A sharper abstain instruction brings those 5 back without losing the gains.
  3. Shadow. For a few days it answers in parallel with the old model, unseen, and the logs are compared.
  4. Canary. Five percent of users get it. Thumbs-down rate and cost are watched against the baseline.
  5. Roll out. Full traffic, with the old model version kept ready for an instant rollback.

Remember this

  • Prototype → eval set → shadow → canary → monitor → weekly review.
  • Never ship without a rollback; never trust without evals.

Check your understanding

5 questions · first-try answers earn the most XP

1. Why does the chapter insist on a rollback plan as part of the ship gate?
2. What is shadow mode in an AI release, and what is it used for?
3. Why is uptime monitoring insufficient for an AI feature?
4. What does the chapter say about a change that improves answers but doubles cost?
5. Why does the chapter recommend a weekly prompt and retrieval review?

My notes

Saved in this browser. Highlight a line above and save it, or write it in your own words.

Nothing saved yet. Your highlights will live here.

References

Finished reading?

Ticking it here also ticks the chapter in the sidebar, the section count and your streak — it is all one number.

Related chapters

Spotted a mistake or want a topic covered? Report an issue

📬 An occasional email when new lessons land

New lessons and showdowns, no more than a few times a month. No spam, unsubscribe anytime. We store your email only to send the newsletter.