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}
}