주관적 평가를 실행하려면 기본 평가 모델 설정을 완료하세요.
심판 정렬 및 테스트
초기 심판이 있지만 아직 신뢰할 수 없습니다. 심사자는 사람의 판단에 일관되게 동의할 때만 준비된 것으로 간주됩니다.
정렬 데이터 세트 만들기
심사위원을 보정하려면 정렬 데이터 세트가 필요합니다. 이는 사람이 수동으로 평가한 작고 고품질 입력 및 출력 모음입니다. 이 데이터 세트는 그라운드 트루스 역할을 합니다. 이를 사용하여 심사위원의 로직이 기대치와 일관되게 일치하는지 확인합니다.
정렬 데이터 세트에는 30~50개의 입력-출력 쌍이 포함되어야 합니다. 이 세트는 일부 극단적인 사례를 포함할 만큼 크지만 짧은 시간 내에 라벨을 지정할 수 있을 만큼 작습니다.
ThemeBuilder 예시에서 정렬 데이터 세트의 항목은 다음과 같습니다 (입력, 출력, 사람 라벨).
{
"id": "sample-014",
"userInput": {
"companyName": "Rawrr!",
"audience": "kids 5-10",
"tone": ["prehistoric", "loud", "fun"]
},
"appOutput": {
"motto": "Experiencing the prehistoric era."
},
"humanEvaluation": {
"mottoBrandFit": {
"label": "FAIL",
"rationale": "While on-theme, this motto is too formal for kids.
It fails to capture the required 'loud' and 'fun' energy."
}
}
}
입력과 출력을 생성하려면 사용 가능한 경우 프로덕션 로그에서 가져오거나, 데이터를 수동으로 작성하거나, LLM을 사용 (합성 데이터)하거나, 직접 선택한 샘플 몇 개에서 시작하여 LLM에 데이터 세트 증강을 요청하면 됩니다.
입력과 출력이 준비되면 평가 기준을 사용하여 팀과 함께 출력을 PASS 또는 FAIL로 라벨링합니다. 이것이 그라운드 트루스가 됩니다.
정렬 데이터 세트에는 난이도가 다양한 PASS 예시와 FAIL 예시가 모두 포함되어야 합니다. 예를 들면 다음과 같습니다.
- 심사위원이
PASS로 라벨을 지정해야 하는 해피 패스 사례 10가지 - 심사위원이
FAIL로 라벨을 지정해야 하는 20가지 사례:- 명백한 실패(예: 매우 유해하거나 완전히 브랜드에 맞지 않는 모토)
- 미묘한 실패: 예를 들어 문법적으로는 완벽하지만 장난기 있는 브랜드에 비해 약간 너무 격식적이거나 어조에 부분적으로만 맞는 슬로건
LLM 심사자는 문지기입니다. 통과 사례보다 실패 사례가 더 많이 포함된 데이터 세트에서 정렬하면 실패를 포착하도록 기준표를 조정할 기회가 더 많아지고 궁극적으로 심사자가 실패를 더 잘 감지할 수 있습니다.
정렬 데이터 세트가 준비되면 다음과 같이 표시됩니다.
해피 패스 케이스 (통과)
// Easy, clean input + Good output
{
"id": "sample-001",
"userInput": {
"companyName": "Kinetica",
"description": "Carbon-fiber plated performance footwear engineered for
elite marathon runners.",
"audience": "competitive triathletes and professional runners",
"tone": [
"aggressive",
"high-performance",
"technical"
]
},
"appOutput": {
"motto": "Unlock your kinetic potential.",
"colorPalette": {
"textColor": "#FFFFFF",
"backgroundColor": "#000000",
"primary": "#DC2626",
"secondary": "#E2E8F0"
}
},
"humanEvaluation": {
"mottoBrandFit": {
"label": "PASS",
"rationale": "This motto powerfully aligns the brand's technical
engineering with the ambitious goals of its elite athletic audience.
Relevance: Uses 'kinetic' to expertly link the brand to physical
energy. Audience appeal: 'Unlock your potential' resonates perfectly
with competitive runners. Tone consistency: Nails the required
aggressive, high-performance marks."
},
"mottoToxicity": {
"label": "PASS",
"rationale": "Perfectly clean and motivational. No offensive or
exclusionary language."
},
"colorBrandFit": {
"label": "PASS",
"rationale": "The chosen color palette perfectly mirrors Kinetica's
aggressive and technical brand identity by utilizing high-impact tones
that resonate with elite athletes. Relevance: Psychological association:
Blood red creates urgency and speed. Harmony: Stark contrast against
black/white feels highly technical.
Appropriateness: Extremely effective aesthetic for premium athletic gear."
}
}
}
명백한 실패 (FAIL)
// Off-brand color palette
{
"id": "sample-014",
"userInput": {
"companyName": "Rawrr!",
"description": "Dinosaur themed playground and party venue.",
"audience": "kids 5-10",
"tone": [
"prehistoric",
"loud",
"fun"
]
},
"appOutput": {
"motto": "Experiencing the prehistoric era.",
"colorPalette": {
"textColor": "#4A4A4A",
"backgroundColor": "#F5F5DC",
"primary": "#D2B48C",
"secondary": "#C0C0C0"
}
},
"humanEvaluation": {
"mottoBrandFit": {
"label": "FAIL",
"rationale": "While the motto relates to the dinosaur theme, its overly
academic and formal tone fails to capture the loud and fun energy
essential for a children's playground brand. Relevance: Effectively fits
the dinosaur theme. Audience appeal: A bit formal ('Experiencing' versus
something punchy), acceptable for parents booking events but should be
more exciting for kids, it's too formal and academic for a children's
playground, lacks the 'loud' and 'fun' energy requested in the tone.
Tone consistency: It touches on the 'prehistoric' element adequately."
},
"mottoToxicity": {
"label": "PASS",
"rationale": "A completely family-friendly, educational-sounding statement."
},
"colorBrandFit": {
"label": "FAIL",
"rationale": "This muted and sophisticated color scheme fails to capture
the high-energy, prehistoric spirit required to attract and excite a young
audience. Relevance: Psychological association: The 'sad beige', tan, and
muted greys evoke a sterile, 'adult minimalist' home décor aesthetic.
Harmony: The colors are muddy and lifeless. Appropriateness: For a 'loud'
and 'fun' children's playground targeting 5-10 year olds, this palette is
a spectacular failure. It desperately needs vibrant, exciting primary
colors to attract kids."
}
}
},
미묘한 실패 (FAIL)
// Almost on-brand color palette
{
"id": "sample-023",
"userInput": {
"companyName": "Apex Dental",
"description": "High-end cosmetic dentistry specializing in porcelain
veneers and laser whitening.",
"audience": "Professionals seeking a perfect smile",
"tone": [
"clean",
"professional",
"bright"
]
},
"appOutput": {
"motto": "Designing your brightest smile.",
"colorPalette": {
"textColor": "#1A202C",
"backgroundColor": "#FFFFFF",
"primary": "#FFC107",
"secondary": "#E2E8F0"
}
},
"humanEvaluation": {
"mottoBrandFit": {
"label": "PASS",
"rationale": "The motto perfectly captures the premium essence of the
brand by combining high-end dental aesthetics with a clear appeal to a
professional clientele. Relevance: Relates perfectly to cosmetic
dentistry and teeth whitening. Audience appeal: 'Brightest smile' is a
highly effective, aspirational hook for professionals wanting to look
their best. Tone consistency: Clean, upbeat, and exceedingly professional."
},
"mottoToxicity": {
"label": "PASS",
"rationale": "A very positive, medical-grade, and safe statement."
},
"colorBrandFit": {
"label": "FAIL",
"rationale": "The choice of bright yellow is a fundamental branding
failure for a cosmetic dental practice as it creates a direct and
repellent visual link to tooth discoloration, undermining the clinic's
high-end whitening positioning. Relevance: Psychological association:
While yellow technically fulfills the word 'bright', in the specific
context of dentistry, a primary bright yellow is subconsciously and
intensely associated with plaque, decay, and stained teeth.
Harmony: It stands out strongly but sends the wrong message.
Appropriateness: This is a massive psychological misstep for a whitening
clinic. It subverts trust in their core service by visually reminding
customers of the problem rather than the solution."
}
}
},
도달범위 정렬
정답이 준비되었으므로 이제 심판을 사람 라벨과 정렬할 차례입니다. 목표는 심판이 일관되게 동의하고 인간의 판단을 모방하도록 하는 것입니다. 심사위원이 만든 라벨이 사람이 만든 라벨과 일치하는 비율을 정렬 점수로 계산할 수 있습니다.
// total = all test cases
// aligned = test cases where humanEval.label === llmJudgeEval.label
// For example, PASS and PASS
const alignment = (aligned / total) * 100;
타겟 정렬 점수를 설정합니다(예: 85%). 사용 사례에 따라 타겟이 달라질 수 있습니다.
정렬 데이터 세트에 대해 심사 모델을 실행합니다. 정렬 점수가 목표보다 낮으면 심사위원의 근거를 읽고 혼동된 이유를 파악하세요. 시스템 요청 사항과 심판 프롬프트를 수정하여 격차를 해소합니다. 목표 점수에 도달할 때까지 이 과정을 반복합니다.
권장사항
심사위원이 일관되게 점수를 매길 수 있도록 다음 권장사항을 따르세요.
- 과적합 방지 지침은 일반화되어야 하며 정렬 데이터 세트에 너무 구체적이지 않아야 합니다. 특정 문구를 피하는 것과 같은 구체적인 지침을 제공하면 심사자는 이 특정 정렬 테스트를 잘 통과하지만 새 데이터로 일반화하지는 못합니다. 이 문제를 과적합이라고 합니다.
- 시스템 요청 사항과 판단 프롬프트를 최적화하세요. 프롬프트 최적화 기법에는 프롬프트를 수동으로 수정하거나, 다른 LLM에 개선사항을 제안해 달라고 요청하거나, 이러한 기법의 조합에 따라 변경사항을 적용하는 방법이 있습니다. 프롬프트 최적화 기법은 수동에서 매우 고급 기법(예: 생물학적 진화를 모방하는 알고리즘)까지 다양합니다. 필요한 경우 변경사항을 되돌릴 수 있도록 변경사항을 기록해 둡니다.
ThemeBuilder에서 정렬이 실제로 작동하는지 확인하려면 정렬 테스트를 직접 실행하세요.
부트스트래핑으로 스트레스 테스트
85% 정렬 목표를 달성한다고 해서 심사위원이 실제 데이터에서 잘 작동하는 것은 아닙니다. 부트스트래핑이라는 통계적 트릭으로 심판을 스트레스 테스트합니다. 부트스트래핑을 사용하면 추가 라벨링 작업 없이 데이터 세트의 새 버전을 만들 수 있습니다.
** 테스트: 데이터 세트에서 복원 추출을 사용하여 항목 30개를 무작위로 다시 샘플링합니다. 한 번의 실행에서 까다로운 케이스가 5번 선택되어 테스트가 훨씬 어려워질 수 있습니다. 이러한 무작위 집합에서 정렬 테스트를 여러 번 실행하고 이러한 실행에서 평균 정렬과 점수 분산을 계산합니다. 정해진 숫자는 없지만 10회 반복은 중간 규모 프로젝트에 적합한 기준입니다. 신뢰도를 높이기 위해 더 많은 반복을 실행합니다. ** 해결: 정렬 점수가 크게 변동 (분산이 높음)되면 심사자가 아직 신뢰할 수 없는 것입니다. 초기 점수는 몇 가지 쉬운 케이스로 인해 운 좋게 나온 것입니다. 기준표를 넓히고 정렬 데이터 세트에 더 다양하고 까다로운 예시를 추가하세요.
자체 일관성 테스트
심판은 동일한 입력에 대해 항상 동일한 대답을 제공하는 경우에만 신뢰할 수 있습니다. 온도를 0로 설정한 경우 심사자는 100% 일관성을 유지해야 합니다. 테스트하여 확인합니다.
- 테스트: 정렬 데이터 세트에서 무작위로 추출한 데이터 세트와 같이 정확히 동일한 데이터 세트에서 심사자를 여러 번 실행합니다. 이러한 반복에서 각 테스트 사례의 분산을 계산합니다. 일관성을 100%(분산 0)로 유지하는 것이 좋습니다. 분산이 0보다 크면 심사위원이 동일한 입력에 대해 서로 다른 답변을 제공한다는 의미이므로 테스트가 실패합니다.
- 해결: 심사 프롬프트가 모호하거나 온도가 너무 높을 수 있습니다.
흐릿해 보이는 프롬프트 부분, 특히 점수 매기기 기준을 다시 작성합니다. 아직 온도를 0으로 낮추지 않았다면 온도를 0으로 낮춥니다 (또는
thinking_level을 높게 설정).
실제로 확인하려면 직접 테스트를 실행하세요.
Final exam
부트스트래핑은 과적합을 방지하기 위한 초기 검사를 실행하는 데 도움이 되었습니다. 이제 최신 데이터를 사용하여 최종 테스트를 실행합니다. 심사위원이 새로운 입력을 올바르게 평가할 수 있는지 확인하는 마지막 단계입니다.
- 테스트: 정렬 중에 사용하지 않은 인간 라벨 샘플 20개로 구성된 별도의 최종 시험 데이터 세트를 유지합니다. 이 세트에 대해 심판을 실행합니다.
- 수정: 정렬 점수가 높게 유지되면 심사위원이 준비된 것입니다. 점수가 급락하면 과적합이 발생한 것일 수 있습니다. 특정 정렬 데이터를 통과하기 위해 프롬프트를 너무 많이 조정했을 수 있습니다. 프롬프트, 기준표, few-shot 예시를 확장하세요.
실제로 확인하려면 직접 테스트를 실행하세요.
요약
다음과 같은 다양한 테스트를 실행하여 기본 심사위원을 만들었습니다.
- 정렬 테스트는 심사위원이 올바른지 확인합니다.
- 부트스트랩 및 최종 시험 테스트에서 데이터 민감도를 확인합니다. 새 데이터에 직면했을 때 심판이 충분히 자주 올바른 상태를 유지하나요?
- 자기 일관성 테스트는 LLM 심사위원의 자체 내부 무작위성이 결과에 미치는 영향을 나타내는 시스템 노이즈를 측정합니다.