LabHub

Blog

LLM Evaluation & Observability: Eval Harness, LLM-as-Judge, Tracing, Regression Prevention (2025)

한국어English日本語

Season 4 Ep 6 — Ep 1–5 covered "how to build". Ep 6 covers "how do you know it actually works". An LLM product without evaluation is a car driven blindfolded.

Prologue — The End of "LGTM-Driven Development"

Until 2023, many LLM products were built via "Looks Good To Me" development: tweak the prompt, run it a few times, say "oh, seems better", merge. If a regression occurred, it ended with "no idea why".

In 2025, that no longer works:

  1. Product scale: hundreds of millions of calls per month; one regression hits tens of thousands of users.
  2. Team scale: multiple engineers touch the same prompts and models → diffused responsibility.
  3. Competition: one month of inaction lets rivals pull ahead → fast iteration is mandatory, which only evaluation-driven workflows enable.

In short, in LLM products evaluation must be as routine as test automation in software engineering, not a one-off ML evaluation event.


1. Four Layers of Evaluation

1.1 Layer 0 — Structural / Smoke Tests

The basics. Must run on every PR in CI.

1.2 Layer 1 — Golden Set Ground-Truth Comparison

1.3 Layer 2 — Quality Judgment

1.4 Layer 3 — Production Metrics

Higher layers provide stronger signal but worse frequency, cost, and speed. Combine wisely.


2. Building the Eval Dataset

2.1 Diversify Sources

2.2 Size

2.3 Labeling

2.4 Splits


3. LLM-as-Judge — Blessing and Curse

3.1 Basic Idea

Ask a large model (GPT-4o, Claude 3.5/4, etc.) "is this response correct?" for automated evaluation.

System: You are a fair evaluator.
User:   [question] [response]
        Does this response answer the question correctly? yes/no with a one-line reason.

3.2 Upsides

3.3 Fatal Pitfalls

  1. Position bias: in "which is better?" pairwise, flipping A/B can flip the verdict.
  2. Length bias: longer answers judged better.
  3. Self-preference: GPT rates GPT-generated text higher (cross-model bias).
  4. Rubric variance: even with the same rubric, scores vary across runs.
  5. Easy-to-game: if the eval prompt is known, models learn to "fool" the judge.

3.4 Calibration Techniques

3.5 Keep Humans in the Loop


4. Observability — Trace / Span / Metric

4.1 Terminology

4.2 OpenTelemetry — the De Facto Standard

As of 2025, LLM observability is converging on OpenTelemetry schemas (OpenLLMetry, OpenInference). Instrumenting with OTEL SDKs makes vendor switching trivial.

4.3 LLM-Specific Attributes

In addition to standard trace attributes:

4.4 Aggregate Metrics


5. Vendor Comparison

5.1 LangSmith

5.2 LangFuse

5.3 Arize Phoenix

5.4 Helicone

5.5 Weights & Biases Weave

5.6 Selection Guide

SituationPick
LangChain/LangGraph stackLangSmith
Self-hosting required (regulated)LangFuse
RAG-heavy, embedding drift mattersPhoenix
Gateway for fast rolloutHelicone
Research + experimentsW&B Weave
Already on Datadog/New RelicVendor's LLM extension (OpenLLMetry)

6. RAG Evaluation

6.1 Measure Separately

Without separating retrieval vs. generation failures, tuning is guesswork.

6.2 Frameworks like RAGAS

Open-source RAGAS, DeepEval compute these metrics automatically.

6.3 Golden Q&A Set


7. Agent Evaluation

7.1 Metrics

7.2 Trajectory Evaluation

Not just the outcome — the trajectory matters.

7.3 Replay-Based Evaluation


8. Wiring Eval into CI/CD

8.1 PR Stage

8.2 Post-Main-Merge

8.3 Weekly Full Run

8.4 Shadow & A/B

8.5 Canary


9. Safety, Bias, Hallucination

9.1 Safety Benchmarks

9.2 Bias

9.3 Hallucination

9.4 Refusal Appropriateness


10. Incident Response Playbook

10.1 SEV Definitions

10.2 Response Order

  1. Block: turn off routing to the problematic model/prompt/version.
  2. Isolate: identify which config is at fault (logs / traces).
  3. Mitigate: roll back to last stable version.
  4. Root cause: combine eval set + logs.
  5. Prevent recurrence: permanently add the failure to the eval set.
  6. Postmortem: internal publication within 24–72h.

10.3 Checkpoints


11. User Feedback Loop

11.1 Collection

11.2 Usage

11.3 Privacy


12. Korean / Korean-Market Observability

12.1 Per-Language Metrics

12.2 Korean Eval Resources

12.3 Regulation & Audit

12.4 On-prem Observability


13. Ten Anti-Patterns

13.1 Deciding by "the numbers look good"

Without checking significance (sample size, variance).

13.2 Single-model LLM-judge

Self-preference bias. Use multi-judge + human sampling.

13.3 Eval/training set leakage

Check via hash-based dedup.

13.4 No regression tests in PRs

Regressions reach main before detection. Layer 0/1 mandatory in CI.

13.5 Storing raw PII

Regulatory violation + secondary damage on incident.

13.6 Watching cost, not quality

"Cheaper but satisfaction dropped" goes unnoticed.

13.7 No trace

Agent failures unexplained. Debugging impossible.

13.8 No user feedback

Throwing away the most valuable free signal.

13.9 Exposing the "test" set to tuning

Inflated results, disappointment next quarter.

13.10 No recurrence prevention

A team hitting the same failure three times has no eval system.


14. Pre-Launch Checklist (12 items)


15. Next — Season 4 Ep 7: "The Local LLM Era"

2025 is also the year local LLMs became practical.

The end of "depending on external APIs for everything". We draw a sharp line between when local LLMs make sense and when they don't.

See you next time.


TL;DR: Evaluation and observability are foundational infrastructure for LLM products. Split Layers 0–3 with matching frequency and cost; calibrate LLM-as-judge with position swap, multi-judge, and human review; instrument OpenTelemetry-based Trace/Span/Metric from day one. RAG, agents, and fine-tuning each require distinct evaluations, and incident playbooks plus user feedback loops power continuous improvement. "AI without measurement is a car without a steering wheel."

Comments

No comments yet.

Sign in to leave a comment