{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T23:37:50Z","timestamp":1790811470480,"version":"4.1.0"},"reference-count":37,"publisher":"SAGE Publications","issue":"2","license":[{"start":{"date-parts":[[2025,1,1]],"date-time":"2025-01-01T00:00:00Z","timestamp":1735689600000},"content-version":"unspecified","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"},{"start":{"date-parts":[[2025,1,1]],"date-time":"2025-01-01T00:00:00Z","timestamp":1735689600000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/journals.sagepub.com\/page\/policies\/text-and-data-mining-license"}],"content-domain":{"domain":["journals.sagepub.com"],"crossmark-restriction":true},"short-container-title":["Semantic Web: \u2013 Interoperability, Usability, Applicability"],"published-print":{"date-parts":[[2025,1]]},"abstract":"<jats:p>\n                    The capabilities of Large Language Models (LLMs,) such as Mistral 7B, Llama 3, GPT-4, present a significant opportunity for knowledge extraction (KE) from text. However, LLMs\u2019 context-sensitivity can hinder obtaining precise and task-aligned outcomes, thereby requiring prompt engineering. This study explores the efficacy of five prompt methods with different task demonstration strategies across 17 different prompt templates, utilizing a relation extraction dataset\n                    \n                    (RED-FM) with the aforementioned LLMs. To facilitate evaluation, we introduce a novel framework grounded in Wikidata\u2019s ontology. The findings demonstrate that LLMs are capable of extracting a diverse array of facts from text. Notably, incorporating a simple instruction accompanied by a task demonstration\u00a0\u2013 comprising three examples selected via a retrieval mechanism\u00a0\u2013 significantly enhances performance across Mistral 7B, Llama 3, and GPT-4. The effectiveness of reasoning-oriented prompting methods such as Chain-of-Thought, Reasoning and Acting, while improved with task demonstrations, does not surpass alternative methods. This suggests that framing extraction as a reasoning task may not be necessary for KE. Notably, task demonstrations leveraging examples selected via retrieval mechanisms facilitate effective knowledge extraction across all tested prompting strategies and LLMs.\n                  <\/jats:p>","DOI":"10.3233\/sw-243719","type":"journal-article","created":{"date-parts":[[2024,9,20]],"date-time":"2024-09-20T10:36:34Z","timestamp":1726828594000},"update-policy":"https:\/\/doi.org\/10.1177\/sage-journals-update-policy","source":"Crossref","is-referenced-by-count":20,"title":["Testing prompt engineering methods for knowledge extraction from text"],"prefix":"10.1177","volume":"16","author":[{"given":"Fina","family":"Polat","sequence":"first","affiliation":[{"name":"University of Amsterdam","place":["The\u00a0Netherlands"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Ilaria","family":"Tiddi","sequence":"additional","affiliation":[{"name":"Vrije Universiteit Amsterdam","place":["The\u00a0Netherlands"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Paul","family":"Groth","sequence":"additional","affiliation":[{"name":"University of Amsterdam","place":["The\u00a0Netherlands"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"179","published-online":{"date-parts":[[2025,2,18]]},"reference":[{"key":"e_1_3_4_2_2","unstructured":"AI@Meta Llama 3 Model Card 2024 https:\/\/github.com\/meta-llama\/llama3\/blob\/main\/MODEL_CARD.md."},{"key":"e_1_3_4_3_2","unstructured":"Ammalainen D. 2023 https:\/\/upload.wikimedia.org\/wikipedia\/commons\/1\/1b\/Wikidata_ontology_issues_---_suggestions_for_prioritisation_2023.pdf."},{"key":"e_1_3_4_4_2","first-page":"1877","volume-title":"Advances in Neural Information Processing Systems","author":"Brown T.","year":"2020","unstructured":"Brown T., Mann B., Ryder N., Subbiah M., Kaplan J.D., Dhariwal P., Neelakantan A., Shyam P., Sastry G., Askell A., Agarwal S., Herbert-Voss A., Krueger G., Henighan T., Child R., Ramesh A., Ziegler D., Wu J., Winter C., Hesse C., Chen M., Sigler E., Litwin M., Gray S., Chess B., Clark J., Berner C., McCandlish S., Radford A., Sutskever I., Amodei D., Language models are few-shot learners, in: Advances in Neural Information Processing Systems, Larochelle H., Ranzato M., Hadsell R., Balcan M.F., Lin H., eds, Vol.\u00a033, Curran Associates, Inc., 2020, pp.\u00a01877\u20131901, https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2020\/file\/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf."},{"key":"e_1_3_4_5_2","doi-asserted-by":"publisher","DOI":"10.1145\/290941.291025"},{"key":"e_1_3_4_6_2","volume-title":"PaLM: Scaling Language Modeling with Pathways","author":"Chowdhery A.","year":"2022","unstructured":"Chowdhery A., Narang S., Devlin J., Bosma M., Mishra G., Roberts A., Barham P., Chung H.W., Sutton C., Gehrmann S., Schuh P., Shi K., Tsvyashchenko S., Maynez J., Rao A., Barnes P., Tay Y., Shazeer N., Prabhakaran V., Reif E., Du N., Hutchinson B., Pope R., Bradbury J., Austin J., Isard M., Gur-Ari G., Yin P., Duke T., Levskaya A., Ghemawat S., Dev S., Michalewski H., Garcia X., Misra V., Robinson K., Fedus L., Zhou D., Ippolito D., Luan D., Lim H., Zoph B., Spiridonov A., Sepassi R., Dohan D., Agrawal S., Omernick M., Dai A.M., Pillai T.S., Pellat M., Lewkowycz A., Moreira E., Child R., Polozov O., Lee K., Zhou Z., Wang X., Saeta B., Diaz M., Firat O., Catasta M., Wei J., Meier-Hellstern K., Eck D., Dean J., Petrov S., Fiedel N., PaLM: Scaling Language Modeling with Pathways, 2022."},{"key":"e_1_3_4_7_2","volume-title":"Advances in Neural Information Processing Systems","author":"Christiano P.F.","year":"2017","unstructured":"Christiano P.F., Leike J., Brown T., Martic M., Legg S., Amodei D., Deep reinforcement learning from human preferences, in: Advances in Neural Information Processing Systems, Guyon I., Luxburg U.V., Bengio S., Wallach H., Fergus R., Vishwanathan S., Garnett R., eds, Vol.\u00a030, Curran Associates, Inc., 2017, https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2017\/file\/d5e2c0adad503c91f91df240d0cd4e49-Paper.pdf."},{"key":"e_1_3_4_8_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.gem-1.10"},{"key":"e_1_3_4_9_2","doi-asserted-by":"publisher","unstructured":"Hogan A. Blomqvist E. Cochez M. D\u2019amato C. Melo G.D. Gutierrez C. Kirrane S. Gayo J.E.L. Navigli R. Neumaier S. Ngomo A.-C.N. Polleres A. Rashid S.M. Rula A. Schmelzeisen L. Sequeda J. Staab S. Zimmermann A. Knowledge Graphs ACM Comput. Surv. 54(4) (2021). doi:10.1145\/3447772.","DOI":"10.1145\/3447772"},{"key":"e_1_3_4_10_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2021.findings-emnlp.204"},{"key":"e_1_3_4_11_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.acl-long.237"},{"key":"e_1_3_4_12_2","unstructured":"Jiang A.Q. Sablayrolles A. Mensch A. Bamford C. Chaplot D.S. Casas D.D.L. Bressand F. Lengyel G. Lample G. Saulnier L. et al. Mistral 7B 2023 arXiv preprint arXiv:2310.06825."},{"key":"e_1_3_4_13_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.naacl-main.342"},{"key":"e_1_3_4_14_2","doi-asserted-by":"crossref","unstructured":"Josifoski M. Sakota M. Peyrard M. West R. Exploiting Asymmetry for Synthetic Training Data Generation: SynthIE and the Case of Information Extraction 2023 arXiv preprint arXiv:2303.04132.","DOI":"10.18653\/v1\/2023.emnlp-main.96"},{"key":"e_1_3_4_15_2","volume-title":"ICLR 2023 Workshop on Mathematical and Empirical Understanding of Foundation Models","author":"Khalifa M.","year":"2023","unstructured":"Khalifa M., Logeswaran L., Lee M., Lee H., Wang L., Exploring demonstration ensembling for in-context learning, in: ICLR 2023 Workshop on Mathematical and Empirical Understanding of Foundation Models, 2023, https:\/\/openreview.net\/forum?id=9kK4R_8nAsD."},{"key":"e_1_3_4_16_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2020.acl-main.703"},{"key":"e_1_3_4_17_2","first-page":"9459","volume-title":"Advances in Neural Information Processing Systems","author":"Lewis P.","year":"2020","unstructured":"Lewis P., Perez E., Piktus A., Petroni F., Karpukhin V., Goyal N., Kuttler H., Lewis M., Yih W.-T., Rocktaschel T., Riedel S., Kiela D., Retrieval-augmented generation for knowledge-intensive NLP tasks, in: Advances in Neural Information Processing Systems, Larochelle H., Ranzato M., Hadsell R., Balcan M.F., Lin H., eds, Vol.\u00a033, Curran Associates, Inc., 2020, pp.\u00a09459\u20139474, https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2020\/file\/6b493230205f780e1bc26945df7481e5-Paper.pdf."},{"key":"e_1_3_4_18_2","unstructured":"Li B. Fang G. Yang Y. Wang Q. Ye W. Zhao W. Zhang S. Evaluating ChatGPT\u2019s Information Extraction Capabilities: An Assessment of Performance Explainability Calibration and Faithfulness (2023) arXiv:2304.11633. https:\/\/api.semanticscholar.org\/CorpusID:258297899"},{"key":"e_1_3_4_19_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2022.acl-long.225"},{"key":"e_1_3_4_20_2","doi-asserted-by":"publisher","unstructured":"Liu P. Yuan W. Fu J. Jiang Z. Hayashi H. Neubig G. Pre-Train Prompt and Predict: A Systematic Survey of Prompting Methods in Natural Language Processing ACM Comput. Surv. 55(9) (2023). doi:10.1145\/3560815.","DOI":"10.1145\/3560815"},{"key":"e_1_3_4_21_2","doi-asserted-by":"publisher","DOI":"10.3233\/SW-180333"},{"key":"e_1_3_4_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/3605943"},{"key":"e_1_3_4_23_2","unstructured":"OpenAI GPT-4 Technical Report 2023."},{"key":"e_1_3_4_24_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D19-1250"},{"key":"e_1_3_4_25_2","unstructured":"Saravia E. 2022 https:\/\/www.promptingguide.ai\/."},{"key":"e_1_3_4_26_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.findings-acl.71"},{"key":"e_1_3_4_27_2","volume-title":"LaMDA: Language Models for Dialog Applications","author":"Thoppilan R.","year":"2022","unstructured":"Thoppilan R., Freitas D.D., Hall J., Shazeer N., Kulshreshtha A., Cheng H.-T., Jin A., Bos T., Baker L., Du Y., Li Y., Lee H., Zheng H.S., Ghafouri A., Menegali M., Huang Y., Krikun M., Lepikhin D., Qin J., Chen D., Xu Y., Chen Z., Roberts A., Bosma M., Zhao V., Zhou Y., Chang C.-C., Krivokon I., Rusch W., Pickett M., Srinivasan P., Man L., Meier-Hellstern K., Morris M.R., Doshi T., Santos R.D., Duke T., Soraker J., Zevenbergen B., Prabhakaran V., Diaz M., Hutchinson B., Olson K., Molina A., Hoffman-John E., Lee J., Aroyo L., Rajakumar R., Butryna A., Lamm M., Kuzmina V., Fenton J., Cohen A., Bernstein R., Kurzweil R., Aguera-Arcas B., Cui C., Croak M., Chi E., Le Q., LaMDA: Language Models for Dialog Applications, 2022."},{"key":"e_1_3_4_28_2","volume-title":"LLaMA: Open and Efficient Foundation Language Models","author":"Touvron H.","year":"2023","unstructured":"Touvron H., Lavril T., Izacard G., Martinet X., Lachaux M.-A., Lacroix T., Roziere` B., Goyal N., Hambro E., Azhar F., Rodriguez A., Joulin A., Grave E., Lample G., LLaMA: Open and Efficient Foundation Language Models, 2023."},{"key":"e_1_3_4_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/2629489"},{"key":"e_1_3_4_30_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.acl-long.868"},{"key":"e_1_3_4_31_2","volume-title":"International Conference on Learning Representations (ICLR)","author":"Wang X.","year":"2023","unstructured":"Wang X., Wei J., Schuurmans D., Le Q., Chi E., Narang S., Chowdhery A., Zhou D., Self-consistency improves chain of thought reasoning in language models, in: International Conference on Learning Representations (ICLR), 2023."},{"key":"e_1_3_4_32_2","first-page":"24824","volume-title":"Advances in Neural Information Processing Systems","author":"Wei J.","year":"2022","unstructured":"Wei J., Wang X., Schuurmans D., Bosma M., Ichter B., Xia F., Chi E., Le Q.V., Zhou D., Chain-of-thought prompting elicits reasoning in large language models, in: Advances in Neural Information Processing Systems, Koyejo S., Mohamed S., Agarwal A., Belgrave D., Cho K., Oh A., eds, Vol.\u00a035, Curran Associates, Inc., 2022, pp.\u00a024824\u201324837, https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2022\/file\/9d5609613524ecf4f15af0f7b31abca4-Paper-Conference.pdf."},{"key":"e_1_3_4_33_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.acl-long.428"},{"key":"e_1_3_4_34_2","volume-title":"International Conference on Learning Representations (ICLR)","author":"Yao S.","year":"2023","unstructured":"Yao S., Zhao J., Yu D., Du N., Shafran I., Narasimhan K., Cao Y., ReAct: Synergizing reasoning and acting in language models, in: International Conference on Learning Representations (ICLR), 2023."},{"key":"e_1_3_4_35_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2023.findings-acl.273"},{"key":"e_1_3_4_36_2","first-page":"2335","volume-title":"Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers","author":"Zeng D.","year":"2014","unstructured":"Zeng D., Liu K., Lai S., Zhou G., Zhao J., Relation classification via convolutional deep neural network, in: Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, Tsujii J., Hajic J., eds, Dublin City University and Association for Computational Linguistics, Dublin, Ireland, 2014, pp.\u00a02335\u20132344, https:\/\/aclanthology.org\/C14-1220."},{"key":"e_1_3_4_37_2","unstructured":"Zhang S. Dong L. Li X. Zhang S. Sun X. Wang S. Li J. Hu R. Zhang T. Wu F. Wang G. Instruction Tuning for Large Language Models: A Survey 2023."},{"key":"e_1_3_4_38_2","doi-asserted-by":"publisher","DOI":"10.1016\/j.neucom.2016.12.075"}],"container-title":["Semantic Web: \u2013 Interoperability, Usability, Applicability"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/journals.sagepub.com\/doi\/pdf\/10.3233\/SW-243719","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/journals.sagepub.com\/doi\/full-xml\/10.3233\/SW-243719","content-type":"application\/xml","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/journals.sagepub.com\/doi\/pdf\/10.3233\/SW-243719","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,1]],"date-time":"2026-05-01T05:27:38Z","timestamp":1777613258000},"score":1,"resource":{"primary":{"URL":"https:\/\/journals.sagepub.com\/doi\/10.3233\/SW-243719"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,1]]},"references-count":37,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2025,1]]}},"alternative-id":["10.3233\/SW-243719"],"URL":"https:\/\/doi.org\/10.3233\/sw-243719","relation":{},"ISSN":["1570-0844","2210-4968"],"issn-type":[{"value":"1570-0844","type":"print"},{"value":"2210-4968","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,1]]},"article-number":"SW-243719"}}