Development of an Adaptive System for Generating Game Quests and Dialogues Based on Large Language Models
Main Article Content
Abstract
This article addresses the problem of creating dynamic narrative systems for video games with real-time interactivity. It presents the development and testing of a GPT integration component for dialogue generation, which revealed a critical limitation of cloud-based solutions – a 30-second latency unacceptable for gameplay. A hybrid architecture of an adaptive system is proposed, combining LLMs with reinforcement learning mechanisms. Particular attention is given to solving the problems of game world consistency and managing long-term context of NPC interactions through a RAG approach. The transition to the Edge AI paradigm with the application of quantization methods to achieve a target latency of 200–500 ms is substantiated. Metrics for evaluating personalization and dynamic content adaptation have been developed.
Article Details
References
2. Inworld. Future of NPCs report // inworld [Electronic resource]. – February 2023. URL: https://www.inworld.ai/blog/future-of-npcs-report
3. Sweetser P. Large language models and video games: A preliminary scoping review // Proceedings of the 6th ACM Conference on Conversational User Interfaces. 2024. P. 1–8.
4. Wang Q. et al. GenQuest: An LLM-based Text Adventure Game for Language Learners // arXiv preprint arXiv:2510.04498. 2025.
5. Hardiman J.P.W. et al. AI-powered dialogues and quests generation in role-playing games using Google's Gemini and Sentence BERT framework // Procedia Computer Science. 2024. Vol. 245. P. 1111–1119.
6. Ashby T. et al. Personalized quest and dialogue generation in role-playing games: A knowledge graph-and language model-based approach // Proceedings of the 2023 CHI Conference on Human Factors in Computing Systems. 2023. P. 1–20.
7. Bolshakov E.S., Kugurakova V.V. Generative simulation of a game environment in real time // Russian Digital Libraries Journal. 2025. Vol. 28, No. 2. P. 188–212 (In Russian).
8. Nurygayanov N.R., Kugurakova V.V. An approach to creating a corpus of video game texts based on a universal structure // Russian Digital Libraries Journal. 2024. Vol. 27, No. 4. P. 578–597 (In Russian).
9. Akoury N., Yang Q., Iyyer M. A framework for exploring player perceptions of llm-generated dialogue in commercial video games // Findings of the Association for Computational Linguistics: EMNLP 2023. P.2295–2311.
10. Jin C., Cao P., Zaïane O. Role-Playing Based on Large Language Models via Style Extraction // International Conference on Neural Information Processing. Singapore: Springer Nature Singapore, 2024. P. 433–447.
11. Tseng Y.M. et al. Two tales of persona in llms: A survey of role-playing and personalization // arXiv preprint arXiv:2406.01171. 2024.
12. Trofimchuk V.T. Development of a component for GPT integration into video games: Bachelor's qualifying work, spec. 09.03.04 – Software Engineering, scientific supervisor Khafizov M.R., Kazan Federal University, Institute of Information Technology and Intelligent Systems, 2024. 54 p.
URL: https://kpfu.ru/student_diplom/10.160.178.20_FLP3APBW54SAM3JYPPT73DBLRFUS75DXQEBT_Z5F6LD7O0KAF7_F_Trofimchuk.pdf (In Russian)
13. Abdelrahman E. Edge AI and Edge Computing: Powering Real-Time Intelligence [Electronic resource] // Ultralytics. URL: https://www.ultralytics.com/ru/blog/edge-ai-and-edge-computing-powering-real-time-intelligence
14. Kuderin D. Edge AI: how neural networks work on devices with limited resources [Electronic resource] // TProger. URL: https://tproger.ru/articles/edge-ai--kak-rabotayut-nejroseti-na-ustrojstvah-s-ogranichennymi-resursami (In Russian).
15. Martindale J. Input lag and response time aren’t the same. Here’s which is more important [Electronic resource]. 2024. URL: https://www.digitaltrends.com/computing/input-lag-vs-response-time/
16. Kugurakova V.V. A formal approach to spatio-temporal modeling of game systems // Uchenye Zapiski Kazanskogo Universiteta. Seriya Fiziko-Matematicheskie Nauki. 2024. Vol. 166, No. 4. P. 532–554 (In Russian).
17. Chen B. Optimization Strategies for Role-Playing Games Based on Large Language Models // Proceedings of the 2nd International Conference on Data Science and Engineering: ICDSE 2025. P. 632–637.
18. Sakhibgareeva G.F., Kugurakova V.V., Bolshakov E.S. Game balancing tools // Russian Digital Libraries Journal. 2023. Vol. 26, No. 2. P. 225–251 (In Russian).

This work is licensed under a Creative Commons Attribution 4.0 International License.
Presenting an article for publication in the Russian Digital Libraries Journal (RDLJ), the authors automatically give consent to grant a limited license to use the materials of the Kazan (Volga) Federal University (KFU) (of course, only if the article is accepted for publication). This means that KFU has the right to publish an article in the next issue of the journal (on the website or in printed form), as well as to reprint this article in the archives of RDLJ CDs or to include in a particular information system or database, produced by KFU.
All copyrighted materials are placed in RDLJ with the consent of the authors. In the event that any of the authors have objected to its publication of materials on this site, the material can be removed, subject to notification to the Editor in writing.
Documents published in RDLJ are protected by copyright and all rights are reserved by the authors. Authors independently monitor compliance with their rights to reproduce or translate their papers published in the journal. If the material is published in RDLJ, reprinted with permission by another publisher or translated into another language, a reference to the original publication.
By submitting an article for publication in RDLJ, authors should take into account that the publication on the Internet, on the one hand, provide unique opportunities for access to their content, but on the other hand, are a new form of information exchange in the global information society where authors and publishers is not always provided with protection against unauthorized copying or other use of materials protected by copyright.
RDLJ is copyrighted. When using materials from the log must indicate the URL: index.phtml page = elbib / rus / journal?. Any change, addition or editing of the author's text are not allowed. Copying individual fragments of articles from the journal is allowed for distribute, remix, adapt, and build upon article, even commercially, as long as they credit that article for the original creation.
Request for the right to reproduce or use any of the materials published in RDLJ should be addressed to the Editor-in-Chief A.M. Elizarov at the following address: amelizarov@gmail.com.
The publishers of RDLJ is not responsible for the view, set out in the published opinion articles.
We suggest the authors of articles downloaded from this page, sign it and send it to the journal publisher's address by e-mail scan copyright agreements on the transfer of non-exclusive rights to use the work.