SaaS & technology · India / United States
Shipping a stalled AI feature in nine weeks
A Series-B SaaS company had an AI summarisation feature that demoed well for seven months but could not ship — nobody could state its accuracy, its cost per user, or what happened when the model provider had an outage.
- Client
- B2B SaaS platform
- Published
- 6 May 2026
The client is not named at their request. Figures are as reported by them.
- 9 weeks
- Prototype to general availability
- 47%
- Inference cost reduction
- 0
- Provider outages visible to customers
- 3.1x
- Retrieval precision versus the prototype
Quality held on the evaluation suite throughout
Automatic fallback across providers
The situation
The prototype was built in a fortnight by a strong engineer and demoed to the board. Seven months later it was still behind a feature flag for eleven internal users.
The blockers were not technical mysteries. They were unanswered questions: what is the accuracy, what does it cost per active user, what happens at 3am when the provider returns 529s, and what stops a customer pasting instructions that leak the system prompt.
What we did
Weeks 1–2 — built the baseline. We took 400 real documents from production traffic, had their subject-matter experts agree correct summaries, and scored the existing prototype. It was substantially worse than the demo suggested, mostly because the demo corpus was small and clean.
Weeks 2–5 — fixed retrieval, not the model. Chunking strategy, hybrid keyword and vector search, and a reranking step, tuned against a labelled query set. Retrieval precision improved 3.1x. Most of the perceived "model quality" problem disappeared with it.
Weeks 5–7 — cost and resilience. Simple classification steps routed to a smaller model, stable prompt prefixes cached, context trimmed of material that was never load-bearing. Provider abstraction with automatic fallback. Per-tenant cost attribution so their pricing team had real numbers.
Weeks 7–9 — hardening and rollout. Prompt injection defences, PII handling, request-level audit logging, per-feature rate limits, and a staged rollout from 5% to 100% with the evaluation suite gating each step.
The cost work
Before
- Every step on the largest available model
- Full document context on every request
- No caching of stable prompt prefixes
- Cost visible only as one monthly total
After
- Classification and routing on a smaller model
- Retrieved context trimmed to what changes the answer
- Stable prefixes cached across requests
- Cost attributed per tenant and per feature
Net effect: 47% cheaper per request with quality held flat on the evaluation suite. The suite is what made the trade-off measurable rather than a gamble.
Stack
- Claude
- Anthropic API
- Next.js
- pgvector
- Langfuse
- GitHub Actions
“We thought we had a model problem. It turned out we had an evaluation problem, a retrieval problem and a cost problem, and none of them needed a better model.”
Want the same conversation about your process?
Bring the workflow that costs you the most time. In thirty minutes you will know whether it is automatable, roughly what it would cost, and where it would fail.
Or email [email protected] · we reply within 1 business day