liveBook · Manning

F-score

As explained in Building LLM Applications with DSPy

A metric that combines precision and recall using their harmonic mean.

The F1 score combines precision and recall using their harmonic mean. It is one standard metric for classification when each example has a ground-truth class and a predicted class. section 4.2.3

F1 is an alternative to averaging Boolean correctness scores. Class imbalance can make simple accuracy misleading, so choose a metric suited to the task; scikit-learn provides F1 and other standard metrics. section 4.2.3

How Building LLM Applications with DSPy covers it

How deep it goes
Defines F1 as a classification metric but defers its use to a later treatment.
What it assumes
Assumes ground-truth and predicted classes for each example; does not establish other prerequisites.
What you can do after
Evaluate classification results with F1 as one metric, while selecting a measure appropriate to the task.
How it connects
Connects F1 with precision, recall, accuracy, kappa score, and Matthews correlation coefficient.

Also explained in

Compare how 14 books explain f-score →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building LLM Applications with DSPy. The section links point to the parts of the book it draws on.