LLM Evaluation Notes (Part 3): Why One LLM Application Needs Multiple Evaluation Pipelines
Quick Recap
In the previous lecture, we covered three fundamental questions:
1. Why do we need LLM Evaluations?
Without evaluation, deploying an LLM application directly to production can cause:
- Wrong answers
- Hallucinations
- Poor user experience
- Safety issues
- Business losses
Goal: Ensure the system is reliable before deployment.
2. What are LLM Evaluations?
LLM Evaluations are:
A systematic and reliable way of evaluating LLMs or LLM-based applications against predefined criteria.
There are two major types:
Model Evaluation
Evaluates the language model itself.
Examples:
- MMLU
- HLE
- HumanEval
- GPQA
Mostly performed by Frontier Labs.
Application Evaluation
Evaluates the complete LLM application built using one or more models.
Examples:
- RAG systems
- AI Agents
- Chatbots
- Email classifiers
This course mainly focuses on Application Evaluations.
3. How are LLM Applications Evaluated?
Typical evaluation workflow:
Define Task
↓
Define Success Metrics
↓
Build Golden Dataset
↓
Choose Evaluation Method
↓
Run System
↓
Evaluate Results
↓
Analyze Errors
↓
Improve System
↓
Repeat
↓
Deploy
↓
Monitor Production
↓
Add Production Failures to Dataset
↓
Repeat Evaluation
Today's Topic
Why does one LLM application require multiple evaluation pipelines?
Most beginners think:
"I'll evaluate my application once."
Reality:
One application usually needs many evaluation pipelines.
Why?
Two major reasons:
- Multiple Failure Points
- Multiple Risk Categories
Reason 1 — Multiple Failure Points
Consider a simple RAG chatbot.
Architecture:
User Query
│
▼
Retriever
│
▼
Vector Database
│
Relevant Documents
│
▼
Generator (LLM)
│
▼
Final Answer
Failure Point 1 — Retriever
Retriever's job:
Query
↓
Find Relevant Documents
Possible failures:
- Wrong documents retrieved
- Missing relevant document
- Irrelevant context
- Poor ranking
Therefore we need:
Retriever Evaluation Pipeline
Checks:
- Context Relevance
- Retrieval Recall
- Retrieval Precision
- Ranking Quality
Failure Point 2 — Generator
Generator receives:
- User Query
- Retrieved Documents
Its job:
Generate answer only from retrieved context.
Possible failures:
- Hallucination
- Wrong reasoning
- Ignoring context
- Making up facts
Therefore we need:
Generator Evaluation Pipeline
Checks:
- Faithfulness
- Groundedness
- Answer Correctness
- Completeness
Important Observation
Even if:
✅ Retriever works
AND
✅ Generator works
The overall pipeline may still fail.
Example
User asks:
What is the duration of the ML course?
Retriever returns Top-5 documents:
D1 → Python course (6 weeks)
D2 → Java course
D3 → AI course
D4 → Random
D5 → ML course (8 weeks)
Retriever technically succeeds because the correct document is in Top-5.
Generator receives:
D1
D2
D3
D4
D5
Suppose the generator gives higher priority to earlier documents.
It generates:
ML course duration = 6 weeks
Wrong answer.
Did Retriever fail?
No.
Correct document existed.
Did Generator fail?
Not necessarily.
It followed the prompt using higher-ranked documents.
Yet the application failed.
Why?
Because the interaction between Retriever and Generator failed.
Therefore we need another evaluation
Workflow-Level Evaluation
Instead of evaluating components separately:
Retriever ✔
Generator ✔
We evaluate:
Retriever
+
Generator
+
Interaction
This checks whether the complete pipeline produces the correct output.
Possible fixes after workflow evaluation:
- Better ranking
- Better prompts
- Add reranker
- Better retrieval strategy
- Better context ordering
Workflow Evaluation Example
Query
↓
Retriever
↓
Documents
↓
Generator
↓
Answer
Evaluation checks:
- Was correct context retrieved?
- Was it used properly?
- Did answer match context?
- Did components work together?
But is that enough?
Suppose:
Retriever ✔
Generator ✔
Workflow ✔
Is the application now perfect?
No.
Application-Level Problems
Example:
Everything is correct.
But response takes:
10 seconds
Correct?
Yes.
Deployable?
No.
Users won't wait 10 seconds.
Therefore we also need
Application-Level Evaluation
Checks:
- Latency
- Cost
- Token usage
- Reliability
- Throughput
- User experience
Three Levels of Evaluation
LLM Application
↓
1. Component Level
Evaluate each component individually.
Examples:
- Retriever
- Generator
- Embedding model
- Query Rewriter
- Reranker
- Output Parser
- Guardrails
- Memory
- Tool Selector
2. Workflow Level
Evaluate interaction between components.
Examples:
Retriever
↓
Generator
or
Agent
↓
Tool
↓
Memory
↓
Planner
3. Application Level
Evaluate complete system.
Examples:
- Latency
- Cost
- Reliability
- User satisfaction
- Production readiness
Why Multiple Evaluations?
Because failures can occur at three levels.
Application
│
▼
Workflow
│
▼
Components
Each level requires its own evaluation.
Reason 2 — Multiple Risk Categories
Even for the same component, we evaluate different kinds of risks.
Example:
Retriever.
Questions:
- Are retrieved documents relevant?
- Is retrieval fast?
- Is retrieval cheap?
- Is retrieval reliable?
These are different evaluation dimensions.
Three Major Risk Categories
Risk Categories
│
├── Application Quality
├── Safety
└── Operations
1. Application Quality
Checks whether the application performs its intended task correctly.
Questions:
- Is answer correct?
- Is answer relevant?
- Is answer complete?
- Does it follow instructions?
General LLM Applications
Metrics:
- Correctness
- Accuracy
- Relevance
- Completeness
- Instruction Following
Example:
Text summarizer.
Check:
- Is summary correct?
- Is important information preserved?
- Did it follow requested format?
RAG Applications
Metrics:
- Context Relevance
- Retrieval Recall
- Groundedness
- Faithfulness
- Citation Accuracy
Agent Applications
Metrics:
- Tool Selection
- Parameter Correctness
- Task Completion
- Error Recovery
Multi-turn Chatbots
Metrics:
- Context Retention
- Clarification Behavior
- Conversation Consistency
- Memory Usage
2. Safety
Ensures outputs are safe.
Major safety evaluations:
Toxicity
No abusive or offensive content.
Harmful Content
Avoid generating:
- Self-harm advice
- Illegal activities
- Weapon instructions
Bias
Avoid unfair treatment based on user characteristics.
Privacy
Prevent leakage of:
- Phone numbers
- Emails
- Credit card details
- Personal information
Prompt Injection & Jailbreak Resistance
Checks whether attackers can manipulate the model into ignoring instructions or revealing restricted information.
3. Operations
Measures production performance.
Common metrics:
- Latency
- Cost per request
- Token efficiency
- Error rate
- Failure rate
- Throughput
- Latency under load
Complete Picture
LLM Application
│
├── Component Evaluations
│ ├── Retriever
│ ├── Generator
│ ├── Embeddings
│ ├── Reranker
│ └── Guardrails
│
├── Workflow Evaluations
│ ├── RAG Pipeline
│ ├── Agent Workflow
│ └── Multi-turn Flow
│
└── Application Evaluations
├── Quality
├── Safety
└── Operations
Why Do We Need Multiple Evaluation Pipelines?
Reason 1: Multiple Failure Points
Failures can happen at:
- Component level
- Workflow level
- Application level
Each needs its own evaluation.
Reason 2: Multiple Risk Categories
Every failure point must be evaluated for different risks:
- Application Quality
- Safety
- Operations
Key Takeaways
- One LLM application almost always requires multiple evaluation pipelines.
- Evaluating individual components alone is not enough; workflows and the complete application must also be evaluated.
- Failures can occur at component, workflow, or application levels.
- Each level is assessed across quality, safety, and operational risk categories.
- Component-level success does not guarantee end-to-end application success.
- Production monitoring is essential because new failures should continuously enrich the golden dataset and drive iterative improvement.