Evaluate retrieval and generation before launch
Before launch, test each part of the chain on its own.
Score each link of the chain on its own
| Link of the chain | Measured by |
|---|---|
| ticket to retrieved chunks | recall at k |
| retrieved chunks to cited steps | faithfulness |
| ticket to cited steps, end to end | correctness |
Evaluate retrieval and generation separately, then together. When a suggestion is wrong, this tells you which link broke. Jerry Liu's talk, a few steps on, makes the same split.
To score retrieval, build a set of real tickets, each labeled with the policy sections that govern it. The labels come from three places, and each has a bias:
- Policy experts labeling a sample. The best labels, and the most expensive.
- Articles and saved replies that agents attached when they resolved tickets. Cheap and plentiful. But they only include what the old search surfaced: the same bias as clicks in search ranking, where labels come from what the old ranker showed.
- Questions written from each policy section. Good coverage of rarely asked rules. But they borrow the policy's wording, which flatters BM25.
Measure recall at the number of candidates you rerank, and at the number of chunks you put in the prompt. Slice it by language, country, policy area and ticket length. A 95% overall can hide 80% on one language.
In the editor, write recall_at_k(results, k) and by_language(results, k). Each result is one labeled ticket: (language, the section that governs it, the sections retrieval returned), with 180 tickets in English and 20 in Portuguese.