Skip to content

LLM Evaluation for Business Features

Data & AI6 min read

How to test an LLM feature properly: define good, build a realistic test set, score with checks, humans and judges, and run it as a regression suite.

In this article
  1. Why evaluation is different for LLM features
  2. Step 1: Define what good means for this feature
  3. Step 2: Build a test set from real work
  4. Step 3: Choose how to score
  5. Step 4: Run it as a regression suite
  6. Step 5: Evaluate safety and abuse
  7. Step 6: Keep evaluating in production
  8. Common mistakes to avoid
  9. A small worked example
  10. What to do next

To evaluate a large language model (LLM) feature, build a small test set of realistic inputs with agreed good outputs, score the feature against it using clear criteria, and rerun that test every time you change the prompt, model or retrieval setup. "It looked fine in a demo" is not evaluation. Because LLM outputs vary, you need a repeatable process and honest limits on what the numbers tell you.

Why evaluation is different for LLM features

Traditional software is deterministic: the same input gives the same output, so a unit test either passes or fails. LLM output is open-ended and can vary between runs. Two answers can both be acceptable yet worded differently, and a fluent answer can still be wrong. Changing a single sentence in a prompt, or upgrading to a newer model version, can quietly change behaviour across hundreds of cases.

That is why evaluation has to be designed, not improvised. It protects you from regressions, lets you compare options fairly, and gives non-technical stakeholders evidence rather than anecdotes. It also feeds into governance: if the feature is customer-facing, you will want to show how you checked it. See our note on the EU AI Act, chatbots and transparency for the wider regulatory context.

Step 1: Define what good means for this feature

"Good" depends entirely on the use case. For a summarisation tool it might mean faithful, concise and covering the key points. For a support assistant it might mean correct, grounded in your documents, polite and willing to say "I do not know". Write the criteria down and keep the list short. Typical dimensions include:

  • Correctness against known facts or a reference answer.
  • Groundedness: claims supported by the supplied source material, not invented.
  • Completeness of the answer for the question asked.
  • Tone and format, such as length limits or required structure.
  • Safety and policy: refusals where needed, no leaking of internal data.
  • Robustness to awkward input, typos and attempts to manipulate the model.

Step 2: Build a test set from real work

Collect realistic examples: genuine questions from your users or staff, with personal data removed or replaced. Include easy cases, hard cases, and edge cases. A sensible mix contains typical requests, ambiguous ones, questions the system should decline, and adversarial inputs. For each, record the expected behaviour: a reference answer, key facts that must appear, or a rule such as "must refuse".

Start small. A few dozen well-chosen cases that people have reviewed carefully are more valuable than thousands of sloppy ones. Grow the set over time, and whenever the feature fails in real use, add that case. Keep a held-out portion that you do not tune against, so you can detect overfitting to your own test set.

Handle personal data with care. If test cases are drawn from real conversations, apply GDPR principles such as minimisation and restrict who can see them. The Data Protection Commission (DPC) publishes guidance. This is not legal advice.

Step 3: Choose how to score

There are three common approaches, and mature teams use a mix.

MethodGood forLimits
Programmatic checksFormat, length, required fields, valid JSON, banned phrases, citations presentCannot judge meaning or quality
Human reviewNuance, tone, correctness, the final saySlow, costly, reviewers can disagree
LLM as judgeScaling rubric-based scoring across many casesCan be biased or inconsistent, needs calibration

If you use a model to grade another model, treat the grader as something to validate. Give it a clear rubric, ask for reasoning before the score, and compare its scores with human judgements on a sample. Where they disagree, fix the rubric. Do not assume that an automated score equals quality.

Where the feature answers from your own documents, evaluate retrieval separately from generation. If the right passage never reaches the model, no prompt will fix it. Measure whether the relevant source appears in the retrieved set, then whether the answer uses it faithfully.

Step 4: Run it as a regression suite

Evaluation pays off when it is routine. Store the test set in version control, script the run, and record results per change: prompt version, model version, retrieval settings and scores. Run it before releasing any change, ideally in the same automated pipeline as your other tests, in the spirit of our GitHub Actions CI/CD pipeline guide. Because outputs vary, run important cases more than once, or set temperature low, and look at trends rather than single results.

Decide thresholds in advance. For example, "no drop in correctness on the core set and zero failures on the must-refuse set" is a release gate that cannot be argued away after the fact.

Step 5: Evaluate safety and abuse

Include cases that probe misuse: attempts to extract system instructions, to override rules, or to trick the model into revealing data it can reach. This overlaps with security testing, covered in prompt injection risks in LLM apps. Check that the feature behaves sensibly when it lacks information, since confident invention is the characteristic LLM failure. Reference sources such as the OWASP guidance for LLM applications and NIST's AI risk material when building your checklist.

Step 6: Keep evaluating in production

Offline tests cannot predict everything. Log inputs and outputs in a privacy-conscious way, offer a simple thumbs up or down, sample real conversations for human review, and feed failures back into the test set. Watch for change over time, since provider model updates and shifting user behaviour can alter results. The monitoring ideas in model drift and MLOps monitoring apply here too.

Common mistakes to avoid

  1. Judging by a handful of impressive examples. Demos are chosen to look good.
  2. A test set written by the prompt author. Include cases from real users and sceptical colleagues.
  3. Trusting an LLM judge blindly. Calibrate it against people.
  4. Tuning against the test set until it passes. Keep a held-out set.
  5. Ignoring cost and latency. A feature that is accurate but slow or expensive may still fail.
  6. Treating evaluation as one-off. Models, prompts and data all change.

A small worked example

Imagine a feature that answers staff questions from an internal policy handbook. A practical test set might contain forty questions: twenty common ones with a reference answer and the paragraph it should come from, ten that the handbook does not cover and should be declined, five that are ambiguous and should prompt a clarifying question, and five that try to make the assistant ignore its rules. Each case gets a simple record: the question, the expected behaviour, and a pass or fail for each criterion. Run it, read every failure, and group them. You will often find that most failures share a cause, such as poor retrieval for one topic or a prompt that encourages guessing. Fix that cause, rerun the whole set, and confirm nothing else regressed. That loop, repeated calmly, is what turns an impressive demo into a feature you can stand behind.

Keep a short evaluation log: date, change made, scores before and after, and what you learned. Months later it becomes the memory of why the prompt reads the way it does, and it makes handovers between team members far easier.

What to do next

  1. Write three to six criteria that define a good answer for your feature.
  2. Assemble thirty to fifty realistic test cases with agreed expectations.
  3. Add programmatic checks first, then human review for the rest.
  4. Automate the run and set release thresholds.
  5. Feed production failures back into the test set every month.

If you would like help with this, the CloudWiss team in Dublin can talk it through, from test design to rollout, on our AI and data science page.

Share this article

General educational information, not legal or professional advice for your specific situation.

Frequently asked questions

How big should an LLM evaluation set be?

Start with a few dozen carefully chosen cases and grow from there. Quality and coverage matter more than raw volume. Add every real failure you meet, and keep a held-out subset you do not tune against.

Can we use an LLM to grade our LLM's answers?

Yes, it can scale rubric-based checking, but it needs validation. Compare its scores with human reviewers on a sample, refine the rubric, and keep humans in the loop for important or ambiguous cases.

Why not just rely on user feedback after launch?

Feedback is valuable but arrives after users have already seen problems, and most people never give it. Pre-release testing catches regressions before they reach customers, while production feedback fills the gaps your test set missed.

How often should we re-run evaluations?

Run them on every change to the prompt, model, retrieval settings or data, and on a schedule even when nothing changed, because hosted models can be updated. Treat it like a regression test suite.

Keep reading

  • Data & AI7 min read

    Prompt Injection Risks in LLM Apps

    What prompt injection is, how it breaks LLM features in business apps, and the layered defences that reduce the damage when an attack gets through.

  • Data & AI6 min read

    Model Drift and MLOps Monitoring

    What model drift is, the three layers of monitoring that catch it, and the MLOps practices for retraining, safe release and rollback of ML models.

Let’s build it

Ready to build with CloudWiss?

Tell us what you want to build, move to the cloud or keep running. We reply with a clear next step.