dspy.evaluate.answer_exact_match

dspy.evaluate.answer_exact_match

이 페이지는 DSPy의 정확 문자열 일치 메트릭인 answer_exact_match를 다뤄요. 예측과 정답을 (선택적으로 정규화한 뒤) 문자 그대로 비교해, 완전히 같으면 1.0, 다르면 0.0을 반환하는 가장 단순하고 빠른 평가 함수예요. 빠른 기준선 점수로 시작하기에 좋아요.

출처: 문서

본문

answer_exact_match는 두 문자열(또는 동일 타입 값)이 정확히 일치하는지 검사해 0.0 또는 1.0 점수를 돌려줘요. 규칙이 단순해서 해석이 명확하지만, 표현만 다른 같은 답은 놓칠 수 있어요. 이 함수의 API 레퍼런스는 아래와 같아요.

::: dspy.evaluate.answer_exact_match
    handler: python
    options:
        show_source: true
        show_root_heading: true
        heading_level: 2
        docstring_style: google
        show_root_full_path: true
        show_object_full_path: false
        separate_signature: false
        inherited_members: true

더 알아보기 (Learn more)