Skip to content
Minsing Log
Go back

English Edition

How to Benchmark an LLM on the CSAT

Build Log

How to Benchmark the 2023 CSAT

We created experimental code to benchmark the 2023 CSAT! If you want to find out roughly how well a model you are curious about performs before submitting it, give it a try!

🏁 Quick Start

  1. Install AutoRAG.

    pip install AutoRAG
  2. Set the OpenAI API KEY as an environment variable in .env.

  3. Run make_autorag_dataset.ipynb to convert the JSON data into an AutoRAG dataset.

  4. Configure the prompt and the models to add in autorag_config.yaml. How to configure

  5. Run 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. Check the results in the autorag_project_dir folder.

  7. Run grading_report_card.ipynb to check your scorecard!

    • The scorecard results are saved in the data/result/ folder!

🤷 How to change prompt and model?

[Case 1] How to edit the prompt

  1. In autorag_config.yaml, modify the content of prompt in the prompt_maker section under node_type.
    - 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] How to configure the YAML file when you want to change the model

  1. You need to modify the Modules section in the generator section of node_type.
- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: openai_llm
      llm: [gpt-4o-mini, gpt-4o]
      batch: 5
- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: llama_index_llm
      llm: huggingfacellm
      model: HumanF-MarkrAI/Gukbap-Qwen2-7B

If you want to learn more about customizing the YAML file beyond Hugging Face models, please refer to the official AutoRAG documentation!

📒 Notice

공개 여정 구독

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

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

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


Share this post:

Comments

Sign in with GitHub to leave a comment.


Previous Post
o1-preview Achieves 97 Points on the 2025 Korean CSAT Language Section!
Next Post
o1-preview Achieves 97 Points on the 2025 CSAT Korean Language Section