본문으로 건너뛰기
Minsing Log
뒤로 가기

수능 llm 벤치마크 테스트 방법

Build Log

2023 수능 벤치마크 하는 방법

2023년도 수능 벤치마크를 할 수 있게 실험코드를 만들었습니다! 궁금한 모델을 Submit하기전에 얼마정도의 성능이 나오는지 파악하고 싶다면 써보세요!

🏁 Quick Start

  1. AutoRAG를 설치합니다.

    pip install AutoRAG
  2. .env에 OpenAI API KEY를 환경 변수로 설정합니다.

  3. make_autorag_dataset.ipynb를 실행하여 json 데이터를 AutoRAG 데이터셋으로 변경합니다.

  4. autorag_config.yaml에서 프롬프트와 추가할 모델을 설정합니다. 설정방법

  5. autorag_run.py를 실행합니다.

    python ./korean_sat_mini_test/autorag_run.py --qa_data_path ./data/autorag/qa_2023.parquet --corpus_data_path ./data/autorag/corpus_2023.parquet
  6. autorag_project_dir 폴더에서 결과를 확인합니다.

  7. grading_report_card.ipynb를 실행하여 여러분의 성적표를 확인해보세요!

    • 성적표 결과는 data/result/ 폴더에 저장됩니다!

🤷 How to change prompt and model?

[Case 1] prompt수정방법

  1. autorag_config.yaml에서 node_type에 prompt_maker부분에서 prompt의 내용을 수정합니다.
    - node_type: prompt_maker
      strategy:
        metrics:
          - metric_name: kice_metric
      modules:
        - module_type: fstring
          prompt:
          - |            
            Answer the given question.
            Read paragraph, and select only one answer between 5 choices.
            
            paragraph :
            {retrieved_contents}
            
            question of problem :
            {query}
            
            Answer : 3

[Case 2] 모델을 바꾸고 싶을때 yaml파일 설정하는법

  1. node_type의 generator부분에 Modules부분을 수정해야합니다.
<OpenAI 모델>
- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: openai_llm
      llm: [gpt-4o-mini, gpt-4o]
      batch: 5
<HuggingFace LLM 모델>
- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: llama_index_llm
      llm: huggingfacellm
      model: HumanF-MarkrAI/Gukbap-Qwen2-7B

HuggingFace모델 외에 yaml파일을 커스터마이징 하는방법에 대해 더 알고 싶다면 AutoRAG 공식문서를 참고해주세요!

📒 Notice

공개 여정 구독

글이 올라오면 이메일로 보내드릴게요.

개발, 창업, 배움, 실패와 회고를 짧고 솔직하게 기록합니다. 검색으로 스쳐가는 독자가 아니라 여정을 따라오는 팬을 만들기 위한 뉴스레터입니다.

뉴스레터는 준비 중입니다. 그동안 RSS 로 구독하거나 이메일 로 알림을 요청해 주세요.


이 글 공유하기:

댓글

GitHub 계정으로 로그인해 댓글을 남길 수 있습니다.


이전 글
o1-preview Achieves 97 Points on the 2025 Korean CSAT Language Section!
다음 글
o1-preview 2025 수능 국어 97점 달성