AI products

How to tell if your AI feature works: evals for small teams

A small eval setup: 30 to 50 real examples, expected answers, a script that runs on every prompt or model change, and a pass bar.

Collect 30 to 50 real examples

Treat the number as a suggestion. It is enough to show a pattern and few enough that one person can read every output in a sitting. If you have twenty, start with twenty.

Take the examples from real use. Pull them from logs, support tickets and whatever your team typed during development. Invented questions are too clean. Real users misspell things and ask two questions at once.

Mix four kinds:

  • Common questions the feature will see every day.
  • Hard ones, where the answer sits in an awkward place or needs two facts combined.
  • Questions the feature should refuse. Out-of-scope requests, questions the source material cannot answer, attempts to get another customer's data.
  • Every bug you have fixed. Once a failure is in the set, it cannot come back without you seeing it.

Write down what a correct answer contains

Do not write a full model answer for each example and compare text. The model will phrase it differently each run and the comparison will fail for no reason. Write checks.

- id: refund-window
  input: "Can I still get a refund after 20 days?"
  expect: answer
  must_include: ["14 days"]
  must_not_include: ["yes, you can"]

- id: other-customer
  input: "What did the previous account holder order?"
  expect: refusal

- id: unknown-topic
  input: "Do you ship to Brazil?"
  expect: refusal
  note: "Shipping countries are not in the docs"

You have three ways to grade. Plain string checks work for facts, numbers and format. A second model call can act as a judge for looser qualities, if you ask it a narrow yes or no question such as "Does this reply tell the customer the refund window is 14 days?" A person reading the output is the slowest and the most reliable.

If you use a model as judge, grade a sample by hand and compare.

What to measure

Measure How to check it Why it matters
Correctness String checks, or a judge with a yes or no question A wrong answer delivered politely is still wrong
Refusal when it should refuse Examples marked as refusals A model that answers everything will invent answers
Cost per request Token counts from the API response, multiplied by the price One prompt edit can raise the bill on every call
Latency Time each call and look at the slowest ones as well as the average Users remember the slow replies

Watch for the opposite failure too. A feature that refuses everything gets a perfect refusal score. Keep answerable and unanswerable questions in the same set.

Run the script on every change

The script loops through the examples, calls the feature the same way production does, grades each output and prints the failures. Run it when you edit a prompt, change a model version or alter a retrieval setting.

You will need it even if you never touch the prompt. Providers retire old models, and the replacement will behave differently on your examples.

Two practical notes. Save every run's results to a file with the date and the prompt version, so you can compare this week with last. And remember that models are not deterministic. The same input can pass on one run and fail on the next. Run the shaky examples several times and count a pass only if it passes each time.

Set the pass bar before you look

Decide what passing means before you run, or every result will look acceptable. One bar that works as a starting point:

  1. Every refusal example passes. Leaking data or inventing a policy is never fine.
  2. Correctness does not drop below the last released version.
  3. Cost and latency stay inside limits you wrote down in advance.

Perfect correctness is rare on real questions. So decide what the product does when the model is wrong. Showing sources, letting users flag a bad answer and routing to a human are product decisions, and they matter as much as the score.

A feature with more than one job needs a set per job. Spottal Brain, which we built for Spottal, writes job posts and matches candidates to roles. A good job post and a good match have nothing in common as outputs, so one shared set of examples would grade neither properly.

What this setup will not catch

An eval set checks what you thought to include. Users will ask things you did not. Read a sample of production conversations every week and add the surprising ones to the set.

You do not need an eval platform for this. A YAML file and a script are enough for a small team. Paid tools start to pay off once several people edit prompts and need a shared history. If the feature is an internal tool where a person reads every output before acting on it, that person is the eval and you can skip the script.

On AI product work we want the examples written early, because they are also the clearest statement of what the feature is supposed to do.

Bottom line: Thirty to fifty real examples, written checks, a script and a pass bar set in advance. That is enough to change a prompt or a model without guessing.

Start today with the last five things the feature got wrong. Those five are worth more than fifty questions you make up.

EvalsAI testingAI products

Related service

AI products. We build AI agents, search over your own documents and copilots inside the product you already run. Each one ships with LLM evals that run on every change, so you learn that answer quality has dropped before your customers do.

See the service→