Md Tarek — Portfolio© 2026

Full-stack Developer

System Design — built to hold up.

dhaka → remote, worldwide

Loading experience

Md TarekTarek
AI

LLM Evaluation: Metrics, Benchmarks & Building a Real Eval Harness

By: Md Tarek · 17 Oct 2026

Evaluating language model outputs with automated scoring and human review
Evaluating language model outputs with automated scoring and human review

Executive Summary & Key Takeaways

  • You cannot improve what you cannot measure. Every prompt, model, and retrieval change needs a scored eval run, or you are just shipping vibes.
  • Benchmarks are for model selection, not your product. A model's MMLU or HumanEval score tells you little about how it performs on your specific documents and users.
  • Build a golden dataset of real, labeled examples covering the happy path, the edge cases, and the failure modes you have actually seen in production.
  • Start with deterministic checks — exact match, contains, JSON-schema validity — then add LLM-as-judge for open-ended quality, and keep a human in the loop for the final word.
  • Track regressions per change. A small eval suite run in CI catches prompt drift before it reaches users.

1. What to Measure

Split quality into the axes that actually matter for your product: correctness (did it answer the question), faithfulness (did it only use the provided context), relevance (did it address the ask), and safety (did it refuse or leak). Each needs its own metric; no single number captures all of them.

2. Deterministic Checks First

Before reaching for an LLM judge, exhaust the cheap checks. JSON output can be validated with a schema. Known answers can be exact-matched. Tool calls can be verified for shape and argument types. These are fast, free, and unambiguous — reserve the expensive judge for the genuinely subjective cases.

# A minimal eval loop
for case in golden_set:
    output = llm.run(case.prompt)
    for check in checks:
        score = check(output, case.expected)
        results.append((case.id, check.name, score))

3. LLM-as-Judge

Use a stronger model to score outputs on a rubric (1-5) against the reference answer. Pairwise comparison (is A better than B?) is more stable than absolute scoring. Always calibrate the judge against human labels — a judge that disagrees with humans is worse than no judge.

| Method | Cost | Speed | Reliability | Use for | |---|---|---|---|---| | Exact / schema match | free | instant | high | deterministic tasks | | LLM-as-judge (rubric) | low | seconds | medium | open-ended quality | | Human review | high | slow | highest | final gate, calibration |

4. Run Evals in CI

A tiny golden set (30-50 examples) run on every PR catches most regressions cheaply. Keep the full set for release gating. Version your prompts and evals together so you can always replay an old run.

FAQ

How big should my golden set be? Big enough to cover your top failure modes — 30 for CI, a few hundred for release. Coverage of edge cases matters more than raw size.