Start a project
All insights

Evaluation before elegance: shipping LLM features that hold up in production

A convincing demo and a dependable feature are separated by one discipline: evaluation. Here is the order we build AI features in, and why.

Almost every AI feature starts with a demo that works. A prompt, a model, three good examples, and the room is convinced. Then real users arrive with real inputs, and the feature that dazzled in a meeting starts to wobble: confident wrong answers, inconsistent formats, surprising costs.

The gap between that demo and a dependable feature is not a better prompt. It is evaluation, and it has to come first.

1. Define the job, and the ways it can fail

Before writing a prompt, write down what “good” means for this feature in terms someone outside the team could check. Then do the less comfortable part: list how it can fail. Wrong facts, leaked data, harmful advice, the wrong tone, a format the next system can’t parse, a cost that does not scale. Each failure mode becomes something you test for.

2. Build the evaluation set before polishing the prompt

Collect real examples: common cases, edge cases and adversarial ones. For each, record what a good answer must contain and must never contain. Some checks are mechanical: valid JSON, the right fields, no personal data. Others need judgement, and a model can grade them against a clear rubric, calibrated against human review so the grader stays honest.

Now every prompt change, model upgrade or retrieval tweak gets a score instead of an opinion. That one habit turns AI development from guesswork into engineering.

3. Ground the model in trusted data

Most “hallucinations” are a model doing its best with missing context. Retrieval over trusted sources, with references the user can follow, narrows the gap between what the model knows and what the business knows. Just as important is permission to say “I don’t know”. A grounded system that admits uncertainty is far more valuable than an eloquent one that doesn’t.

4. Put guardrails in the product, not just the prompt

Prompts are instructions, not controls. Production systems need controls:

  • Structured outputs that downstream code can validate, instead of free text it has to guess at.
  • Input and output checks for sensitive data and out-of-scope requests.
  • Human review wherever the stakes are high, designed into the workflow rather than bolted on.
  • Limits and budgets, such as rate limits, turn limits and spend ceilings, so one bad actor or bug can’t create an unbounded bill.

5. Treat cost and latency as features

The most capable model is not always the right one for every step. Route tasks to suitable models, cache stable context, stream responses so people see progress, and measure cost per completed task, not per request. A feature that is accurate but too slow or too expensive to run at scale is not finished.

6. Keep measuring after launch

Inputs drift, models update and usage shifts. Keep the evaluation suite running on fresh, anonymized samples, watch quality, latency and cost side by side, and re-run the full suite before any model or prompt change ships.

What this looks like in practice

The AI project consultant on this website follows the same approach. It works from a fixed set of instructions and records what it learns through a structured tool rather than free text. It has firm honesty rules (no prices, no timelines, no invented credentials), turn limits, rate limits and a daily spend ceiling. None of that is glamorous. All of it is what makes an AI feature something a business can put its name to.

Tell us about the product you want to build or the system you need to fix. You'll hear back from an engineer, not a sales script.