BaşlayınÜcretsiz Başlayın

Evaluating with EM

Exact Match helps us evaluate models when it comes to extractive question and answering but looking for, you guessed it, exact matches! Once again, you have been provided some predictions and references for evaluation. The evaluate library has been loaded for you.

Bu egzersiz

Introduction to LLMs in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Load the Exact Match metric.
  • Compute the Exact Match score and print the results.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# 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: ", ____)
Kodu Düzenle ve Çalıştır