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

AutoRAG를 설치합니다.
pip install AutoRAG
.env에 OpenAI API KEY를 환경 변수로 설정합니다.
make_autorag_dataset.ipynb를 실행하여 json 데이터를 AutoRAG 데이터셋으로 변경합니다.
autorag_config.yaml에서 프롬프트와 추가할 모델을 설정합니다. 설정방법
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
autorag_project_dir 폴더에서 결과를 확인합니다.
grading_report_card.ipynb를 실행하여 여러분의 성적표를 확인해보세요!
data/result/ 폴더에 저장됩니다!
korean_sat_mini_test 폴더에서 autorag_config.yaml파일을 엽니다.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
node_type의 generator부분에 Modules부분을 수정해야합니다. module_type을 openai_llm 설정llm에는 OpenAI 모델들을 자유롭게 설정- node_type: generator
strategy:
metrics:
- metric_name: kice_metric
modules:
- module_type: openai_llm
llm: [gpt-4o-mini, gpt-4o]
batch: 5
module_type에는 llama_index_llm을 설정llm을 huggingfacellm 설정model에는 huggingface모델들을 자유롭게 설정- 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 공식문서를 참고해주세요!