C.W.K.
Stream
Lesson 06 of 09 · published

뭘 평가할 거야

~22 min · evals, scope, fundamentals

Level 0Guesser
0 XP0/55 lessons0/10 achievements
0/150 XP to next level150 XP to go0% complete

LLM output 의 8가지 quality 차원

'이 output 좋아?' 는 측정 가능한 sub-question 들로 분해돼. use case 에 중요한 차원 골라. 한 번에 다 측정하려고 하지 마.

  1. Correctness — 답이 사실적으로 맞아? (QA, RAG, code 에서 최우선)
  2. Faithfulness — 답이 제공된 context 에 근거 있어? (RAG 전용. 답이 correct 지만 unfaithful, faithful 지만 wrong 일 수 있음)
  3. Relevance — 답이 user 의 실제 질문에 답해?
  4. Completeness — 답이 user 가 필요한 걸 다 cover 해, 중간에 멈춰?
  5. Coherence — 답이 논리적으로 들어맞아?
  6. Style / tone — brand 또는 persona 와 맞아? (사람들이 인정하는 것보다 더 중요)
  7. Format compliance — JSON 파싱돼, code 돌아가, citation well-formed?
  8. Safety — toxicity, bias, PII leak, jailbreak 없음?

모든 걸 평가하는 함정

흔한 anti-pattern: 8축 composite score 가 실제 signal 을 가려. correctness 가 15% 떨어지고 coherence 가 5% 오르면 composite 거의 안 움직여 — 그리고 너는 regression 을 ship 해. 차원을 분리해. 각각 추적해. dashboard layer 에서만 합쳐.

원칙: task 에 가장 중요한 두세 차원 골라서 정밀하게 측정해. 그게 부족하다는 증거 나올 때만 더 추가해.

다른 surface 는 다른 scope

번역 도구: correctness + completeness + format compliance. style 은 user 결정.

code assistant: correctness + format compliance (code 가 돌아?) + safety (insecure 패턴 없음).

고객지원 챗봇: relevance + faithfulness + tone + safety. correctness 는 doc grounded 면 faithfulness 아래로 들어가.

tool 쓰는 coding agent: tool-call accuracy + final correctness + cost / step count. one-shot model 보다 white-box trace eval 이 더 중요.

Code

Multi-dimensional eval — 각 axis 독립 추적·python
from dataclasses import dataclass

@dataclass
class MultiDimensionalScore:
    correctness: float
    relevance: float
    completeness: float
    coherence: float
    style: float
    safety: float

    def passed(self, thresholds):
        """Each dimension must clear its own threshold; no averaging."""
        return all(
            getattr(self, dim) >= thresholds.get(dim, 0.7)
            for dim in ("correctness", "relevance", "completeness",
                       "coherence", "style", "safety")
        )

thresholds = {
    "correctness": 0.85,  # critical
    "safety": 0.99,       # near-zero tolerance
    "relevance": 0.8,
    "completeness": 0.7,
    "coherence": 0.7,
    "style": 0.6,         # nice to have
}
RAG-specific: faithfulness vs correctness·python
# An answer can be correct (matches ground truth) but unfaithful
# (the LLM made it up; the retrieved docs did not support it).
# In RAG, unfaithfulness is the dangerous failure mode — it means
# your hallucination defenses are not working.
def faithfulness(answer, retrieved_docs, judge):
    prompt = f"""
Given retrieved context:
{retrieved_docs}

Answer:
{answer}

Is every factual claim in the answer supported by the context?
List unsupported claims if any.
"""
    return judge.complete(prompt)

External links

Exercise

ship 하는 기능 하나에 대해 8가지 quality 차원 list 하고 1 (무관) 부터 5 (필수) 까지 각각 rate. 상위 3개 골라서 각각에 대해 specific test case 한 개씩 써.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.