Skip to content

Glossary: Evaluating LLM Apps

Counter / defaultdict

Also written: Counter, defaultdict

Python helpers from `collections`. `Counter` tallies how often each value appears, and `defaultdict(list)` creates an empty list the first time a key is used.

Where the book teaches it