# Why and How to Evaluate LLM Apps

> Evals are the unit tests of AI engineering; learn what to measure, which graders to use and how evals drive every decision. Free notes, key concepts, resources...

Canonical: https://www.internhack.in/roadmaps/tracks/ai-engineer/eval-fundamentals
Last updated: 2026-11-28

Evals are the unit tests of AI engineering; learn what to measure, which graders to use and how evals drive every decision.

Intermediate · about 5 hours · difficulty 3/5

Learn first: [Prompt Templates, Versioning and Iteration](https://www.internhack.in/roadmaps/tracks/ai-engineer/prompt-management)

LLM outputs are non-deterministic and open-ended, so "it looked fine when I tried it" is not evidence. An **eval** is a repeatable measurement: a set of inputs, the outputs your system produces, and a way to score them. Teams that ship reliable AI products are almost always the ones with good evals.

### What evals let you do

- Compare prompts, models and retrieval settings with numbers rather than vibes.
- Catch **regressions** when a prompt, dependency or model version changes.
- Decide whether a cheaper or faster model is good enough.
- Know when you are done iterating.

### Types of graders

- **Code-based checks**: exact match, regex, JSON schema validity, "contains the order id", length limits, whether the right tool was called. Fast, cheap and objective; use them wherever possible.
- **Model-based graders (LLM-as-judge)**: another model scores against a rubric. Great for tone, helpfulness and faithfulness, but they need calibration.
- **Human review**: the gold standard for nuanced quality, used to build and check the other two.

### Start small

Begin with 20 to 50 realistic examples, including hard and adversarial ones, before you optimize anything. Read the outputs yourself. **Error analysis** (grouping failures into categories) tells you what to fix and which metrics to add.

### Good enough to move on

You can explain the difference between code, model and human graders, and you have an eval script that runs your app over 30 examples and prints a score per example and overall.

## Key concepts

- **Why vibe checks fail**
- **Code-based graders**
- **Model-based graders**
- **Human review**
- **Error analysis and failure categories**
- **Choosing metrics per use case**

## Mini project

Write an eval harness for a ticket classification prompt: 40 labelled tickets, exact-match accuracy, a confusion table, and a report comparing two prompt versions.

## Check yourself

Your summarizer scores 92% on an LLM judge but users complain. What would you check first?

## Free resources

- [Anthropic docs: define success criteria and build evaluations](https://docs.anthropic.com/en/docs/test-and-evaluate/develop-tests) (Anthropic)
- [OpenAI docs: evals](https://platform.openai.com/docs/guides/evals) (OpenAI)
- [Hamel Husain: Your AI product needs evals](https://hamel.dev/blog/posts/evals/) (hamel.dev)

Previous: [Computer Use and Browser Agents](https://www.internhack.in/roadmaps/tracks/ai-engineer/computer-use-agents) · Next: [Building Golden Datasets](https://www.internhack.in/roadmaps/tracks/ai-engineer/golden-datasets)

## More in Evaluation and Observability

- [Why and How to Evaluate LLM Apps](https://www.internhack.in/roadmaps/tracks/ai-engineer/eval-fundamentals)
- [Building Golden Datasets](https://www.internhack.in/roadmaps/tracks/ai-engineer/golden-datasets)
- [LLM-as-Judge Graders](https://www.internhack.in/roadmaps/tracks/ai-engineer/llm-as-judge)
- [Regression Testing and Evals in CI](https://www.internhack.in/roadmaps/tracks/ai-engineer/eval-driven-development)
- [Tracing and LLM Observability](https://www.internhack.in/roadmaps/tracks/ai-engineer/tracing-observability)
- [Production Feedback and Online Evaluation](https://www.internhack.in/roadmaps/tracks/ai-engineer/online-evaluation)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [AI Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/ai-engineer)
