What are LLM evals?
LLM evals are checks that tell you whether an LLM application’s outputs are good enough for the people who use it. Each eval is either a code check, such as “the output parses as JSON”, or an LLM judge, a prompt that asks a model whether an output meets a criterion, such as “the reply answers the customer’s question”.
Start with the AI Evals FAQ
Hamel Husain and Shreya Shankar answer the questions people ask most about evals in AI Evals: Everything You Need to Know. Good first reads:
- What are AI evals?
- What’s a minimum viable evaluation setup?
- Why is error analysis so important, and how is it performed?
- Why binary (pass/fail) evaluations instead of 1-5 ratings?
- How do I know if I can trust my automated eval?
- How many examples do I need for an eval?
Our research
- Who Validates the Validators? (UIST 2024): EvalGen, a tool that uses your grades on a sample of outputs to pick LLM judges that agree with you. Our user study named criteria drift: grading outputs changes the criteria people want.
- Data Flywheels for LLM Applications: how evals, monitoring, and prompt changes fit into one loop.
- What We’ve Learned From a Year of Building with LLMs: practical advice on LLM judges, such as pairwise comparisons.
Questions
- Where do I start with evals for my LLM app, and which metrics should I use?
- Can I trust an LLM-as-a-judge? How do I know it agrees with human reviewers?
- Should I write my eval criteria or rubric before I look at model outputs?
- Should my LLM judge give a pass/fail or a 1 to 5 score?
- How do I make LLM-as-a-judge evaluations reliable?
- How do I write assertions or guardrails that catch bad LLM outputs in production?
- Can an LLM generate the test criteria or assertions for my prompt?
- How should I evaluate a RAG system in production?