Search⌘ K
AI Features

Evaluating and Protecting AI Features

Learn how to decide whether an AI feature is ready for production: choosing task-specific quality and operational metrics, building representative, versioned eval sets with a baseline, enforcing deterministic authorization and tenant isolation, defending against prompt injection, and turning all of it into staged rollout gates with numeric rollback criteria.

An AI feature is ready when you can make a go or no-go decision from measurable acceptance criteriaExplicit thresholds that a system must meet before deployment or continued operation. and operating safeguards, not from an impressive demo.

Average quality can hide important failures. An assistant can answer common questions well while slowing down under load, falling back too often, or exposing data a user should not see. A production decision therefore weighs output quality together with reliability, cost, and security.

The diagram below shows the four checks every release must pass:

Deployment decision gate
Deployment decision gate

In this lesson, we will choose metrics that match each feature type, build representative evals and baselines, protect data and trust boundaries, and turn all of it into staged rollout gates.

Choosing the right evaluation metrics

Good metrics match the task and the failure users would notice. If the right document was never retrieved, scoring the final answer finds the problem too late. If the service times out, correctness metrics miss the problem entirely.

Retrieval and grounded answers

For retrieval, the first question is whether the system finds useful evidence. If the right help article should appear in the top 5 results, recall@5 shows how often the retriever finds it. Ranking matters too, because evidence buried low in the list is less likely to help.

For grounded answers, check whether the response is correct and whether its ...