LLM Evaluation Notes (Transcript Chunk 1)
English Translation
Now that we understand why LLM evaluations are needed, why they are important, and how LLM evaluations are different from traditional software testing, let's move on to the main topic:
What are LLM Evaluations?
So far, we have discussed this only at a high level. Now we will study it in more detail.
The definition is:
LLM Evaluations are systematic, repeatable tests used to judge an LLM or an LLM-powered system against a clear criterion.
This means that LLM evaluations are tests applied either to an LLM itself or to an LLM-based application. These tests have three important characteristics:
- They are systematic.
- They are repeatable.
- They have clear evaluation criteria.
These three characteristics are extremely important.
Detailed Notes
What are LLM Evaluations?
Definition
LLM Evaluations are systematic, repeatable tests used to judge an LLM or an LLM-powered system against clear evaluation criteria.
LLM evaluations can be performed on:
- An LLM (model)
- An LLM-powered application
Three Characteristics of LLM Evaluations
1. Systematic
LLM evaluations are not random testing.
The speaker compares this with vibe testing.
Vibe Testing
Think of 5 random questions
↓
Ask the chatbot
↓
Get answers
↓
Assume everything is correct
This is not proper evaluation.
Proper Systematic Evaluation
Instead of asking random questions:
- Create proper datasets.
- Try to include different types of edge cases.
- Test the chatbot using those datasets.
Example
If building the CampusX chatbot:
- Collect around 100 real user conversations.
- Create a dataset from those chats.
- Run evaluations using that dataset.
Purpose:
To observe the chatbot's behavior in a real-world scenario.
2. Repeatable
An evaluation should produce comparable results even if the system changes.
The speaker gives several examples of possible changes:
- Prompt changes
- Model changes
- Retriever changes
- Chunking strategy changes
Even after these changes:
- The same evaluation dataset should still be usable.
- Results should be comparable.
This helps compare different software versions.
Example:
Evaluation Dataset
│
├── Version 1
│ ↓
│ Performance
│
└── Version 2
↓
Performance
Using the same dataset makes it possible to determine whether Version 2 performs better than Version 1.
3. Clear Evaluation Criteria
Evaluation depends on what criteria you want to measure.
Example: CampusX Chatbot
Possible evaluation criteria:
- Answer should be correct.
- Answer should have simple explanations.
- Explanations should come from the course content.
- Response should be safe.
- Response should not contain abusive language.
- Response should not have a threatening tone.
The speaker emphasizes:
Without criteria, you are doing vibe testing.
With criteria, you are doing proper evaluation.
Summary of LLM Evaluations
According to the speaker:
LLM evaluations are tests that help evaluate:
- An LLM
- An LLM-powered application
using:
- Clear criteria
- A systematic process
- Repeatable testing
Clarification: LLM Evaluation ≠ Metrics
The speaker shares a common misunderstanding.
Coming from Machine Learning and Deep Learning, he initially thought:
Evaluation = Metrics
Examples from ML:
- Accuracy
- Precision
- Recall
He assumed LLM evaluation also meant only a collection of metrics.
The speaker says:
This is incorrect.
What Does "LLM Evaluation" Actually Mean?
LLM Evaluation is not just metrics.
It is the entire testing setup used to evaluate an LLM or an LLM-powered application.
Components of the Testing Setup
The testing setup includes:
- What is being evaluated.
- Evaluation criteria.
- Evaluation dataset.
-
When evaluation is performed.
-
Offline
- After deployment (production)
- Tools used for evaluation.
Example:
If evaluating a RAG chatbot:
Possible components include:
- Retriever
- Retriever accuracy
- Evaluation dataset
- Offline or production evaluation
- Evaluation tool (e.g., Ragas)
The speaker summarizes:
LLM Evaluation means the complete testing setup, not just evaluation metrics.
Goal of LLM Evaluation
The goal is not simply to produce a score.
Instead, it answers practical questions.
Examples mentioned by the speaker:
- Can the model be used for a particular application?
- Is the system good enough for production?
- Is Prompt Version 2 better than Prompt Version 1?
- Is the RAG answer grounded in the retrieved context?
- Is the agent completing the task correctly?
- Is the chatbot safe for real users?
- Is latency under control?
According to the speaker:
LLM Evaluation exists to answer these practical questions.
Two Types of LLM Evaluations
The speaker divides LLM evaluations into two categories.
1. Model Evaluation
Purpose:
Evaluate the LLM itself.
2. Application Evaluation
Purpose:
Evaluate an LLM-powered application.
Important Note
The speaker explicitly mentions that:
"Model Evaluation" and "Application Evaluation" are not official industry terms.
He created these names only to simplify the explanation.
In industry, both are generally referred to simply as LLM Evaluations, and the intended meaning is understood from the context.
Model Evaluation
Definition
Model evaluations evaluate the model itself.
Main goal:
Test and evaluate the capabilities of an LLM.
Why Model Evaluation?
Whenever a new LLM is released:
- Its capabilities are tested.
- Results are benchmarked.
- Results are documented.
The speaker mentions that companies publish:
- Benchmark results
- Leaderboard rankings
- Accuracy values
to show how capable a new LLM is.
Capabilities Evaluated
The speaker lists eight major capability categories.
1. Reasoning
Can the model solve problems step by step?
2. Knowledge
Does the model possess general world knowledge up to its knowledge cutoff?
3. Mathematics
Can the model solve math problems?
4. Coding
Can the model perform coding tasks?
5. Instruction Following
Can the model follow multiple instructions correctly?
6. Long Context Handling
Can the model answer correctly even when given a very long context?
7. Multimodal Understanding
Can the model understand:
- Images
- Text
- Audio
and generate appropriate outputs?
8. Tool Use
Can the model properly utilize tools?
Benchmarks
The speaker explains that these capabilities are evaluated using benchmarks.
Examples mentioned:
| Capability | Benchmark |
|---|---|
| General Knowledge & Reasoning | MMLU |
| Mathematics | GSM8K |
| Coding | SWE-Bench, HumanEval |
| Instruction Following | IFEval |
| Long Context | Needle in a Haystack |
| Multimodal | MMMU |
Who Performs Model Evaluation?
According to the speaker:
Model evaluations are generally performed by frontier labs when releasing new models.
As an AI Engineer:
You usually do not perform these evaluations.
Instead, you should know:
- What model evaluation is.
- What benchmarks are.
- How to read benchmark results.
This knowledge helps you decide which model to use in your own projects.
Application Evaluation
The speaker says this is the main focus of the course.
As an AI Engineer:
Building LLM-powered applications is your responsibility.
Therefore:
Evaluating those applications is also your responsibility.
Why Application Evaluation Exists
The speaker explains that:
An LLM is only one component of an LLM application.
Many additional components are required.
Examples mentioned:
- User Interface
- System Prompt
- Tools
- APIs
- Orchestration code
- Guardrails
- Output Parsers
- Memory
- Context
- Retrieval system
- Embedding model
- Vector database
- Monitoring
- Feedback loop
Therefore:
Evaluating only the LLM is not enough.
The complete application must also be evaluated.
Smartphone Analogy
The speaker compares an LLM application to a smartphone.
A smartphone has:
- Processor
- Camera
- Operating System
- Sound System
- Graphics
- Battery
Even if the processor is excellent, the smartphone cannot be considered good unless all other components also work well.
Similarly:
An LLM may be highly capable, but the surrounding application components must also function correctly.
Definition of Application Evaluation
Application evaluations assess:
- The behavior
- The performance
of an LLM-powered application.
Evaluation can happen at:
- Whole-system level
- Individual component level
Examples of Application Evaluation Questions
For a CampusX chatbot:
Application evaluation can answer:
- Was the student's question answered correctly?
- Was the course material used properly?
- Was the answer faithful?
- Was the answer easy for beginners?
- Did hallucination occur?
- Was the response generated quickly?
- Is the chatbot safe?
Final Summary of the Lecture
The speaker summarizes the lecture as follows:
Why?
Why are LLM evaluations needed?
What?
What are LLM evaluations?
Two types were discussed:
- Model Evaluation
- Application Evaluation
Next Topic
The next topic will be:
How LLM Evaluations are performed.
The speaker also clarifies that the upcoming discussion will focus on Application Evaluation, not Model Evaluation.