शुरू करेंमुफ़्त में शुरू करें

EM के साथ मूल्यांकन

Exact Match एक्सट्रैक्टिव प्रश्न-उत्तर (extractive question answering) में मॉडल्स का मूल्यांकन करने में मदद करता है, जहाँ हम, जैसा कि नाम से स्पष्ट है, बिल्कुल एक जैसे मिलान ढूँढते हैं! एक बार फिर, आपको मूल्यांकन के लिए कुछ predictions और references दिए गए हैं. आपके लिए evaluate लाइब्रेरी लोड कर दी गई है.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Python में LLMs का परिचय

पाठ्यक्रम देखें

अभ्यास निर्देश

  • Exact Match मेट्रिक लोड करें.
  • Exact Match स्कोर compute करें और परिणाम print करें.

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# 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: ", ____)
कोड संपादित करें और चलाएँ