metrics_table: 평가 데이터 세트 입력, 응답, 설명, 행당 측정항목 결과가 포함된 pandas.DataFrame 테이블입니다.
metadata: 평가 실행의 실험 이름 및 실험 실행 이름입니다.
EvalResult 클래스는 다음과 같이 정의됩니다.
@dataclasses.dataclassclassEvalResult:"""Evaluation result. Attributes: summary_metrics: A dictionary of aggregated evaluation metrics for an evaluation run. metrics_table: A pandas.DataFrame table containing evaluation dataset inputs, responses, explanations, and metric results per row. metadata: the experiment name and experiment run name for the evaluation run. """summary_metrics:Dict[str,float]metrics_table:Optional["pd.DataFrame"]=Nonemetadata:Optional[Dict[str,str]]=None
방사형 또는 막대 그래프에 요약 측정항목을 표시하여 다양한 평가 실행의 결과들을 시각화하고 비교할 수 있습니다. 이 시각화는 다양한 모델 및 다양한 프롬프트 템플릿을 평가하는 데 유용합니다.
다음 예시에서는 4가지 프롬프트 템플릿을 사용하여 생성된 응답에 대해 4가지 측정항목(일관성, 유창성, 지시 준수, 전반적인 텍스트 품질)을 시각화합니다. 방사형 및 막대 그래프를 기반으로 프롬프트 템플릿 #2가 4가지 측정항목 모두에서 다른 것보다 더 나은 성능을 보인다는 결론을 내릴 수 있습니다. 이는 특히 다음 지침과 텍스트 품질에 대한 점수가 훨씬 높다는 점에서 두드러집니다. 이러한 분석을 바탕으로 프롬프트 템플릿 #2가 4가지 중 가장 효과적인 옵션인 것으로 보입니다.
측정항목 결과 이해
다음 표에서는 인스턴스 레벨의 다양한 구성요소를 나열하고 각각 PointwiseMetric, PairwiseMetric 및 계산 기반 측정항목에 대해 metrics_table 및 summary_metrics에 포함된 결과를 집계해서 보여줍니다.
PointwiseMetric
인스턴스 수준 결과
열
설명
응답
모델에서 프롬프트에 대해 생성된 응답입니다.
점수
기준 및 평가 기준표에 따라 응답에 부여된 점수입니다. 점수에는 바이너리(0과 1), 리커트 척도(1~5, -2~2), 부동 소수점(0.0~1.0)을 사용할 수 있습니다.
설명
심사 모델로부터 해당 점수가 부여된 이유입니다. Google에서는 연쇄 사고 추론을 기반으로 심사 모델이 각 판정의 근거를 설명하도록 안내합니다. 심사 모델의 추론을 강제함으로써 평가 정확도를 높일 수 있습니다.
결과 집계
열
설명
평균 점수
모든 인스턴스의 평균 점수입니다.
표준 편차
모든 점수의 표준 편차입니다.
PairwiseMetric
인스턴스 수준 결과
열
설명
응답
후보 모델에서 프롬프트에 대해 생성된 응답입니다.
baseline_model_response
기준 모델에서 프롬프트에 대해 생성된 응답입니다.
pairwise_choice
더 나은 응답을 제공하는 모델입니다. 가능한 값은 CANDIDATE, BASELINE 또는 TIE입니다.
설명
심사 모델로부터 해당 점수가 선택된 이유입니다.
결과 집계
열
설명
candidate_model_win_rate
심사 모델에서 전체 응답 수에 비해 후보 모델이 더 나은 응답을 제공한다고 판단한 횟수의 비율입니다. 범위는 0~1입니다.
baseline_model_win_rate
심사 모델에서 전체 응답 수에 비해 기준 모델이 더 나은 응답을 제공한다고 판단한 횟수의 비율입니다. 범위는 0~1입니다.
계산 기반 측정항목
인스턴스 수준 결과
열
설명
응답
평가 중인 모델의 응답입니다.
참조
참조 응답입니다.
점수
점수는 각 응답/참조 쌍에 대해 계산됩니다.
결과 집계
열
설명
평균 점수
모든 인스턴스의 평균 점수입니다.
표준 편차
모든 점수의 표준 편차입니다.
예시
이 섹션의 예시에서는 평가 결과를 읽고 이해하는 방법을 보여줍니다.
예시 1
첫 번째 예시에서는 TEXT_QUALITY를 사용하여 특정 인스턴스를 개별적으로 평가합니다. TEXT_QUALITY 측정항목의 항목별 평가로 얻은 점수는 1~5점 범위 중 4점으로, 응답이 양호함을 나타냅니다. 또한 평가 결과에는 심사 모델이 더 높거나 낮은 점수 대신 4점을 할당한 이유에 대한 설명이 포함되어 있습니다.
데이터 세트
prompt: "다음 텍스트를 5세 어린이가 이해할 수 있는 방식으로 요약해 주세요. 콘텐츠 중재 정책의 반발에 직면한 소셜 미디어 플랫폼\n한 유명 소셜 미디어 플랫폼에서 사용자와 콘텐츠 제작자가 콘텐츠 중재 정책에 대한 불만을 표출하면서 논란에 휩싸였습니다. 편향적인 검열과 비일관적인 정책 시행 그리고 특정 관점에 대한 억압이 존재한다는 주장과 함께 해당 플랫폼이 언론의 자유를 방해한다면서 이용자들의 분노가 촉발되었습니다. 반대로, 해당 플랫폼은 안전하고 포용적인 온라인 환경을 유지하기 위한 목적으로 정책이 설계되었다고 주장합니다. 이러한 논란은 소셜 미디어가 사람들 간의 대화에 어떤 영향을 미치는지, 플랫폼이 온라인 콘텐츠 관리를 위해 어떤 역할을 수행해야 하는지와 같은 더 큰 질문에 대해 생각하게 만듭니다."
response: "사람들은 자신이 올리고 싶은 내용이 불공정하게 차단된다고 생각하기 때문에 화가 났습니다. 어떤 사람은 웹사이트 때문에 자신이 하고 싶은 말을 못한다고 말합니다. 하지만 웹사이트에서는 모든 사람의 안전을 위해 노력한다고 말합니다. 그래서 사람들은 이제 온라인으로 표현할 수 있는 내용을 웹사이트가 제한해야 하는지에 대해 궁금해하고 있습니다."
결과
score: 4,
explanation: 응답 요약은 5세 정도의 어린이가 이해할 수 있도록 컨텍스트를 요약하라는 지시를 따릅니다. 이는 컨텍스트에 기초를 두고 있으며 요약 시 중요한 세부정보를 제공합니다. 그러나 응답에 사용된 언어는 약간 장황한 편입니다.
예시 2
두 번째 예시는 PAIRWISE_QUESTION_ANSWERING_QUALITY에 대한 쌍 비교 평가입니다. pairwise_choice 결과는 심사 모델에서 프롬프트 질문의 답변으로 "프랑스는 서유럽에 위치한 국가입니다"라는 응답이 기본 응답인 "프랑스는 하나의 국가입니다"보다 선호됨을 나타냅니다. 항목별 결과와 비슷하게 기본 응답보다 후보 응답이 더 나은 이유를 설명하기 위해 설명이 제공되었습니다(이 경우 후보 응답이 더 유용함).
데이터 세트
prompt: "다음 단락을 기준으로 프랑스 위치를 묻는 질문에 답변해 줘. 프랑스는 서유럽에 위치한 국가입니다. 프랑스는 벨기에, 룩셈부르크, 독일, 스위스, 이탈리아, 모나코, 스페인, 안도라와 국경을 접하고 있습니다. 프랑스의 해안선은 영국 해협, 북해, 대서양, 지중해를 따라 펼쳐져 있습니다. 유구한 역사, 에펠탑과 같은 상징적인 명소, 맛있는 음식으로 잘 알려진 프랑스는 유럽은 물론 전 세계의 문화와 경제에서 중요한 역할을 합니다."
response: "프랑스는 서유럽에 위치한 국가입니다."
baseline_model_response: "프랑스는 국가입니다."
결과
pairwise_choice: CANDIDATE,
explanation: BASELINE 응답은 근거가 있지만 질문에 충실히 답변하지 않습니다. 그러나 CANDIDATE 응답은 정확하며 프랑스의 위치에 대한 유용한 세부정보를 제공합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-25(UTC)"],[],[],null,["# View and interpret evaluation results\n\nThis page describes how to view and interpret your model evaluation results after running your model evaluation.\n\nView evaluation results\n-----------------------\n\nAfter you define your evaluation task, run the task to get\nevaluation results, as follows: \n\n from vertexai.evaluation import EvalTask\n\n eval_result = EvalTask(\n dataset=DATASET,\n metrics=[METRIC_1, METRIC_2, METRIC_3],\n experiment=EXPERIMENT_NAME,\n ).evaluate(\n model=MODEL,\n experiment_run=EXPERIMENT_RUN_NAME,\n )\n\nThe `EvalResult` class represents the result of an evaluation run with the following attributes:\n\n- **`summary_metrics`**: A dictionary of aggregated evaluation metrics for an evaluation run.\n- **`metrics_table`** : A `pandas.DataFrame` table containing evaluation dataset inputs, responses, explanations, and metric results per row.\n- **`metadata`**: the experiment name and experiment run name for the evaluation run.\n\nThe `EvalResult` class is defined as follows: \n\n @dataclasses.dataclass\n class EvalResult:\n \"\"\"Evaluation result.\n\n Attributes:\n summary_metrics: A dictionary of aggregated evaluation metrics for an evaluation run.\n metrics_table: A pandas.DataFrame table containing evaluation dataset inputs,\n responses, explanations, and metric results per row.\n metadata: the experiment name and experiment run name for the evaluation run.\n \"\"\"\n\n summary_metrics: Dict[str, float]\n metrics_table: Optional[\"pd.DataFrame\"] = None\n metadata: Optional[Dict[str, str]] = None\n\nWith the use of helper functions, the evaluation results can be displayed in the\n[Colab notebook](https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/evaluation/intro_to_gen_ai_evaluation_service_sdk.ipynb) as follows:\n\nVisualize evaluation results\n----------------------------\n\nYou can plot summary metrics in a radar or bar chart for visualization and\ncomparison between results from different evaluation runs. This visualization\ncan be helpful for evaluating different models and different prompt templates.\n\nIn the following example, we visualize four metrics (coherence, fluency, instruction following and overall text quality) for responses generated using four different prompt templates. From the radar and bar plot, we can infer that prompt template #2 consistently outperforms the other templates across all four metrics. This is particularly evident in its significantly higher scores for instruction following and text quality. Based on this analysis, prompt template #2 appears to be the most effective choice among the four options.\n\nUnderstand metric results\n-------------------------\n\nThe following tables list various components of instance-level and aggregate results included in `metrics_table` and `summary_metrics` respectively for `PointwiseMetric`, `PairwiseMetric` and computation-based metrics: \n\n### `PointwiseMetric`\n\n### Instance-level results\n\n| **Note:** Results for translation metrics only include `score`.\n\n### Aggregate results\n\n### `PairwiseMetric`\n\n### Instance-level results\n\n### Aggregate results\n\n### Computation-based metrics\n\n### Instance-level results\n\n### Aggregate results\n\nExamples\n--------\n\nThe examples in this section demonstrate how to read and understand the evaluation results.\n\n### Example 1\n\nIn the first example, consider evaluating a pointwise evaluation instance for `TEXT_QUALITY`. The score from the pointwise evaluation of `TEXT_QUALITY` metric is 4 (from a scale 1 to 5), which means the response is good. Furthermore, the explanation in the evaluation result shows why the judge model thinks the prediction deserves the score 4, and not a score that's higher or lower.\n\n#### Dataset\n\n- `prompt`: \"Summarize the following text in a way that a five-year-old can understand: Social Media Platform Faces Backlash Over Content Moderation Policies\\\\nA prominent social media platform finds itself embroiled in controversy as users and content creators express discontent over its content moderation policies. Allegations of biased censorship, inconsistent enforcement, and suppression of certain viewpoints have sparked outrage among users who claim that the platform is stifling free speech. On the other hand, the platform asserts that its policies are designed to maintain a safe and inclusive online environment. This controversy raises broader questions about the role of social media in shaping public discourse and the responsibilities of platforms in curating online content.\"\n\n- `response`: \"People are upset with a website because they think it's not being fair with what people can post. Some people say the website is stopping them from saying what they want. But the website says it's trying to keep everyone safe. This makes people wonder if websites should control what people can say online.\"\n\n#### Result\n\n- `score`: 4,\n- `explanation`: The summary in response follows the instruction to summarize the context in a way that a five-year old can understand. It is grounded in the context and provides important details in its summarization. However, the language used in the response is a bit verbose.\n\n### Example 2\n\nThe second example is a pairwise comparison evaluation on `PAIRWISE_QUESTION_ANSWERING_QUALITY`. The `pairwise_choice` result shows the candidate response \"France is a country located in Western Europe.\" is preferred by the judge model compared to the baseline response \"France is a country.\" to answer the question in the prompt. Similar to pointwise results, an explanation is also provided to explain why the candidate response is better than the baseline response (candidate response is more helpful in this case).\n\n#### Dataset\n\n- `prompt`: \"Can you answer where France is based on the following paragraph? France is a country located in Western Europe. It's bordered by Belgium, Luxembourg, Germany, Switzerland, Italy, Monaco, Spain, and Andorra. France's coastline stretches along the English Channel, the North Sea, the Atlantic Ocean, and the Mediterranean Sea. Known for its rich history, iconic landmarks like the Eiffel Tower, and delicious cuisine, France is a major cultural and economic power in Europe and throughout the world.\"\n\n- `response`: \"France is a country located in Western Europe.\",\n\n- `baseline_model_response`: \"France is a country.\",\n\n#### Result\n\n- `pairwise_choice`: CANDIDATE,\n- `explanation`: BASELINE response is grounded but does not fully answer the question. CANDIDATE response, however, is correct and provides helpful details on the location of France.\n\nWhat's next\n-----------\n\n- Try an\n [evaluation example notebook](/vertex-ai/generative-ai/docs/models/evaluation-overview#use_cases).\n\n- Learn about [generative AI evaluation](/vertex-ai/generative-ai/docs/models/evaluation-overview)."]]