LLM Evals — Cheat Sheet

Quick-reference summary · Page 04: Why Apps Need Multiple Evaluation Pipelines

1-PAGE REFERENCE

1Quick Recap

Model EvalApp Eval
EvaluatesThe LLM itselfApp built on models
MethodBenchmarks (reasoning, coding...)Does the app do its job?

As an AI engineer you'll spend far more time on app evals than model evals.

2Why Multiple Pipelines?

One app can have multiple failure points and multiple risk categories — one eval is never enough.
  • Reason 1 — components/workflows can fail independently.
  • Reason 2 — correct ≠ safe ≠ cheap ≠ fast; each is a separate risk.

3RAG Example: Failure Points

Query Retriever Vector DB Docs Generator Answer
  • Retriever fail — wrong/irrelevant docs returned.
  • Generator fail — ignores context or hallucinates.

4Component-Level Eval

Retriever: given a query, does it return the correct, relevant docs?

Groundedness/Faithfulness: the generated answer must be supported by the given context — no invented extras.

5Workflow-Level Eval

Retriever ✓ + Generator ✓ ≠ Workflow ✓. Independently-correct components can still combine into a wrong output.

Component-level correctness ≠ workflow-level correctness.

6Worked Failure: K=5 Retrieval

Correct doc (D5) is retrieved within top-5 → retriever "passed." But generator prioritizes higher-ranked D1–D4, which mention a different course's duration → wrong final answer.

Lesson: retriever correct, generator correct, workflow still wrong — ranking mattered.

Fix: add a reranker to reorder docs (D5 → rank 1) before generation.

7Application-Level Eval

Retriever ✓, Generator ✓, Workflow ✓ — still not guaranteed production-ready.

Example: correct answers but 10s latency per query = unacceptable UX.
Latency TTFT Cost/request Token efficiency Error rate Load performance

8Three Failure Levels

ApplicationHigh latency/cost/error rate, poor load handling, bad UX
WorkflowRAG retrieve+generate, agent plan+act, multi-turn chat
ComponentPrompt, retriever, reranker, embeddings, vector DB, parser, tool selector, memory, guardrails

Evaluation must cover all three — Component → Workflow → Application.

9Three Risk Categories

Application Quality Safety Operations

A correct answer can still fail on safety or be too slow/expensive to ship.

10Application Quality Risks

  • Correctness/accuracy — factually right?
  • Relevance — addresses the actual query?
  • Completeness — covers everything asked?
  • Instruction following — format/length/structure honored?

11RAG-Specific Risks

Context RelevanceRetrieved docs relevant?
Retriever RecallGot the needed info?
GroundednessAnswer based on context?
FaithfulnessNo invented facts?
Citation AccuracyCited sources actually support claims?

Retrieval quality = right info found. Groundedness = answer actually used it.

12Agent-Specific Risks

  • Tool selection — right tool for the job?
  • Parameter correctness — right args passed?
  • Task completion — did it finish the task?
  • Error recovery — handles failures gracefully?

Eval isn't just the final answer — also the decisions/actions along the way.

13Multi-Turn Chatbot Risks

  • Context retention — remembers earlier turns correctly?
  • Clarification behavior — asks instead of guessing on ambiguity?

14Safety Risks

A factually correct answer can still be unacceptable if unsafe (e.g. leaking another user's PII).
Toxicity Harmful content Bias Privacy/PII leak Prompt injection Jailbreak

15Operational Risks

LatencyResponse time
TTFTTime to first token
Cost/request$ per query
Token efficiencyTokens used well?
Error rateFailure frequency
Latency under loadStays fast at scale?

16Combined Framework

LevelQualitySafetyOps
ComponentRetriever relevance, faithfulness, tool selectInjection, unsafe tool useComponent latency
WorkflowE2E correctness, groundednessSafety across stepsWorkflow latency/cost
AppCorrectness, relevance, completenessToxicity, bias, privacy, jailbreakLatency, cost, reliability, scale

17Building the Pipelines

App Find Failure Points Find Risk Categories Build Evals Measure & Improve

One RAG app can carry: retriever relevance, retriever recall, reranker, groundedness, faithfulness, citation accuracy, E2E workflow, safety, latency, cost, error-rate evals — all at once.

18Key Takeaways

  • Component-level pass ≠ workflow-level pass.
  • Workflow-level pass ≠ production-ready application.
  • Three failure levels: Component → Workflow → Application.
  • Three risk categories: Quality, Safety, Operations.
  • A correct-but-unsafe or correct-but-slow answer is still a failure.
  • 99.99% of serious LLM apps need >1 eval pipeline.
  • Only build evals tied to a real, meaningful failure point or risk.

19Final Mental Model

  1. Find the failure points.
  2. Identify the risk categories.
  3. Evaluate individual components.
  4. Evaluate component interaction (workflow).
  5. Evaluate the complete application.
  6. Continuously monitor quality, safety & operations.