Search⌘ K
AI Features

Building LLM Eval Sets

Explore how to build small yet effective evaluation sets for large language models that capture critical failure modes. Understand selecting evaluation units, defining grading criteria, and creating reproducible tests to maintain quality in grounded Q&A systems with citations.

A retriever tweak seems better after three manual tries, then a different query type produces a confident answer with missing or wrong citations. The fix is not more vibes testing. The fix is a small evaluation set where each example makes a regression obvious because it pins down what the system was allowed to use and what the output must prove.

The scope of this lesson is turning fuzzy quality judgments for grounded Q&A with citations into a dataset we can run repeatedly.

Define the evaluation unit

With a minimal item in hand, the next step is choosing the evaluation unit so scores map to a real system behavior. For grounded Q&A, the input is usually the user question plus the retrieved context we want the model to rely on, captured as text chunks with stable source identifiers. The output is the answer plus whatever citation structure our app emits, such as inline markers or a citations array keyed by source_id ...