DEV Community

Cover image for How to Evaluate LLMs Without Lying to Yourself
Mango Developer
Mango Developer

Posted on Originally published at mangodeveloper.com

How to Evaluate LLMs Without Lying to Yourself

The first LLM eval I ever ran was a vibe check. I prompted the model with ten questions I thought were hard, read the outputs, nodded, and shipped. Two weeks later a customer showed me the model confidently explaining how to commit tax fraud "step by step" because it had decided a paraphrase of a finance FAQ meant something illegal. That's the moment I learned the hard rule of LLM evaluation: if your eval is a vibe check, your production behavior will be too.

Most teams I talk to are still in that camp. They have a benchmark number from a leaderboard, a handful of internal prompts they eyeball, and a feeling. This article is the eval pipeline I wish someone had handed me eighteen months ago. It's opinionated, it's boring in places, and it will save you from shipping something embarrassing.

Why LLM evaluation is genuinely hard

Traditional ML eval is easy because the output space is small. A classifier picks one of N labels. You compute F1, you compute ROC-AUC, you move on. LLMs don't give you that luxury. The output is open-ended text, which means:

  • Multiple correct answers exist for the same input.
  • A factually correct answer can be worse than a slightly wrong one if it's confusing.
  • Style, tone, length, and formatting are all dimensions of quality that humans care about and metrics ignore.
  • The same model can look brilliant on one prompt and hopeless on the next.

This is why nobody has solved LLM eval. The best you can do is triangulate: combine automatic metrics, reference benchmarks, LLM-as-judge, and human review, and accept that each method is wrong in a different way.

The BLEU and ROUGE trap

If you're coming from NLP pre-2020, your instinct is to reach for BLEU or ROUGE. Don't, at least not as your primary signal. Both were designed for translation and summarization against a single gold reference, and they break down spectacularly on generative tasks.

A model that writes a perfect answer in different words than your reference scores low. A model that copies the reference verbatim but in a context where that's wrong still scores high. ROUGE-1 on a creative writing task tells you roughly nothing. I've seen teams tune prompts to maximize ROUGE and produce outputs that read like keyword soup.

Use BLEU/ROUGE only when:

  • You have multiple gold references per input (3-5 ideally).
  • The task is genuinely extractive or close to translation.
  • You're tracking regression on a fixed test set over time, not absolute quality.

For everything else, use semantic similarity (BERTScore, embedding cosine) as a sanity check, and lean on the methods below.

$32

$33

$34

$35

$36

Human evaluation at scale

There is no substitute for humans looking at outputs. The trick is doing it without burning out your team or going broke.

A lightweight in-house pipeline:

  1. Sample 50-200 outputs per model variant, weighted toward hard cases and recent production traffic.
  2. Write a rubric with concrete checkboxes (factual correctness, helpfulness, safety, tone). No 1-5 scales-they're inconsistent across raters.
  3. Have two raters per example. Compute inter-rater agreement (Cohen's kappa). If kappa is below 0.6, your rubric is ambiguous-rewrite it.
  4. Use a third rater for tie-breaks.
  5. Pay properly. MTurk at $0.05 per task gives you noise. Aim for $0.50-$2 per rated example depending on complexity.

If you can't afford in-house, use Scale AI, Surge AI, or Outlier. They're not cheap ($3-15 per rated example for skilled work) but they're dramatically better than MTurk.

$37

$38

Common mistakes

"We evaluated on 30 examples and it looked better." It didn't. You flipped 30 coins. Get to 200+ or stop drawing conclusions.

"GPT-4 says our model is great." GPT-4 says everything from your own family is great and everything concise is bad. Use a cross-family judge and check for length bias.

"We hit 92% on MMLU." Was the test set contaminated? Were you few-shot or zero-shot? Did you use the chat template? Without those three answers, the number is decoration.

"Our LLM-as-judge score went up 10 points." Did the judge model version change? Did the prompt length increase? Did you change the rubric? Control your variables.

"We don't need human eval, the judge is good enough." The judge has the same blind spots as the models it judges. You need humans to catch what models can't see about themselves.

"Eval is a one-time thing before launch." Eval is a pipeline. If you're not running it on every model change and every prompt change, you're flying blind.

Troubleshooting real eval failures

Symptom: Judge scores swing wildly between runs.
Cause: Non-zero temperature on the judge, or model version drift.
Fix: Pin temperature=0 and pin the judge model version string. Re-baseline when you upgrade.

Symptom: New prompt scores higher on golden set but worse in production.
Cause: Golden set is stale or doesn't reflect current traffic distribution.
Fix: Refresh 20% of the golden set monthly from recent production samples. Track distribution drift.

Symptom: Human raters disagree constantly.
Cause: Rubric is too vague ("is the answer good?").
Fix: Replace subjective scales with concrete checkboxes. "Does the answer cite the refund window? Y/N" is reliable. "Rate helpfulness 1-5" is not.

Symptom: Benchmark scores look great, real users complain.
Cause: Benchmarks don't measure your distribution.
Fix: Build the golden set. Stop optimizing for leaderboard numbers.

$39

Real-world use cases

  • Customer support bot: golden set of 300 real tickets with rubrics, judged nightly by GPT-4o. Alerts Slack if score drops >0.2 week-over-week.
  • Code generation: HumanEval + BigCodeBench for baseline, plus internal eval on 200 repo-specific tasks. Pass@1 tracked per release.
  • RAG system: Ragas for faithfulness/relevance, plus LLM-as-judge on 500 production queries weekly.
  • Summarization: ROUGE-1/2/L for sanity, BERTScore for semantic, human eval on 50 samples per release for tone and factuality.

Conclusion

LLM eval is not a solved problem and pretending otherwise is how teams ship confident-sounding models that break in production. The playbook that works in practice: run standard benchmarks for coarse comparison, build a private golden set that mirrors your traffic, use LLM-as-judge for scale with awareness of its biases, run human eval on a sample for every release, and instrument production for online drift. Do all five and you'll catch regressions before your users do. Skip any one and you're back to vibe checks, just dressed up with numbers.


Originally published on Mango Developer.

Top comments (0)