๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ
Minsing Log
๋’ค๋กœ ๊ฐ€๊ธฐ

How to Benchmark 2023 Korean CSAT with LLMs

Founder Notes

๐Ÿ”ง How to Benchmark 2023 Korean CSAT with LLMs

Weโ€™ve developed experimental code for benchmarking the 2023 Korean CSAT Language section. Use this to estimate the performance of your desired models before submitting them officially!


๐Ÿ Quick Start Guide

  1. Install AutoRAG:

    pip install AutoRAG
  2. Set your OpenAI API Key: Add your OpenAI API key as an environment variable in .env.

  3. Convert JSON data into AutoRAG datasets: Run the make_autorag_dataset.ipynb notebook to prepare the data.

  4. Edit prompts and models in autorag_config.yaml: Customize prompts and add models. Instructions here.

  5. Run the benchmark: Execute the script to run the benchmark.

    python ./korean_sat_mini_test/autorag_run.py --qa_data_path ./data/autorag/qa_2023.parquet --corpus_data_path ./data/autorag/corpus_2023.parquet
    • To update models or prompts before running, refer to this guide.
  6. Check the results: Results are saved in the autorag_project_dir folder.

  7. View your grade report: Open grading_report_card.ipynb to generate and view your performance report. Reports are saved in the data/result/ folder.


๐Ÿคท How to Modify Prompts and Models?

[Case 1] Modifying the Prompt:

Edit the node_type: prompt_maker section to customize the prompt content.

Example:

    - 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] Adding or Replacing Models:

Modify the node_type: generator section to configure models.

OpenAI Models:

Example:

- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: openai_llm
      llm: [gpt-4o-mini, gpt-4o]
      batch: 5

HuggingFace Models:

Example:

- node_type: generator
  strategy:
    metrics:
      - metric_name: kice_metric
  modules:
    - module_type: llama_index_llm
      llm: huggingfacellm
      model: HumanF-MarkrAI/Gukbap-Qwen2-7B

For more advanced customization, refer to the AutoRAG Documentation.


๐Ÿ“’ Notes:

Now youโ€™re ready to explore and evaluate your models against 2023 Korean CSAT benchmarks! ๐ŸŽฏ

๊ณต๊ฐœ ์—ฌ์ • ๊ตฌ๋…

๊ธ€์ด ์˜ฌ๋ผ์˜ค๋ฉด ์ด๋ฉ”์ผ๋กœ ๋ณด๋‚ด๋“œ๋ฆด๊ฒŒ์š”.

๊ฐœ๋ฐœ, ์ฐฝ์—…, ๋ฐฐ์›€, ์‹คํŒจ์™€ ํšŒ๊ณ ๋ฅผ ์งง๊ณ  ์†”์งํ•˜๊ฒŒ ๊ธฐ๋กํ•ฉ๋‹ˆ๋‹ค. ๊ฒ€์ƒ‰์œผ๋กœ ์Šค์ณ๊ฐ€๋Š” ๋…์ž๊ฐ€ ์•„๋‹ˆ๋ผ ์—ฌ์ •์„ ๋”ฐ๋ผ์˜ค๋Š” ํŒฌ์„ ๋งŒ๋“ค๊ธฐ ์œ„ํ•œ ๋‰ด์Šค๋ ˆํ„ฐ์ž…๋‹ˆ๋‹ค.

๋‰ด์Šค๋ ˆํ„ฐ๋Š” ์ค€๋น„ ์ค‘์ž…๋‹ˆ๋‹ค. ๊ทธ๋™์•ˆ RSS ๋กœ ๊ตฌ๋…ํ•˜๊ฑฐ๋‚˜ ์ด๋ฉ”์ผ ๋กœ ์•Œ๋ฆผ์„ ์š”์ฒญํ•ด ์ฃผ์„ธ์š”.


์ด ๊ธ€ ๊ณต์œ ํ•˜๊ธฐ:

๋Œ“๊ธ€

GitHub ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธํ•ด ๋Œ“๊ธ€์„ ๋‚จ๊ธธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


์ด์ „ ๊ธ€
(numpy ๋ธŒ๋กœ๋“œ์บ์ŠคํŒ…) numpy์—์„œ scoringํ• ๋•Œ ๊ฐ’์ด ์ด์ƒํ•˜๊ฒŒ ๋‚˜์˜จ๋‹ค?
๋‹ค์Œ ๊ธ€
o1-preview Achieves 97 Points on the 2025 Korean CSAT Language Section!