A first AI feature can look successful while making the product worse: people click the button, demos sound convincing, and no one reports a leak. For a tech lead in a 15–30 person engineering organisation, I would judge it by completed user work under a fixed safety and cost budget, not by model accuracy or adoption alone. That requires measuring the feature against a credible alternative.
The unit of success is a completed task, not an AI interaction
Start by naming the decision the AI changes. In a support workflow, that might be whether an agent sends a suggested reply, edits it, or discards it. Count eligible cases from the moment an agent could use the feature, including cases where they never open it. Otherwise, an adoption rate quietly excludes the people for whom the feature is slow, confusing, or irrelevant.
Define a successful case in terms the existing product can observe: the agent resolves the case, the customer does not reopen it within the agreed window, and the reply passes the same policy checks as a manually written one. Track elapsed handling time alongside that outcome, because a faster draft has little value if it creates more follow-up work. This definition will be imperfect, so inspect a sample of cases rather than treating the metric as a complete account of quality.
Junior Devs Can Add AI Without Rewriting the App makes the integration case, but an easy integration does not establish a useful feature because wiring a model into an existing screen is easier to verify than a change in completed work. Give the feature an owner who can define eligibility, review disputed outcomes, and stop the rollout. In a small organisation, that is more useful than appointing separate owners for prompts, dashboards, and risk who cannot make a joint decision.
Write down the denominator before launch. For example, “cases assigned to participating agents that have the required source material and are not subject to an exclusion rule” is a defensible eligible population. “Cases where someone clicked Generate” is not, because the feature can appear to improve outcomes merely by attracting straightforward cases. Record the exclusion rule in code or a query, and version it when it changes.
Set a provisional success threshold that the team can tune: a 10% reduction in median handling time with no deterioration in the agreed resolution measure. Treat that number as a decision rule, not a prediction. Pair it with a guardrail such as a 0.5 percentage-point maximum increase in reopened cases; that limit is likewise a value to revisit with the people accountable for support quality. If those measures disagree, do not average them into a single “AI score,” because an attractive composite can hide a material regression.
Offline evaluation earns a trial, but cannot declare a winner
Before exposing users, build a replay set from eligible historical tasks whose inputs can be handled under the same data rules as production. Include ordinary cases, ambiguous ones, missing-document cases, and cases where the correct behaviour is to decline. Freeze the set and its expected checks for a prompt or model comparison; otherwise, changing the examples alongside the implementation makes improvement impossible to distinguish from test selection.
Use pytest 8 to run deterministic checks, and validate structured outputs against JSON Schema Draft 2020-12 when the application expects a specific shape. Those checks can catch malformed answers, omitted required fields, and broken citations. They cannot establish that a suggestion helps a person finish a task, because a syntactically valid answer may still be wrong or burdensome to check. Sample human review should therefore record both correctness and the amount of correction needed, using a short rubric whose disagreements reviewers can discuss.
Compare offline replay with an online holdout rather than asking one to stand in for the other. Offline replay wins when a change needs a quick regression check or should not yet reach users; it costs time to curate examples and misses behaviour caused by live context. An online holdout wins when the question is whether the feature changes completed work; it costs exposure to a possibly weaker experience and enough traffic to observe a meaningful difference. Neither option is free, which is why replay should gate a trial rather than replace it.
Keep a small, separately maintained set of adversarial cases. The OWASP LLM Top 10 for 2025 is a useful source of failure categories, but passing examples drawn from a list is not proof of safety because production inputs and permissions change. Test retrieved text that gives instructions to the model, conflicting source passages, and an answer that cites a document the requesting user cannot open. Review failures by category and version the test cases with the feature, so a newly discovered failure becomes a regression check.
I would NOT make a single model-graded “answer quality” score the release gate, because it can reward fluent responses while concealing unsupported claims and extra human checking. If a model grades outputs, keep its prompt, model version, and sampled human disagreements visible. For a small team, a modest review set with traceable judgments is more actionable than a large opaque number.
A holdout must measure the whole eligible population
For the live trial, assign eligible accounts—or another unit that prevents the same work from crossing arms—to feature and control before anyone decides whether to click. Record that assignment even when generation fails or the user ignores the suggestion. This is an intention-to-treat comparison: it measures the product decision to offer AI, including its friction and outages, rather than the selected subset of people who used it.
A 14-day pilot is a planning window to adjust to your work cycle, not a universal duration. If cases commonly reopen after that window, wait for the outcome window to mature before calling the result. In a low-volume product, report counts and uncertainty plainly instead of treating a small percentage difference as settled. For illustration, a trial with 200 eligible cases per arm and only a few reopenings cannot support a precise claim about a rare failure; those figures are an example, not results from a deployed system.
Instrument the path with OpenTelemetry 1.x and propagate the W3C Trace Context traceparent header across services. Record an assignment ID, feature version, outcome timestamps, tool failures, and token usage without putting prompts or retrieved documents into trace attributes. Use a Prometheus histogram for end-to-end latency and inspect its p95 with histogram_quantile; a proposed 4-second p95 limit is a service target to tune with users, not a published norm. A Grafana dashboard can put that latency beside completion and failure rates, because a fast model call does not help if retrieval or review makes the entire task slower.
The following Python 3.11 example shows the arithmetic for a tiny assignment log. The rows are illustrative; production analysis needs the real eligibility rule, a matured outcome window, and uncertainty estimates.
rows = [
(0, True, 6.0), (0, False, 8.0),
(1, True, 5.0), (1, False, 7.0),
]
for arm in (0, 1):
eligible = [row for row in rows if row[0] == arm]
completed = sum(row[1] for row in eligible)
mean_minutes = sum(row[2] for row in eligible) / len(eligible)
print(f"arm={arm} completed={completed}/{len(eligible)} "
f"mean_minutes={mean_minutes:.1f}")
Keep the denominators in the dashboard, not only the percentages. Segment after the primary comparison by task difficulty, permission level, and new versus experienced users to find harms worth investigating. Do not declare victory from the best segment alone, because searching many cuts makes an accidental improvement easy to find. A rollout decision should cite the preselected outcome, guardrails, and any serious segment-level exception.
Safety and cost need their own stopping rules
Your First AI Feature May Leak Data After It Ships identifies a risk that outcome metrics will miss, because a customer can complete a task successfully even when the feature has retrieved or sent information it should never have touched. Measure the path of sensitive data as well as the quality of the answer: what the retriever fetched, what the model received, what the user saw, and what telemetry retained.
Create synthetic documents with unique canary strings, assign them to accounts and roles that should not share access, and attempt requests across those boundaries. Count a canary appearing in a model input or response as a failure even if the final UI suppresses it, because exposure has already occurred at the model-input boundary. Test authorization at retrieval time with the application’s real identity and policy path; filtering only after retrieval leaves a gap that an answer generator or log sink can exploit. Where the datastore uses PostgreSQL row-level security, verify that the retrieval connection carries the intended tenant context rather than assuming the policy applies to a shared service account.
Put a hard stop on confirmed cross-account disclosure instead of trading it against faster handling time. That is a release rule, not a claim that a zero observed count proves zero risk. Track attempted unauthorized retrievals, blocked requests, canary exposures, and time from detection to disabling the feature. Record the coverage of the canary tests—roles, retrieval paths, and environments—because a clean result with one tested path says little about an untested one. Tools such as Microsoft Presidio can help find likely personal data in sampled material, but they should not be treated as an authorization check because detection can miss data or misclassify it.
Set a cost boundary on the same eligible-case denominator used for the outcome. Measure model charges, retrieval and storage costs, retries, and review time per successfully completed eligible task. Token spend per generation understates cost when users regenerate answers or staff must repair them. Watch the distribution as well as the average: a small set of long requests can breach a budget while the mean looks acceptable. Choose a monthly ceiling with the product owner before launch, then alert on a projected breach rather than discovering it in an invoice.
Finally, give the team a reversible release mechanism. A LaunchDarkly flag, or an equivalent server-side flag, should disable generation without disabling the underlying workflow; test that switch during the pilot because an untested rollback is only a plan. Review the safety and cost guardrails after prompt changes, model changes, and retrieval-index updates, since each can alter behaviour without changing the user-facing feature.
Start with one decision the team can actually make
At the next planning meeting, choose one eligible workflow and write its control experience, completed-task outcome, exclusion rule, and stop conditions on a single page. Ask an engineer and the workflow owner to classify a small set of recent cases independently. If they cannot agree on what success means for those cases, settle that disagreement before adding a model: the trial will otherwise produce a number nobody trusts.


