EM으로 평가하기
Exact Match는 추출형 질의응답을 평가할 때, 말 그대로 일치 여부를 확인하는 데 도움이 됩니다! 이번에도 평가용 predictions와 references가 제공되어 있어요. evaluate 라이브러리는 이미 로드되어 있습니다.
이 연습은 강의의 일부입니다
Python으로 배우는 LLM 입문
연습 안내
- Exact Match 지표를 로드하세요.
- Exact Match 점수를 계산하고 결과를 출력하세요.
실습형 인터랙티브 연습
이 예제를 이 샘플 코드를 완성하여 풀어보세요.
# 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: ", ____)