始める無料で始める

METEORによる評価

METEORは、テキストの意味的な特徴を評価するのに優れた指標です。モデルが生成した出力と参照出力を比較する点では、ROUGEと同様の仕組みで動作します。今回は、生成テキストが generated、参照テキストが reference としてそれぞれ用意されています。これらを使って、スコアを計算しましょう。

evaluate ライブラリはあらかじめ読み込まれています。

この演習はコースの一部です

Python で学ぶ LLM の入門

コースを見る

演習の手順

  • METEORスコアを計算し、表示してください。

実践的なインタラクティブ演習

このサンプルコードを完成させて、この演習に挑戦してみましょう。

meteor = evaluate.load("meteor")

generated = ["The burrow stretched forward like a narrow corridor for a while, then plunged abruptly downward, so quickly that Alice had no chance to stop herself before she was tumbling into an extremely deep shaft."]
reference = ["The rabbit-hole went straight on like a tunnel for some way, and then dipped suddenly down, so suddenly that Alice had not a moment to think about stopping herself before she found herself falling down a very deep well."]

# Compute and print the METEOR score
results = ____
print("Meteor: ", ____)
コードを編集して実行