루브릭 기반 판사 - Amazon SageMaker AI

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

루브릭 기반 판사

개요

Rubric Judge는 Nova 2.0 Lite를 기반으로 구축된 향상된 LLM-as-a-judge 평가 모델입니다. 기본 설정 결정(A>B, B>A 또는 타이)만 제공하는 원래 판사 모델과 달리 Rubric Judge는 각 프롬프트에 맞게 조정된 사용자 지정 평가 기준을 동적으로 생성하고 여러 차원에 세분화된 점수를 할당합니다.

주요 기능

  • 동적 기준 생성 - 입력 프롬프트를 기반으로 관련 평가 차원을 자동으로 생성합니다.

  • 가중 점수 - 상대적 유의성을 반영하기 위해 각 기준에 중요도 가중치를 할당합니다.

  • 세분화된 평가 - 각 기준에 대해 바이너리(true/false) 또는 스케일(1~5) 기준으로 세부 점수를 제공합니다.

  • 품질 지표 - 응답 간 차이의 정도를 정량화하는 연속 품질 점수(0~1 척도)를 계산합니다.

모델에서 생성된 기준의 예

price_validation: description: "The response includes validation to ensure price is a positive value." type: "scale" weight: 0.3

모델은 생성된 모든 기준에 대해 두 응답을 모두 평가한 다음 이러한 기준 수준 점수를 사용하여 최종 기본 설정 결정을 알립니다.

레시피 구성

Rubric Judge 레시피

레시피task: rubric_llm_judge에서를 설정하여 Rubric Judge를 활성화합니다.

run: name: nova-eval-job-name # [MODIFIABLE] Unique identifier for your evaluation job model_type: amazon.nova-2-lite-v1:0:256k # [FIXED] Rubric Judge model type model_name_or_path: "nova-lite-2/prod" # [FIXED] Path to model checkpoint or identifier replicas: 1 # [MODIFIABLE] Number of replicas for SageMaker Training job data_s3_path: "" # [FIXED] Leave empty for SageMaker Training job output_s3_path: "" # [FIXED] Leave empty for SageMaker Training job evaluation: task: rubric_llm_judge # [FIXED] Evaluation task - enables Rubric Judge strategy: judge # [FIXED] Evaluation strategy metric: all # [FIXED] Metric calculation method inference: max_new_tokens: 12000 # [MODIFIABLE] Maximum tokens to generate top_k: -1 # [MODIFIABLE] Top-k sampling parameter top_p: 1.0 # [MODIFIABLE] Nucleus sampling parameter temperature: 0 # [MODIFIABLE] Sampling temperature (0 = deterministic)

Judge 레시피로서의 원래 LLM(비교용)

원래 판사 모델은를 사용합니다task: llm_judge.

run: name: eval-job-name # [MODIFIABLE] Unique identifier for your evaluation job model_type: amazon.nova-micro-v1:0:128k # [FIXED] Model type model_name_or_path: "nova-micro/prod" # [FIXED] Path to model checkpoint or identifier replicas: 1 # [MODIFIABLE] Number of replicas for SageMaker Training job data_s3_path: "" # [FIXED] Leave empty for SageMaker Training job output_s3_path: "" # [FIXED] Leave empty for SageMaker Training job evaluation: task: llm_judge # [FIXED] Original judge task strategy: judge # [FIXED] Evaluation strategy metric: all # [FIXED] Metric calculation method inference: max_new_tokens: 12000 # [MODIFIABLE] Maximum tokens to generate top_k: -1 # [MODIFIABLE] Top-k sampling parameter top_p: 1.0 # [MODIFIABLE] Nucleus sampling parameter temperature: 0 # [MODIFIABLE] Sampling temperature (0 = deterministic)

입력 데이터 세트 형식

입력 데이터 세트 형식은 원래 판사 모델과 동일합니다.

필수 필드

  • prompt - 입력 프롬프트 및 지침이 포함된 문자열

  • response_A - 기준 모델 출력을 포함하는 문자열

  • response_B - 사용자 지정 모델 출력이 포함된 문자열

예제 데이터 세트(JSONL 형식)

{"prompt": "What is the most effective way to combat climate change?", "response_A": "The most effective way to combat climate change is through a combination of transitioning to renewable energy sources and implementing strict carbon pricing policies. This creates economic incentives for businesses to reduce emissions while promoting clean energy adoption.", "response_B": "We should focus on renewable energy. Solar and wind power are good. People should drive electric cars. Companies need to pollute less."} {"prompt": "Explain how a computer's CPU works", "response_A": "CPU is like brain of computer. It does math and makes computer work fast. Has lots of tiny parts inside.", "response_B": "A CPU (Central Processing Unit) functions through a fetch-execute cycle, where instructions are retrieved from memory, decoded, and executed through its arithmetic logic unit (ALU). It coordinates with cache memory and registers to process data efficiently using binary operations."} {"prompt": "How does photosynthesis work?", "response_A": "Plants do photosynthesis to make food. They use sunlight and water. It happens in leaves.", "response_B": "Photosynthesis is a complex biochemical process where plants convert light energy into chemical energy. They utilize chlorophyll to absorb sunlight, combining CO2 and water to produce glucose and oxygen through a series of chemical reactions in chloroplasts."}

형식 지정 요구 사항

  • 각 항목은 한 줄 JSON 객체여야 합니다.

  • 항목을 줄 바꿈으로 구분

  • 예제와 같이 정확한 필드 이름 지정을 따릅니다.

평가 출력

출력 구조

Rubric Judge는 원래 판사 모델에 비해 향상된 평가 지표를 생성합니다.

{ "config_general": { "lighteval_sha": "string", "num_fewshot_seeds": "int", "max_samples": "int | null", "job_id": "int", "start_time": "float", "end_time": "float", "total_evaluation_time_secondes": "string", "model_name": "string", "model_sha": "string", "model_dtype": "string | null", "model_size": "string" }, "results": { "custom|rubric_llm_judge_judge|0": { "a_scores": "float", "a_scores_stderr": "float", "b_scores": "float", "b_scores_stderr": "float", "ties": "float", "ties_stderr": "float", "inference_error": "float", "inference_error_stderr": "float", "score": "float", "score_stderr": "float", "weighted_score_A": "float", "weighted_score_A_stderr": "float", "weighted_score_B": "float", "weighted_score_B_stderr": "float", "score_margin": "float", "score_margin_stderr": "float", "winrate": "float", "lower_rate": "float", "upper_rate": "float" } }, "versions": { "custom|rubric_llm_judge_judge|0": "int" } }

Rubric Judge의 새로운 지표

다음 6가지 지표는 Rubric Judge에 고유하며 세분화된 품질 평가를 제공합니다.

지표 설명
가중치 기반_점수_A 모든 모델 생성 평가 기준에서 response_A에 대한 평균 정규화 품질 점수입니다. 점수는 기준 중요도에 따라 가중치를 부여하고 0~1 척도로 정규화됩니다(높음 = 품질 향상).
가중치 기반_점수_A_stderr 통계적 불확실성을 나타내는 weighted_score_A 평균의 표준 오차
가중치 기반_점수_B 모든 모델 생성 평가 기준에서 response_B의 평균 정규화 품질 점수입니다. 점수는 기준 중요도에 따라 가중치를 부여하고 0~1 척도로 정규화됩니다(높음 = 품질 향상).
가중치 기반_점수_B_stderr 통계적 불확실성을 나타내는 weighted_score_B 평균의 표준 오차
score_margin 가중치 기반 점수 간의 차이(가중치 기반_점수_A - 가중치 기반_점수_B로 계산). 범위: -1.0~1.0. Positive = response_A가 더 좋음, negative = response_B가 더 좋음, near zero = 유사한 품질
score_margin_stderr 품질 차이 측정의 불확실성을 나타내는 score_margin 평균의 표준 오차

가중치 기반 점수 지표 이해

용도: 가중치 기반 점수는 바이너리 기본 설정을 보완하는 지속적인 품질 측정을 제공하여 모델 성능에 대한 심층적인 인사이트를 제공합니다.

원래 판사와의 주요 차이점

  • 원래 판사 - 개별 기본 설정(A>B, B>A, A=B)만 출력합니다.

  • 강요판사 - 사용자 지정 기준에 따라 기본 설정과 연속 품질 점수(0~1 척도)를 모두 출력합니다.

score_margin 해석

  • score_margin = -0.128: Response_B는 response_A보다 12.8% 더 높은 점수를 받았습니다.

  • |score_margin| < 0.1: 좁은 품질 차이(종결)

  • |score_margin| > 0.2: 명확한 품질 차이(신뢰할 수 있는 결정)

사용 사례

  • 모델 개선 - 모델 성능이 저하되는 특정 영역 식별

  • 품질 정량화 - 윈/손실 비율뿐만 아니라 성능 격차의 크기 측정

  • 신뢰도 평가 - 긴밀한 결정과 명확한 품질 차이를 구분합니다.

중요

최종 결정은 여전히 판단 모델의 명시적 선호도 레이블을 기반으로 하여 전체적인 추론을 보존하고 전진/후진 평가를 통해 적절한 위치 편향 완화를 보장합니다. 가중 점수는 기본 결과를 대체하는 것이 아니라 관찰성 도구 역할을 합니다.

계산 방법

가중 점수는 다음 프로세스를 통해 계산됩니다.

  • 기준 데이터 추출 - 판사의 YAML 출력을 구문 분석하여 기준 점수 및 가중치 추출

  • 점수 정규화:

    • 스케일 유형 기준(1~5): (점수 - 1)/4를 계산하여 0~1로 정규화

    • 이진 기준(true/false): 1.0/0.0으로 변환

  • 가중치 적용 - 정규화된 각 점수에 기준 가중치를 곱합니다.

  • 집계 - 각 응답에 대한 모든 가중 점수 합계

  • 마진 계산 - 컴퓨팅 score_margin = weighted_score_A - weighted_score_B

: response_A의 가중치 합계가 0.65이고 response_B의 가중치 합계가 0.78인 경우는 -0.13score_margin이 되며, 이는 response_B가 모든 가중치 기준에서 품질이 13% 더 높음을 나타냅니다.