始める無料で始める

METEORで評価する

METEORは、テキストの意味的な特徴の評価が得意です。モデルが生成した出力を参照出力と比較する点で、ROUGEと似た動作をします。generatedreference としてこれらのテキストが用意されているので、スコアを評価してみましょう。

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: ", ____)
コードを編集して実行