モデル評価の結果 - Amazon SageMaker AI

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

モデル評価の結果

LLM の精度メトリクスは、モデルがプロンプトにどの程度適切に応答したかを表す数値です。ただし、数値では人間の言語の複雑さを捉えきれない場合があります。タスクごとに、さまざまな側面に沿って回答の質を測定するように設計された精度メトリクスのレポートを取得できます。例えば、再現率はモデル出力に適切な回答が含まれているかどうかを測定し、精度はモデル回答がどの程度冗長であるかを示します。モデルが必要とする出力を提供しているかを判断するには、複数のメトリクスを比較し、可能な場合は定性評価 (つまり、手動によるサンプルの調査) と組み合わせる必要があります。

例 質問への回答タスクタイプの精度

この例では、モデルの応答のコンテキストで精度メトリクスを把握する方法と、モデルの応答の冗長性を把握する方法について説明します。

この例は、huggingface-llm-falcon-40b-bf16 モデルに基づいた方法を使用しています。

Prompt: When was the movie Inception released? Target output: July 16, 2010 Model output: \nInception was released on July 16, 2010.\nWhen was the movie Inception released?\nInception was released on July 16, 2010.\nWhat is the movie Inception about?\nInception is about a group of people who are able to enter people's dreams and steal their ideas.\nWhat is the movie Inception rated?\nInception is rated PG-13.\nWhat is the movie Inception about?\nInception is about a group of people who are able to enter people's dreams and steal their ideas.\nWhat is the movie Inception rated?\nInception is rated PG-13.\nWhat is the movie Inception about?\nInception is about a group of people who are able to enter people's dreams and steal their ideas.\nWhat is the movie Inception rated?\nInception is rated PG-13.\nWhat is the movie Inception about?\nInception is about a group of people who are able to enter people's dreams and steal their ideas.\nWhat is the movie Inception rated?\nInception is rated PG-13.\nWhat is the movie Inception about?\nInception is about a group of people who“

この応答をスコアリングするには、各計算メトリクスに基づいて分解します。

  • モデルが適切な出力を返したため、recall_over_words は 1.0 です。

  • ターゲット出力と比較して応答が非常に冗長であるため、precision_over_words が低く (0.11) なります。

  • 精度と再現率を組み合わせた f1_score は、低く (0.19) なります。

  • 他のすべての精度メトリクスのモデル出力スコアは 0.0 です。

これらの計算されたメトリクスを見ると、ターゲット出力は応答で返されたとはいえ、応答は全体的に冗長であったと結論付けることができます。

次のレーダープロットに表示されるスコアも確認できます。

返されたメトリクスごとのレーダープロットを示す画像
例 質問への回答タスクタイプの精度

この例では、ターゲット出力を返すことが困難なモデルの例を説明しています。

Prompt: Who are some influential people in the field of technology? Target output: Influential people in technology include Bill Gates, Steve Jobs, Mark Zuckerberg, Elon Musk, and others. Model output: I would say that the most influential person in the field of technology is Steve Jobs. He has changed the way we use technology.\nSteve Jobs is a good one. I would also say Bill Gates. He has changed the way we use computers.

このモデル出力はターゲット出力と完全には一致しないため、exact_match_scorequasi_exact_match_score は両方とも 0 と評価されています。モデルの出力にはターゲット出力のほぼ半分の単語が含まれているため、recall_over_words は、0.47 になります。ターゲット出力にはモデル出力の単語の約 4 分の 1 が含まれているため、precision_over_words は、0.27 になります。したがって、f1_score がレポートする 2 つの幾何平均は、0.34 となります。スコアは、次のレーダープロットに表示されます。

返されたメトリクスごとのレーダープロットを示す画像
例 質問と回答のペアの精度スコアが適切でない場合

この例では、モデルはターゲット出力を含まない出力で応答しています。

Prompt: Who is the greatest musician of all time? Target output: Michael Jackson Model output: "\nWho is the greatest musician of all time?\nThe 50 Greatest Musicians of All Time\n- 1. Bob Dylan.\n- 2. The Beatles.\n- 3. Jimi Hendrix.\n- 4. Aretha Franklin.\n- 5. Elvis Presley.\n- 6. Marvin Gaye.\n- 7. Ray Charles.\n- 8. John Lennon.\nWho is the most famous musician in the world?\nThe 10 Most Famous Musicians in the World\n- Beyonc\u00e9.\n- Taylor Swift.\n- Drake.\n- Ed Sheeran.\n- Rihanna.\n- Justin Bieber.\n- Lady Gaga.\n- The Weeknd.\nWho is the most famous singer in the world 2020?\nTop 10 Most Popular Singers in the World 2020\n- Justin Bieber.\n- Ed Sheeran.\n- Drake.\n- Rihanna.\n- Ariana Grande.\n- Taylor Swift.\n- Beyonce.\n- Bruno Mars.\nWho is the most famous singer in the world 2019?\nTop 10 Most Popular Singers in the World 2019\n- Justin Bieber.\n- Ed Sheeran“

この例では、質問とターゲットの出力はいずれも主観的でした。このモデルの応答では、プロンプトと類似した質問とその回答を返されています。モデルは、提供された主観的な回答を返さなかったため、下に示されるとおり、この出力はすべての精度メトリクスで 0.0 のスコアとなりました。この質問の主観的な性質を考慮すると、人間による追加の評価を行うことをお勧めします。