LLMKE
1.0.0
ISWC LM-KBC 2023 챌린지의 트랙 2를위한 우승 시스템의 구현.
.
├── context
│ └── imdb.series.index.json
├── data
│ ├── dev.pred.jsonl
│ ├── test.jsonl
│ ├── test.query.jsonl # Query date: 28/07/2023
│ ├── train.jsonl
│ └── val.jsonl
├── evaluations # Disambiguated
│ └── */*.txt
├── predictions # Disambiguated
│ └── */*.jsonl
├── pipeline
│ ├── __init__.py
│ ├── config.py
│ ├── disambiguate.py
│ ├── evaluate.py
│ ├── context.py
│ ├── file_io.py
│ ├── models.py
│ ├── prompt.py
│ └── run.py
├── examples.jsonl
├── main.py
├── predictions.jsonl
├── predictions.zip
├── question-prompts.json
├── README.md
├── requirements.txt
└── sparql_query.py
자세한 결과는 여기에서 스프레드 시트를 참조하십시오.
이 파이프 라인을 실행하려면 OpenAI API 키가 필요합니다. API 키를 pipeline.config.py 에 붙여 넣을 수 있습니다.
cd LLMKE요구 사항 설정 :
pip install -r requirements.txtpython main.py -t run -d < dataset > -m < model > -s < setting > -p < prompt > -r < relation ><dataset> : train , val , test<model> : gpt-3.5-turbo , gpt-4<setting> : zero-shot , few-shot , context<prompt> : question , triplepython main.py -t run -d test -m gpt-4 -s few-shot -p question -r CompoundHasParts IMDB 컨텍스트를 사용하려면 pipeline.context 에서 download_imdb_dataset() 및 build_imdb_id_index() 실행하십시오. 테스트 세트에 대한 색인을 제공합니다.
python main.py -t disambiguate -d < dataset > -m < model > -s < setting > -p < prompt > -r < relation >python main.py -t disambiguate -d test -m gpt-4 -s context -p question -r StateBordersState python main.py -t evaluate -d < dataset > -m < model > -s < setting > -p < prompt > -c -w -r < relation >python main.py -t evaluate -d < dataset > -m < model > -s < setting > -p < prompt > -w -r all @article{zhang-et-al-2023-llmke,
author = {Bohui Zhang and
Ioannis Reklos and
Nitisha Jain and
Albert Mero{~{n}}o{-}Pe{~{n}}uela and
Elena Simperl},
title = {{Using Large Language Models for Knowledge Engineering (LLMKE): A Case Study on Wikidata}},
journal = {CoRR},
volume = {abs/2309.08491},
year = {2023},
url = {https://doi.org/10.48550/arXiv.2309.08491},
doi = {10.48550/arXiv.2309.08491},
eprinttype = {arXiv},
eprint = {2309.08491},
timestamp = {Fri, 22 Sep 2023 12:57:22 +0200},
biburl = {https://dblp.org/rec/journals/corr/abs-2309-08491.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}