Bewertung mit EM
Exact Match hilft uns, Modelle mit extraktiven Frage-Antwort-Systemen zu bewerten und dabei – du kannst es dir vermutlich schon denken – nach exakten Übereinstimmungen zu suchen! Du erhältst hier wieder predictions und references, die du auswerten kannst. Die Bibliothek evaluate wurde für dich geladen.
Diese Übung ist Teil des Kurses
Einführung in LLMs mit Python
Anleitung zur Übung
- Lade die Metrik „Exact Match“.
- Berechne den Exact-Match-Score und gib die Ergebnisse aus.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Load the metric
exact_match = ___
predictions = ["It's a wonderful day", "I love dogs", "DataCamp has great AI courses", "Sunshine and flowers"]
references = ["What a wonderful day", "I love cats", "DataCamp has great AI courses", "Sunsets and flowers"]
# Compute the exact match and print the results
results = ____
print("EM results: ", ____)