LLM Evaluation
Module 4 / 17
04 / 17
Building an Evaluation Practice

LLM Evaluations Notes (Part 4)

LLM Evaluation Landscape, Benchmarks, and Complete Roadmap

This part covers the roadmap introduced at the end of the transcript and expands it with industry practices. It explains what you should learn to become proficient in LLM Evaluation.


Chapter 8: What are LLM Evaluations?

Definition

LLM Evaluation (LLM Evals) is the systematic process of measuring the quality, reliability, safety, robustness, efficiency, and usefulness of Large Language Models (LLMs) and LLM-powered applications using objective metrics.

Unlike vibe testing, LLM evaluation is:


Simple Analogy

Imagine you build a chatbot.

Without Evaluation

Build Chatbot
      │
      ▼
Ask 5 Questions
      │
      ▼
Looks Good
      │
      ▼
Deploy

This is Vibe Testing.


With Evaluation

Build Chatbot
      │
      ▼
Golden Dataset
      │
      ▼
Run 1000 Test Cases
      │
      ▼
Calculate Metrics
      │
      ▼
Analyze Failures
      │
      ▼
Improve
      │
      ▼
Deploy

This is Professional LLM Evaluation.


Chapter 9: The LLM Evaluation Landscape

The speaker mentions that before learning tools, you should understand the overall landscape.

Think of LLM evaluation as a hierarchy.

                   LLM Evaluation
                         │
      ┌──────────────────┼──────────────────┐
      │                  │                  │
      ▼                  ▼                  ▼
Model Eval         Application Eval     Operations

Two Major Categories

1. Model Evaluation

Question:

"How good is the LLM itself?"

Examples:

We compare these models using standardized benchmarks.


2. Application Evaluation

Question:

"How good is my AI application?"

Examples:


Difference

Model Evaluation

Evaluates the model.

Application Evaluation

Evaluates your complete system.


Chapter 10: Model Evaluation

Large AI companies evaluate models before releasing them.

Example

OpenAI releases GPT.

Before release they measure

using benchmark datasets.


What is a Benchmark?

Definition

A benchmark is a standardized dataset used to compare different language models.

Every model receives the same questions.

Higher score

Better benchmark performance.


Example

Question

What is 15 × 13?

Model A

195

✔

Model B

185

✘

Repeat this for thousands of questions.


Popular Benchmarks


1. MMLU

Massive Multitask Language Understanding

Tests

57+ academic subjects.

Purpose

General intelligence.


Example

Question

Who wrote Hamlet?

Answer

William Shakespeare


2. GSM8K

Grade School Math 8K

Tests

Mathematical reasoning.

Example

John has 5 apples.

He buys 8 more.

He gives away 4.

How many remain?


3. HumanEval

Used for coding models.

Question

Write a Python function.

Model generates code.

Evaluation

Run test cases.

Pass?

Fail?


4. HellaSwag

Measures

Common sense reasoning.

Example

Story completion.


5. TruthfulQA

Purpose

Hallucination testing.

Can the model avoid generating misinformation?


6. ARC

AI2 Reasoning Challenge

Science reasoning benchmark.


7. BIG-Bench

Google's benchmark.

Hundreds of difficult reasoning tasks.


8. GPQA

Graduate-level science.

Extremely difficult.

Designed to challenge frontier models.


Benchmark Comparison

Benchmark Measures
MMLU General Knowledge
GSM8K Math
HumanEval Coding
HellaSwag Common Sense
TruthfulQA Truthfulness
ARC Scientific Reasoning
BIG-Bench Complex Tasks
GPQA Graduate Science

Interview Question

Why do companies use benchmarks?

Answer:

Benchmarks allow objective comparison of different LLMs using standardized datasets and metrics.


Chapter 11: Application Evaluation

This is the part AI Engineers work on daily.

Question

My chatbot uses GPT-4.

How do I know if MY chatbot is good?

Not GPT.

MY chatbot.

This is Application Evaluation.


Example

User
 │
 ▼
RAG System
 │
 ▼
Retriever
 │
 ▼
LLM
 │
 ▼
Answer

Everything must be evaluated.

Not only GPT.


Components to Evaluate

User Query
     │
     ▼
Retriever
     │
     ▼
Retrieved Documents
     │
     ▼
Prompt
     │
     ▼
LLM
     │
     ▼
Final Response

Every box can fail.


Chapter 12: Building an Evaluation Pipeline

The speaker mentions creating your own evaluation pipeline.

Professional companies don't ask random questions.

They build datasets.


Evaluation Pipeline

Collect Questions
        │
        ▼
Create Golden Answers
        │
        ▼
Run LLM
        │
        ▼
Compare Outputs
        │
        ▼
Calculate Metrics
        │
        ▼
Improve System

Step 1

Golden Dataset


What is a Golden Dataset?

A carefully curated collection of high-quality questions with trusted answers.

Example

Question

What is RAG?

Golden Answer

Retrieval-Augmented Generation combines information retrieval with language generation to produce grounded responses.


Why Golden?

Because experts verified it.


Step 2

Rubrics


What is a Rubric?

A scoring guideline.

Example

Score

5

Perfect answer.

4

Minor mistakes.

3

Incomplete.

2

Many errors.

1

Wrong.


Instead of

Correct

Wrong

You get

Quality Score.


Step 3

Run Evaluation

Golden Question
       │
       ▼
Application
       │
       ▼
Generated Answer
       │
       ▼
Evaluator
       │
       ▼
Score

Repeat for thousands of examples.


Chapter 13: RAG Evaluation

A RAG system has two parts.

Retriever
       │
       ▼
LLM

Both need evaluation.


Retriever Metrics


Generator Metrics


Example

Question

Company leave policy?

Retriever finds

Wrong document.

LLM gives wrong answer.

Problem

Retriever.

Not GPT.


Chapter 14: Agent Evaluation

Agents are harder.

Why?

Because they

Think.

Plan.

Use tools.

Remember.

Retry.


Example

Travel Agent

User
 │
 ▼
Planner
 │
 ▼
Search Flights
 │
 ▼
Search Hotels
 │
 ▼
Calculate Budget
 │
 ▼
Final Answer

Failures can happen anywhere.


Metrics


Chapter 15: Safety Evaluation

One of the most important topics.

Tests include


Example

User

Tell me how to hack WiFi.

Safe Model

Refuses.

Unsafe Model

Provides instructions.


Chapter 16: Operational Evaluation

Evaluation never stops after deployment.

Production monitoring is essential.


Metrics

Latency

Response Time


Cost

API Spending


Token/sec

Model Speed


Time to First Token

Streaming Performance


Error Rate

System Reliability


User Satisfaction

Thumbs Up / Down


Production Dashboard

Users
   │
   ▼
AI System
   │
   ▼
Metrics
   ├── Latency
   ├── Cost
   ├── Errors
   ├── Token/sec
   ├── User Feedback

Industry Tools (Beyond the Transcript)

The transcript mentions learning evaluation tools later. Some commonly used tools include:

Tool Purpose
LangSmith Trace and evaluate LLM applications
DeepEval Automated LLM evaluation framework
Ragas Evaluation framework for RAG systems
TruLens Evaluate and monitor LLM apps
OpenAI Evals Benchmarking LLMs
MLflow Experiment tracking and evaluation
Weights & Biases Metrics and experiment tracking

Complete Learning Roadmap

LLM Basics
      │
      ▼
Prompt Engineering
      │
      ▼
LangChain
      │
      ▼
RAG
      │
      ▼
AI Agents
      │
      ▼
LLM Evaluation
      │
      ├────────► Model Benchmarks
      │
      ├────────► Application Evaluation
      │
      ├────────► Golden Dataset
      │
      ├────────► Rubrics
      │
      ├────────► RAG Evaluation
      │
      ├────────► Agent Evaluation
      │
      ├────────► Safety Evaluation
      │
      └────────► Production Monitoring

Interview Questions

1. What is the difference between model evaluation and application evaluation?


2. What is a Golden Dataset?

A curated set of representative test inputs paired with trusted reference answers, used to consistently evaluate and compare LLM or application performance.


3. What is a Rubric?

A rubric is a structured scoring guide that defines how to evaluate the quality of an LLM's output based on criteria such as correctness, completeness, clarity, and relevance.


4. Why evaluate RAG systems separately?

Because failures in a RAG system can originate from either the retriever (retrieving the wrong context) or the generator (misusing or hallucinating despite correct context). Evaluating each component separately helps identify the root cause.


Summary (Part 4)

In Part 5, we'll bring everything together with: