Article by Gonzalo Luque Martin, October 2026
Evals before features: shipping LLM features on sensitive data
In a regulated business, the question is never "does the demo work?" It is "how do we know it works, for whom, and what happens when it doesn't?" Answer that first, and the feature becomes much easier to build and to approve.
Why demos lie
An LLM feature can look excellent in a demo and still be wrong one time in ten. With a recipe app, that is an annoyance. With an insurance claim summary or a health coaching message, it is a compliance problem, a support cost and a trust problem.
The difference between a prototype and a product is not the model. It is whether you can measure quality, notice when it drops, and explain to a compliance officer what the system does with personal data. That work is cheaper at the start than after launch.
Start with the decision, not the model
Before writing a prompt, write down three things:
- What decision or action does the output feed? A human reading a draft is very different from an automated message to a customer.
- What does a bad output cost? Wrong, incomplete, inappropriate tone, leaked personal data, or advice the business is not allowed to give. Rank them.
- What does "good enough to ship" mean in numbers? For example: at least 90% of answers rated correct by a domain reviewer, zero answers that reveal another person's data, and every answer citing a source.
These become your acceptance criteria. They also become the line in the contract and the slide for the risk committee.
Build the eval set before the feature
An eval set is a list of realistic inputs with a description of what a good answer looks like. Fifty well-chosen cases beat five hundred random ones. Cover:
- Typical cases, the questions users ask most often
- Edge cases, ambiguous or incomplete inputs, other languages, unusual formats
- Must-refuse cases, requests outside scope, for medical or financial advice the business cannot give, or for someone else's data
- Adversarial cases, prompt injection hidden in documents, attempts to extract the system prompt or other users' information
On sensitive data, the eval set itself needs care. Prefer synthetic or pseudonymised cases written with domain experts. If real data is needed, keep it inside the client's environment, minimise it, and treat the eval set as personal data with its own access controls and retention.
Grade in layers
Not every check needs a human or another model. Grade from cheapest to most expensive:
| Layer | Examples | When it runs |
|---|---|---|
| Deterministic checks | Valid JSON, required fields present, length limits, cites a source, no personal data patterns in output | Every test run and every production response |
| Model-graded checks | Faithfulness to the source document, tone, policy compliance, using a rubric | Every test run, sampled in production |
| Human review | Domain experts rating correctness and usefulness | Before launch, after major changes, on a small production sample |
Model-graded checks are useful but are themselves a model. Calibrate them against human ratings on the same cases, and only trust the grader on dimensions where it agrees with your experts.
Make evals a gate, not a report
Evals only help if they block bad changes. Run them in CI whenever the prompt, model, retrieval setup or tools change, and fail the build when a metric drops below the agreed threshold. Model providers update models; a pinned version and a regression run before switching are part of change management, the same as a database upgrade.
Keep a short changelog of prompt and model versions with their eval scores. When someone asks why the assistant answered differently last month, you have the answer.
Guardrails around the model
The model should not be the only line of defence. Around it:
- Before the model: minimise what you send. Strip or pseudonymise identifiers the task does not need. Retrieve only documents the current user is allowed to see, enforced by your access control, not by the prompt.
- Inside the prompt: clear scope, explicit refusal instructions, and untrusted content (documents, emails, web pages) marked as data, not instructions.
- After the model: validate structure, check for personal data and out-of-scope advice, and fall back to a safe response or a human when a check fails.
- Around the system: rate limits, per-user isolation, and no tools with write access unless the action is reversible or confirmed by a person.
Privacy by design is mostly architecture
Most data protection questions about LLM features are answered by the architecture diagram:
- Which provider processes the data, in which region, under which contract (a data processing agreement and, for transfers, an adequacy decision or safeguards)?
- Does the provider retain prompts or use them for training? Choose settings and contracts where they do not.
- What is logged? Log metadata, scores and identifiers you can delete, not full prompts with personal data, unless you have a clear purpose and retention period.
- Can you honour a deletion request across logs, vector indexes, caches and eval sets?
In Switzerland the revised FADP applies, and health data is sensitive personal data. In the EU, health data falls under Article 9 GDPR, and the AI Act adds obligations depending on the use case. Getting the data flows right early makes these conversations short.
Monitor after launch
Production is where the real eval set lives. Sample responses for review, track the deterministic checks on every response, watch refusal and fallback rates, and add every real failure to the eval set. Over time, the eval set becomes the most valuable asset of the feature: it encodes what your business considers a good answer.
A minimal checklist
- Acceptance criteria in numbers, agreed with the business and compliance
- An eval set of 50 to 200 cases, including must-refuse and adversarial cases
- Layered grading, with model graders calibrated against humans
- Evals in CI as a release gate, with pinned model versions
- Guardrails before, inside and after the model
- A data flow diagram with providers, regions, retention and deletion
- Production sampling that feeds back into the eval set
Working on an AI feature that touches sensitive data? I help health, insurance and finance teams set up exactly this, from the first eval set to production monitoring.