dspy.BestOfN

dspy.BestOfN

이 페이지는 DSPy의 BestOfN 모듈을 다뤄요. 같은 시그니처를 여러 번 호출해 후보 답변들을 모은 뒤, 그중 가장 좋은 것을 선별하는 방식으로 답변 품질을 높여 주는 모듈이에요. 단일 호출의 변동성을 줄이고 더 안정적인 결과를 얻고 싶을 때 유용해요.

출처: 문서

본문

BestOfN은 dspy.Module 계통의 모듈로, forward에서 N개의 후보를 생성하고 선택한 결과를 반환해요. 아래는 이 클래스가 노출하는 멤버 목록이에요.

::: dspy.BestOfN
    handler: python
    options:
        members:
            - __call__
            - acall
            - batch
            - deepcopy
            - dump_state
            - forward
            - get_lm
            - inspect_history
            - load
            - load_state
            - map_named_predictors
            - named_parameters
            - named_predictors
            - named_sub_modules
            - parameters
            - predictors
            - reset_copy
            - save
            - set_lm
        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)