AI engineering glossary · Evaluation metrics

What is Token-level F1?

Token-level F1 (also called answer F1, SQuAD F1): An answer-scoring metric for question answering that treats the predicted and reference answers as bags of tokens and computes F1 on their overlap. It gives partial credit when the answer is close but not identical, unlike exact match.

Level: intermediateTopic: Evaluation metrics

Token-level F1: an example

Reference answer 'the Reserve Bank of India' and prediction 'Reserve Bank of India' share 4 tokens: precision 1.0, recall 0.8, so F1 is about 0.89.

Related terms

More Evaluation metrics terms

Where you learn it

Token-level F1 is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.