Artificial intelligence

Scientific journal

ISSN 2710-1673

ONLINE: ISSN 2710-1681

Select your language


The Use of Large Language Models in Combination with the Ontological Approach for the Synthesis of Natural Language Text

Litvin A.1, Kaverinsky V.2, Symonov D.2
1 Glushkov Institute of cybernetic of NAS of Ukraine
2 Frantsevich Institute for Problems of Materials Science of NAS of Ukraine
litvin_any@ukr.net; insamhlaithe@gmail.com; denys.symonov@gmail.com

Full text (PDF)

UDC: 004.82:004.89
Publication Language: English
Stuc. intelekt. 2024; 29(4):89-95

Abstract: This research presented an approach based on the application of structured prompt instructions to large language models (LLM). Methodological foundations for using an ontology-driven system of structured prompts in interaction with ChatGPT were developed. The ChatGPT system allows expanding the knowledge base by obtaining new information from existing knowledge units based on a set of contexts. Thus, methods for generating meaningful responses in natural language were considered using a large language model using ontological approaches and natural language contexts. Using the proposed methodology, the OntoChatGPT system was developed, which effectively extracts entities from contexts, classifies them and generates appropriate responses. An experiment on the reverse synthesis of natural language sentences based on their ontological representation using large language models allows to clearly demonstrate the effectiveness of using the concept of large language models in dialogue systems. The study highlights the versatility of the methodology, emphasizing its applicability not only to ChatGPT but also to other chatbot systems based on LLMs, such as Google’s Bard utilizing the PaLM 2 LLM. The implementation of this technology is demonstrated using the Ukrainian language.

Keywords: ontology engineering; prompt engineering; prompt-based learning; meta-learning; ChatGPT; OntoChatGPT; chatbot; ontology-driven information system

References:

  1. Models - OpenAI API [Electronic source] // OpenAI Platform, 2023, Source access mode: https://platform.openai.com/docs/models/overview. (accessed Jun. 01, 2023).
  2. JushBJJ,“JushBJJ/Mr.-Ranedeer-AI-Tutor: A GPT-4 AI Tutor Prompt for customizable personalized learning experiences.,” GitHub, Jun. 01, 2023. [Online]. Available at: https://github.com/JushBJJ/Mr.-Ranedeer-AI-Tutor (accessed Jun. 01, 2023).
  3. {Structured} Prompt, “Structured JSON Prompts are even better in GPT-4.,” {Structured} Prompt. [Online]. Available at: https://structuredprompt.com/structured-json-prompts-are-even-better-in-chatgpt-4/.
  4. GPT 4 is Smarter than You Think: Introducing SmartGPT. [Online Video]. Available at: https://www.youtube.com/watch?v=wVzuvf9D9BU
  5. JushBJJ, “Mr. Ranedeer,”JushBJJ’s Substack, May 24, 2023. [Online]. Available at: https://jushbjj.substack.com/p/mr-ranedeer (accessed Jun. 01, 2023).
  6. K. Hebenstreit, R. Praas, L. P. Kiesewetter, and M. Samwald,“An automatically discovered chain-of-thought prompt generalizes to novel models and datasets, ” arXiv, May 04, 2023. doi: 10.48550/arXiv.2305.02897.
  7. T. Kojima, S. S. Gu, M. Reid, Y. Matsuo, and Y. Iwasawa, “Large language models are zero-shot reasoners, » arXiv, Jan. 29, 2023. doi: 10.48550/arXiv.2205.11916.
  8. J. Wei et al., “Chain-of-thought prompting elicits reasoning in large language models,”arXiv, Jan. 10, 2023. doi: 10.48550/arXiv.2201.11903.
  9. S. Wiegreffe, J. Hessel, S. Swayamdipta, M. Riedl, and Y. Choi,“Reframing human - AI collaboration for generating free-text explanations,”arXiv, May 04, 2022. https://doi.org/10.18653/v1/2022.naacl-main.47.
  10. OpenAI, “ChatGPT plugins,” OpenAI blog, Mar. 23, 2023. [Online]. Available at: https://openai.com/blog/chatgpt-plugins.
  11. OpenAI, “OpenAI plugins API,” OpenAI Platform, Jun. 01, 2023. [Online]. Available at: https://platform.openai.com/docs/plugins/introduction (accessed Jun. 01, 2023).
  12. S. Panda and N. Kaur, “Revolutionizing language processing in libraries with SheetGPT: an integration of Google Sheet and ChatGPT plugin,”Library Hi Tech News, 2023, https://doi.org/10.1108/LHTN-03-2023-0051.
  13. S. R. Moghaddam and C. J. Honey, “Boosting theory-of-mind performance in large language models via prompting,”arXiv, Apr. 26, 2023. doi: 10.48550/arXiv.2304.11490.
  14. D. Hendrycks et al., “Measuring massive multitask language understanding,” arXiv, Jan. 12, 2021. doi: 10.48550/arXiv.2009.03300.
  15. L. C. Magister, J. Mallinson, J. Adamek, E. Malmi, and A. Severyn,“Teaching small language models to reason,” arXiv, Jun. 01, 2023. doi:10.48550/arXiv.2212.08410.
  16. Y. Zhou et al., “Large language models are human-level prompt engineers,” arXiv, Mar. 10, 2023. doi: 10.48550/arXiv.2211.01910.
  17. Palagin A. V., “Architecture of ontology-controlled computer systems,” Cybern Syst Anal., vol. 42, no. 2, 2006, pp. 254–264. doi: 10.1007/s10559-006-0061-z.
  18. Bossche M. V., Ross P., MacLarty I., Nuffelen B. V., Pelov N., “Ontology driven software engineering for real life applications,” Proceedings of the 3rd Intl. Workshop on Semantic Web Enabled Software Engineering. 2007. Available at: https://www.semanticscholar.org/paper/Ontology-Driven-SoftwareEngineering-for-Real-Life-BosscheRoss/aabbe8ecd227bd931b44da8cea2aa8d2d1f76519.
  19. Ochieng, “PAROT: Translating natural language to SPARQL,” Expert Systems with Applications: X, vol. 5, p. 100024, 2020, https://doi.org/10.1016/j.eswax.2020.100024.
  20. S. Shaik, P. Kanakam, S. Mahaboob Hussain, D. Suryanarayana,“Transforming natural language query to SPARQL for Semantic Information Retrieval,” International Journal of Engineering Trends and Technology - IJETT, vol. 41, no. 7, pp.; 347-350, 2016. https://doi.org/10.14445/22315381/IJETT-V41P263.
  21. J. Lehmann and L. Bühmann, “AutoSPARQL: Let users query your knowledge base,” The Semantic Web: Research and Applications, G. Antoniou, M. Grobelnik, E. Simperl, B. Parsia, D. Plexousakis, P. De Leenheer, and J. Pan, Eds., in Lecture Notes in Computer Science. Berlin, Heidelberg: Springer, 2011, pp. 63–79. https://doi.org/10.1007/978-3-642-21034-1_5.
  22. Litvin A., Velychko V., Kaverinsky V., “A new approach to automatic ontology creation from the untagged text on the natural language of inflective type,” Proceedings of the International conference on software engineering “Soft Engine 2022”, NAU, Kyiv Ukraine, 2022, pp. 37 – 45.
  23. Litvin A., Velychko V., Kaverinsky V., “Development of natural language dialogue software systems,” Information Theories and Applications 28. 2021, pp. 233 – 270. doi: 10.54521/ijita28-03-p03.
  24. Kaverynskyi V. V., Litvin A. A., Velychko V. Yu., “Tree-based semantic analysis method for natural language phrase to formal query conversion,” Radio Electronics, Computer Science, Control, no. 2, 2021, pp. 105 – 113. doi: 10.15588/1607-3274-2021-2-11.
  25. WebProtégé [Electronic source] // Biomedical Informatics Research Group – Source access mode: https://webprotege.stanford.edu/.
  26. Curé O., Blin G., “RDF database systems: triples storage and SPARQL query processing,” First edition. Amsterdam; Boston: Morgan Kaufmann, 2015.
  27. LanguageTool API NLP UK [Електронний ресурс] // Corpus of modern Ukrainian language. 2023. https://github.com/brownuk/nlp_uk.

View full text (PDF)