TDTech Digest

344. 사용자 지정 지표로 검색+생성 RAG 평가 작업 만들기 (Retrieve and generate with custom metrics)

  • 원문: English
  • 위치: Additional capabilities › Evaluate models › RAG evaluation jobs › Create job › Retrieve and generate with custom metrics

한 줄 요약

검색+생성 RAG 평가에 내가 정의한 채점 기준(사용자 지정 지표, custom metric) 을 추가하는 방법입니다. 작업당 최대 10개까지 만들 수 있습니다.

쉽게 말하면

내장 지표(정확성, 충실성 등)로는 부족할 때, “우리 회사 톤에 맞는가?” 같은 기준을 프롬프트로 써서 심판 모델에게 채점시킵니다. 점수 척도(rating scale)도 직접 정합니다.

핵심 내용

필요한 것

항목필수 여부설명
심판 모델용 프롬프트(instructions)필수입력 변수 최소 1개 포함 → 작성법: 339
사용자 지정 지표용 평가자 모델필수지원 모델: 313
출력 스키마(rating scale)선택(권장)없으면 결과에 점수·시각화 없이 설명만 나옴
프롬프트 데이터셋필수314

콘솔에서 지표 만드는 3가지 방법

방법설명
Import JSON file지표 정의 JSON 업로드
Use a template내장 지표 프롬프트를 골라 수정
Custom프롬프트를 직접 입력
  • 척도 유형(Scale type): Numerical 또는 String
  • 나머지 절차(추론 소스, 평가 유형 Retrieval and response generation, S3, IAM 역할, KMS)는 343과 같습니다.

API 구조 포인트

"automated": {
  "datasetMetricConfigs": [{ "metricNames": ["Builtin.…", "CustomMetric-Correctness-FloatRatingScale"] }],
  "customMetricConfig": {
    "customMetrics": [{ "customMetricDefinition": {
      "name": "CustomMetric-Correctness-FloatRatingScale",
      "instructions": "<입력 변수를 포함한 프롬프트>",
      "ratingScale": [{ "definition": "Not at all", "value": { "floatValue": 0 } }, "..."] } }],
    "evaluatorModelConfig": { "...사용자 지정 지표용 모델..." } },
  "evaluatorModelConfig": { "...내장 지표용 모델..." }
}
  • ⚠️ evaluatorModelConfig가 두 군데 있습니다. customMetricConfig 안쪽은 사용자 지정 지표용, 바깥쪽은 내장 지표용입니다. 헷갈리지 않게 주의하세요.
  • 사용자 지정 지표 이름은 metricNames에도 넣어야 합니다(예시 기준).
  • 📝 지표 정의는 결과 버킷 s3://<버킷>/<job-name>/<job-uuid>/custom_metrics에 JSON으로 저장됩니다.

📝 원문 확인 필요: 이 페이지는 검색+생성 작업인데, CLI 예시는 retrieve-only 데이터셋 경로(retrieval-only/retrieve-eval.jsonl)와 검색 지표(Builtin.ContextCoverage, Builtin.ContextRelevance)를 사용하고, 콘솔 단계도 retrieve-only 데이터셋 형식으로 링크합니다.

SA 관점

  • 도메인 특화 품질 기준(규정 준수 문구 포함 여부, 브랜드 톤 등)을 사용자 지정 지표로 코드화하면, 사람 평가 없이 반복 가능한 회귀 테스트로 쓸 수 있습니다.
  • 출력 스키마를 꼭 정의하세요. 점수가 없으면 작업 간 비교·대시보드화가 어렵습니다.