LLMKE
1.0.0
Die Implementierung des Gewinnsystems für Track 2 der ISWC LM-KBC 2023 Challenge.
.
├── 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
Ausführliche Ergebnisse finden Sie in der Tabelle hier.
Sie benötigen einen OpenAI -API -Schlüssel, um diese Pipeline auszuführen. Sie können Ihre API -Taste in pipeline.config.py einfügen.
cd LLMKEAnforderungen einrichten:
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 Für die Verwendung von IMDB -Kontext führen Sie download_imdb_dataset() und build_imdb_id_index() in pipeline.context aus. Wir bieten einen Index für den Testsatz.
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}
}