<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Valentina Paunovic</string-name>
          <email>valentina.paunovic@metropolitan.ac.rs</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sedat Uyar</string-name>
          <email>suy@suyar.de</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marko Tanic</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Schleupen SE</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Moers</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Germany</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Poinz AG</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Zurich</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Switzerland</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Belgrade Metropolitan University</institution>
          ,
          <addr-line>Tadeuša Košćuška 63, Belgrade</addr-line>
          ,
          <country country="RS">Serbia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Chat GPT</institution>
          ,
          <addr-line>Moodle LMS, Natural Language Processing, Conversational AI, Personalized</addr-line>
        </aff>
      </contrib-group>
      <fpage>147</fpage>
      <lpage>160</lpage>
      <abstract>
        <p>AI-based technologies have the potential to significantly enhance e-learning systems. ChatGPT, a sophisticated AI tool for natural language processing, enables users to engage with a chatbot in a manner that closely resembles human communication. This language model can assist users in various tasks, including composing emails, essays, and code, and it can provide responses to their inquiries. In this research paper, we will thoroughly examine the impact of ChatGPT on e-learning and education. Our paper not only offers practical examples of AI technology applications but also delineates the essential steps for integration. Furthermore, we focus on the evaluation of GPT-3.5 plugins tailored for Moodle, a popular e-learning platform, and provide sample PHP code to illustrate the seamless integration of ChatGPT into the Moodle environment. These examples and code snippets serve as valuable resources for educators and system administrators looking to incorporate artificial intelligence technology into their learning management systems. Towards the end of this paper, we will present our insights into the positive and negative influences of ChatGPT on learning and students.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Learning.</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>The realm of eLearning has witnessed remarkable advancements with the emergence of Natural
Language Processing (NLP) and Artificial Intelligence (AI) technologies. Among these innovations,
the integration of Conversational AI, particularly Chatbots powered by GPT (Generative Pre-trained
Transformer), has revolutionized the way learners interact with educational platforms [1-4].</p>
      <p>This paper presents a novel approach to implementing Chat GPT within the Moodle Learning
Management System (LMS) to enhance eLearning experiences, fostering interactive and personalized
learning environments. Traditional eLearning systems have often struggled to provide engaging and
personalized interactions with learners, leading to limited effectiveness and reduced motivation. Chat
GPT, with its language comprehension and generation capabilities, offers a promising solution to this
challenge. By enabling dynamic and contextually aware conversations, Chat GPT transforms the
learning experience by providing learners with responsive, natural language interactions that cater to
their individual needs. Generative AI pertains to a category of AI models capable of generating novel
data patterns based on acquired knowledge from existing data. These models present the capacity to
produce content across different domain, such as text, visuals, music, and more [5-6]. These generative</p>
      <p>2023 Copyright for this paper by its authors.
CEUR</p>
      <p>ceur-ws.org
ISSN1613-0073
AI models utilize advanced deep learning methods and neural networks to scrutinize, interpret, and
produce content that bears a striking resemblance to human-generated outputs. Among these models,
ChatGPT, an AI model crafted by OpenAI, has surfaced as a potent instrument with extensive
applicability across multiple domains [7-8].</p>
      <p>Comprehending the origins and evolution of ChatGPT is pivotal to grasping its role in propelling
scientific exploration forward [9-10]. This segment furnishes an outline of the background, pivotal
milestones, and advancements witnessed during the development of ChatGPT. This highlights the
technological strides instrumental in its accomplishments within the scientific arena [11-12]. It's
noteworthy to mention that ChatGPT is distinct from Generative Adversarial Network (GAN) models;
instead, it operates as a language model founded on the Generative Pre-trained Transformer (GPT)
architecture [13-14]. While GANs typically serve tasks like image generation, GPT models are
specialized for tasks in natural language processing such as text generation and language
comprehension [15-16].</p>
      <p>Moodle, as a widely adopted open-source LMS, provides a conducive platform for integrating Chat
GPT into eLearning systems. Leveraging Moodle's extensibility and flexibility, educators can
seamlessly integrate Chat GPT and fine-tune the model to align with specific learning objectives,
facilitating adaptive and personalized learning pathways. The primary objective of this paper is to
present a systematic methodology for incorporating Chat GPT into Moodle, augmenting the platform's
interactivity and learner engagement. By integrating advanced Conversational AI within the eLearning
environment, this research aims to improve the effectiveness of knowledge delivery, learner
satisfaction, and overall learning outcomes. ChatGPT can be valuable not only to students engaged in
Moodle-based courses but also to educators who serve as authors and creators of learning materials and
lectures within Moodle.</p>
      <p>In the subsequent sections, we will delve into the significance of Chat GPT in the context of
eLearning, review related literature, and outline the proposed methodology for customizing the Chat
GPT model and seamlessly integrating it into Moodle. Also, we have described the integration of the
existing plugin with the Moodle system. Due to certain limitations, we have also modified and enhanced
the functionality of the "Source of Truth" component of the plugin. Additionally, we will explore the
potential contributions of this research and address challenges encountered during the implementation
process. So, the core of this paper's research is to provide a proposal for the use of ChatGPT in an
eLearning system.
1.1.</p>
    </sec>
    <sec id="sec-3">
      <title>Limitation of eLearning platforms</title>
      <p>E-learning platforms serve as digital arenas for the delivery of education, primarily conducted
through online channels. These platforms come in various designs, functionalities, and features,
carefully crafted to cater to a wide range of educational needs. They offer a versatile toolkit that includes
multimedia resources, assessment tools, interactive forums, and numerous pedagogical resources.
Notable examples of e-learning platforms include Moodle, Blackboard, Canvas, edX, and Coursera
[1718]. However, it's essential to acknowledge the inherent limitations that e-learning platforms encounter
[19]:
• Lack of Personal Interaction: One of the most significant constraints is the limited opportunity
for direct face-to-face interaction between educators and learners. This constraint can lead to feelings
of isolation and hinder quick feedback and clarification.
• Limited Social Interaction: Several e-learning platforms offer only modest social interaction
features, failing to recreate the collaborative atmosphere found in traditional classrooms. As a result,
students might miss out on valuable peer-to-peer interactions that enrich learning through
discussions and group activities.
• Static Content Delivery: Traditional e-learning often relies on one-way communication through
static content, such as text-based modules and pre-recorded videos. This approach can result in
passive learning experiences that may not fully engage students.
• Lack of Personalization: Providing the same content to all learners may not align with
individual learning preferences and paces. Personalized learning pathways are often limited,
potentially affecting knowledge retention.
• Inadequate Feedback Mechanisms: Timely feedback is critical for effective learning. However,
many e-learning platforms offer limited opportunities for real-time assessment and feedback, which
can impede the learning process.
• Technical Challenges: Accessing e-learning platforms requires specific technological
resources, including devices, internet connectivity, and digital proficiency. These prerequisites can
be obstacles for learners without easy access to such resources.
• Assessment Methods: Conventional assessment techniques, like multiple-choice quizzes, may
not comprehensively evaluate learners' understanding and critical thinking abilities. Such
assessments can inadvertently encourage rote memorization over deep comprehension.
• Motivation and Engagement: The absence of real-time interactions, gamification, and
handson learning opportunities may lead to reduced motivation and engagement among learners.
• Self-Discipline Requirements: E-learning platforms demand a higher degree of self-discipline
and self-motivation, which can be challenging for some learners to maintain consistently.
• Adaptation to New Technologies: To remain effective, e-learning platforms need to evolve
continually by integrating emerging technologies, such as artificial intelligence (AI) and advanced
interactivity.</p>
      <p>Acknowledging these limitations is essential to drive innovation in e-learning systems. The integration
of technologies like Chat GPT into platforms like Moodle shows promise in addressing specific
challenges, enabling more personalized, interactive, and engaging learning experiences.
1.2.</p>
    </sec>
    <sec id="sec-4">
      <title>Introduction to Chatbots and Chat GPT in education</title>
      <p>There have been several research studies focused on adapting Chat GPT models for educational
contexts. These studies have highlighted the importance of fine-tuning GPT-based models to align with
specific eLearning objectives [25]. Researchers have experimented with domain-specific training data
and have demonstrated how customized Chat GPT can enhance the relevance and coherence of
responses in educational interactions.</p>
      <p>In [21] and [22], the authors propose the adoption of the concept of Cyber-Physical-Social Systems
(CPSS), which encompasses human and social factors, to achieve efficient and effective chatbot
systems. Several studies also have investigated the impact of Chat GPT on learner engagement [23][24].</p>
      <p>Chatbots with advanced language generation capabilities, like those based on GPT, have been found
to provide more natural and interactive conversations. Learners often respond positively to human-like
interactions, leading to increased motivation and sustained engagement with the eLearning content.</p>
      <p>The concept of personalized learning has been a focal point in Chat GPT integration research [25].
These technologies have been explored as tools for creating tailored learning experiences. Chat GPT
can analyze learners' responses and preferences to deliver content that matches their individual learning
styles, effectively addressing the challenge of one-size-fits-all content delivery.</p>
      <p>Studies have also demonstrated the potential of Chat GPT in providing instant feedback and support
to learners [26-27]. Through real-time interactions, learners can receive immediate clarification on
queries, aiding in comprehension and reducing frustration. Additionally, the ability of Chat GPT to
explain complex concepts in accessible language contributes to the overall effectiveness of eLearning.</p>
      <p>In the realm of education, technological advancements have been instrumental in reshaping
traditional learning methodologies. Among these advancements, the integration of Chatbots and the
emergence of Chat GPT (Generative Pre-trained Transformer) hold immense potential to revolutionize
the way learners and educators interact with educational content. This section provides an overview of
Chatbots and Chat GPT in the context of education, highlighting their significance and applications.</p>
      <p>By leveraging Natural Language Processing (NLP) techniques, Chatbots engage in real-time
interactions with users, providing information, answering queries, and even facilitating learning
experiences. In educational settings, Chatbots act as virtual assistants, enhancing the learning process
through personalized assistance, immediate feedback, and dynamic engagement [28-30].</p>
      <p>Chat GPT, built on the GPT (Generative Pre-trained Transformer) architecture, takes the concept of
Chatbots to a higher level. It enables the generation of human-like text responses that are contextually
relevant and coherent. This advanced capability makes Chat GPT an ideal candidate for creating more
immersive and natural interactions within eLearning environments [31-33].
In education, Chat GPT can:
• Foster meaningful dialogue between learners and course materials, enhancing comprehension.
• Generate explanations for complex concepts in a manner that resonates with individual
students.
• Facilitate interactive storytelling and scenario-based learning.
• Provide a human-like conversational experience, encouraging sustained engagement.
• The significance of integrating Chatbots and Chat GPT into education lies in their potential to
address various challenges faced by traditional learning approaches. These technologies bridge the
gap between one-size-fits-all content delivery and tailored, interactive experiences. They offer
personalized learning pathways, immediate feedback, and increased accessibility to educational
resources.</p>
      <p>Applications of Chatbots and Chat GPT in education include [35]:
• Supporting students in remote learning environments by offering instant clarification.
• Enhancing engagement through gamified and interactive learning experiences.
• Assisting educators in managing administrative tasks, enabling them to focus on instruction.
• Catering to diverse learning styles and preferences through customized interactions.</p>
      <p>As education continues to evolve in the digital age, the integration of Chatbots and Chat GPT holds
promise for creating dynamic and engaging learning ecosystems. These technologies enrich
interactions, foster personalized learning journeys, and redefine the way education is accessed and
consumed. In the subsequent sections, we will delve deeper into the specific benefits and challenges
associated with implementing Chat GPT within eLearning systems, particularly in platforms like
Moodle.
1.3.</p>
    </sec>
    <sec id="sec-5">
      <title>Benefits and challenges of using Chat GPT in Moodle</title>
      <p>The integration of Chat GPT (Generative Pre-trained Transformer) into Moodle, a widely used
Learning Management System (LMS), presents a unique opportunity to enhance eLearning experiences.
This section explores the potential benefits and challenges associated with incorporating Chat GPT
within the Moodle platform.</p>
      <p>Benefits and challenges from ChatGPT and Moodle are very good given in paper [25]. The benefits
of integrating Chat GPT into Moodle are substantial. Firstly, it facilitates personalized learning
experiences, where content delivery and responses are tailored to the unique preferences and needs of
each learner. This customization ensures that students receive guidance that aligns with their individual
learning journeys, ultimately enhancing comprehension and retention. Secondly, Chat GPT's real-time
interaction capabilities provide immediate feedback and assistance within the Moodle environment.
This means that learners can seek clarification, obtain explanations, and access supplementary resources
instantly, supporting a more efficient and effective learning process. Moreover, the incorporation of
Chat GPT adds an element of engagement and motivation to Moodle. The platform becomes more
interactive, mimicking human-like conversations, which in turn boosts learners' motivation. The
perceived relatability and engagement create a more enjoyable and effective learning atmosphere.
Additionally, Chat GPT's advanced natural language understanding empowers Moodle to comprehend
a wide range of user queries and prompts. This feature makes interactions more intuitive and
userfriendly, as learners can communicate with the platform using everyday language, eliminating barriers
to effective communication. Furthermore, Moodle with Chat GPT offers 24/7 accessibility and support.
Learners can access assistance and resources at any time, which is particularly advantageous for remote
or asynchronous learners who may have varying schedules. Lastly, the adaptive learning pathways
enabled by Chat GPT enhance the learning experience. By analyzing learner interactions, Moodle can
adapt content delivery and suggest learning paths that match each student's pace, preferences, and prior
knowledge. This adaptability ensures a more personalized and effective learning journey. In summary,
integrating Chat GPT into Moodle brings numerous benefits, including personalized learning, instant
assistance, enhanced engagement, natural language understanding, accessibility, and adaptive
pathways, all contributing to an enriched eLearning experience.</p>
      <p>Integrating Chat GPT into Moodle offers substantial benefits, including personalized learning
experiences, instant feedback, enhanced engagement, natural language understanding, accessibility, and
adaptive pathways, all contributing to an enriched eLearning experience. However, this integration also
poses notable challenges. Data privacy and security concerns arise as learner interactions are potentially
stored, demanding robust measures to safeguard sensitive information. Ensuring ethical AI content
creation and addressing potential biases in training data are vital ethical challenges. Maintaining
accuracy and reliability, especially in complex subject matters, requires ongoing refinement.
Customizing Chat GPT to align with educational contexts is a complex process, balancing human-like
conversation with educational accuracy. User acceptance and comfort with AI-driven systems may be
initial hurdles. Familiarizing users with the technology and addressing their concerns is essential.
Continuous maintenance and updates are necessary to keep Chat GPT relevant and accurate amidst the
evolving AI landscape.</p>
    </sec>
    <sec id="sec-6">
      <title>2. The Moodle Learning Management System (LMS)</title>
      <p>Moodle, one of the most popular Learning Management Systems (LMS), is widely used in
educational institutions and organizations around the world. Its adoption rate has been consistently
growing due to its open-source nature, flexibility, and comprehensive features.</p>
      <p>Moodle is often used as an LMS in:
Given that the topic is novel, there is limited existing research focused on this subject. There are several
studies that have outlined the utilization of ChatGPT within the Moodle Learning Management System
(LMS). The integration of artificial intelligence (AI) technologies into learning management systems
through tangible instances was illustrated in [25]. The study offers concrete illustrations of practical use
cases along with comprehensive integration procedures. Additionally, it explores GPT-3 plugins
tailored for Moodle and incorporates illustrative JavaScript code, showcasing the incorporation of Chat
GPT within Moodle. By furnishing a valuable manual for embedding AI technology into learning
management systems, this study contributes substantively to the existing scholarly discourse. In this
paper is given potential negative ramifications of ChatGPT on learning, academic integrity,
employment, and daily life, student opinions are divided. In summation, it is deduced that ChatGPT
bears potential for educational application, though students must be cognizant of its limitations.</p>
    </sec>
    <sec id="sec-7">
      <title>3. Chat GPT: An Intelligent Virtual Assistant</title>
      <p>ChatGPT is a language model based on the transformer architecture, which has proven highly
effective in handling sequential data such as language. This architecture employs attention mechanisms
to process input data in a context-aware manner, enabling it to grasp intricate linguistic patterns and
generate coherent responses.</p>
      <p>ChatGPT also leverages self-attention mechanisms to assess the importance of different words
within a sentence in relation to each other, facilitating contextually relevant responses. Beyond its initial
training on a vast corpus of text data, ChatGPT's true capabilities emerge through fine-tuning, a process
in which it is exposed to specific prompts and responses, shaping its behavior for various tasks [38-39].</p>
      <p>The architecture of ChatGPT presents numerous opportunities for enhancing eLearning systems
Moodle like [39]:
• Conversational Learning: ChatGPT's ability to engage in dynamic conversations opens ways
for interactive learning experiences. Learners can engage in real-time discussions, seek clarification,
and receive instant feedback, mirroring personalized tutoring.
• Question-Answering: With its language comprehension capabilities, ChatGPT can serve as an
automated answering system. It can address learners' queries, provide explanations, and offer
insights, supplementing traditional course materials.
• Adaptive Learning: By analyzing learner interactions, ChatGPT can adapt content delivery
based on individual learning styles and preferences. This supports a personalized learning journey
for each student.
• Feedback Generation: ChatGPT's coherent text generation can aid in providing comprehensive
feedback on assignments and assessments. Its responses can include detailed explanations,
suggestions, and corrections.
3.1.</p>
    </sec>
    <sec id="sec-8">
      <title>Understanding the capabilities of GPT-based models</title>
      <p>GPT-based models, like Chat GPT, have introduced a transformative dimension to natural language
processing and comprehension. They possess the ability to generate human-like text, comprehend
language nuances, and work proficiently with multiple languages. These models can summarize
content, perform sentiment analysis, offer translation services, provide text completion and suggestions,
engage in conversations, and recommend content. They find applications in education as virtual tutors,
in creative writing support, research assistance, accessibility enhancements, and the automation of
repetitive tasks. Their role in improving human-machine interactions and facilitating technology's
userfriendliness is significant. Overall, comprehending the extensive capabilities of GPT-based models is
vital for leveraging their potential across diverse domains [37].
3.2.</p>
    </sec>
    <sec id="sec-9">
      <title>Applications of Chat GPT in various domains, including education</title>
      <p>Applications of Chat GPT in various domains, including but not limited to education, span a wide
spectrum of use cases. These applications harness the power of Chat GPT to provide solutions, support,
and enhancements across different fields. Chat GPT can be employed as a virtual customer support
agent, addressing inquiries and assisting customers with product or service-related questions. In content
creation, it can assist in drafting articles, reports, or creative pieces, providing valuable content
generation capabilities. In the healthcare sector [34], Chat GPT can aid in preliminary diagnosis by
answering patient queries and providing information on common health issues. Its multilingual
capabilities enable it to serve as a translation tool, facilitating communication across language barriers.
Developers can utilize Chat GPT to generate code snippets, simplifying programming tasks and
enhancing productivity. It can offer basic legal advice by providing information on legal terms,
procedures, and regulations. Researchers and data scientists can use Chat GPT to assist in data analysis
by answering queries related to data trends, statistics, and methodologies. In entertainment, it can
engage users in interactive storytelling, creating personalized narratives and interactive fiction
experiences. Beyond education, Chat GPT can aid in making digital content more accessible by
providing text-to-speech services or generating alt text for images. For authors and writers, it can serve
as a writing assistant, offering grammar suggestions, style recommendations, and creative ideas.
Travelers can benefit from Chat GPT by receiving information on destinations, travel tips, and cultural
insights. Businesses can leverage Chat GPT to gather market research data by posing questions to a
wide audience and analyzing responses. Additionally, Chat GPT can assist in content curation by
recommending articles, videos, or resources based on user preferences. These applications illustrate the
versatile and transformative potential of Chat GPT across various domains, revolutionizing how we
interact with technology and information.</p>
    </sec>
    <sec id="sec-10">
      <title>4. Integration of Chat GPT into Moodle LMS and Case study</title>
      <p>The integration of Chat GPT into the Moodle Learning Management System (LMS) signifies a
significant advancement in augmenting the eLearning experience. This section presents a
comprehensive outline of the step-by-step approach undertaken to seamlessly incorporate Chat GPT
functionalities within the Moodle platform. For the purposes of this study, a course was created in
Moodle titled "Introduction to Object-Oriented Programming." The course covers the fundamentals of
programming in the Java programming language and spans over 12 weeks. Each week includes learning
materials, PDF files, as well as homework assignments that students are required to complete.</p>
      <p>The simplest approach to incorporate the ChatGPT interface into Moodle involves the installation
of the "OpenAI Chat Block" plugin (available at https://moodle.org/plugins/block_openai_chat), which
was created and is presently managed by Bryce Yoder as shown in Figure 1. The last version of
“OpenAI Chat block” is 1.6.0 (2023031500) and can be integrated in Moodle 3.9, 3.10, 3.11, 4.0, 4.1
versions of Moodle. After successful installation within your Moodle system, this plugin empowers you
to introduce a novel block named "OpenAI Chat" into the block repository. To utilize the plugin,
acquiring an OpenAI API key is essential.</p>
      <p>The ChatGPT API (https://platform.openai.com/) itself is not free and must be payed ChatGPT Plus
subscription. When setting up the OpenAI Chat Block within your Moodle instance, it is imperative to
input a series of questions and corresponding answers into the "Source of truth" field. This process
resembles supervised training, aimed at imbuing the chatbot with knowledge specific to your LMS
environment. In this part we put questions and answers (provided in the appendix) was utilized to train
the chatbot for our elearning site. As a result, when users interact with the ChatGPT window on given
questions, the responses they receive will be tailored to the platform's context, unless otherwise
indicated. ChatGPT effortlessly fulfills the role of a translator, exhibiting a level of precision that often
surpasses conventional tools like Google Translate. Its versatility extends to comprehending and
providing responses in multiple languages, establishing it as a valuable asset for various
languagerelated tasks. In Figure 2 is presented of OpenAI Plugin integration in Moodle course.
In advanced section is given selection of Model for choosing ChatGPT. Also is given one of most
important thing - source of true.</p>
    </sec>
    <sec id="sec-11">
      <title>4.1. Source of Truth in Open ChatGPT: A Valuable Tool for Educational</title>
    </sec>
    <sec id="sec-12">
      <title>Applications</title>
      <p>Source of Truth (SoT) represents a significant and versatile component of Open ChatGPT,
particularly valuable within educational contexts. While the AI possesses impressive default
capabilities, there is a tendency for it to confidently provide incorrect information rather than declining
to answer if it doesn't know the response to a question. To mitigate this, the plugin offers a text area at
both the block instance and plugin levels, enabling teachers or administrators to input a set of questions
and answers that the AI will incorporate before generating a completion. This process enhances the AI's
likelihood of furnishing accurate information when a query aligns with the questions it has been
provided with direct answers to (Figure 3). However, if the source of truth box contains the following:
Q: What is code for packet restore?
A: packet\packet.restore.Targets
The AI will then provide the precise answer, " packet\packet.restore.Targets," when asked, " What is
code for packet restore?“ It will also offer accurate responses if the question is phrased differently.</p>
      <p>This tool finds utility in various applications, one of which is the establishment of usage limits for
ChatGPT to prevent students from relying on it excessively when completing assignments. For instance,
consider a scenario in an Object-Oriented Programming (OO Java) course where students are assigned
weekly programming tasks. To discourage overreliance on ChatGPT for solving these assignments, the
task descriptions for each week can be placed in the SoT. When students inquire about the assignment
details, ChatGPT can be instructed to respond with a consistent message: "Usage of ChatGPT for
assignment problem-solving is not permitted. Please attempt to solve the tasks independently."
4.2.</p>
    </sec>
    <sec id="sec-13">
      <title>Modifications to the Source of Truth Functionality</title>
      <p>Given the limitations encountered in the "Source of Truth" (SoT) feature, particularly in the latest
plugin version, it was imperative to make substantial adjustments to the plugin's code for research
purposes. In fact, an entire section of the code that facilitated this functionality had to be rewritten. The
implementation of the algorithm was initially executed in Python. However, due to the specific
requirements of Moodle, it necessitated a transition to PHP scripting language. This transition ensured
compatibility with Moodle's framework, allowing for a seamless integration of the modified SoT
functionality.
4.3.</p>
    </sec>
    <sec id="sec-14">
      <title>Answering specific questions about lesson materials</title>
      <p>Another intriguing use case for ChatGPT in eLearning involves providing answers to questions
specific to lessons or courses. At times, students seek information about subjects covered within a
course or wish to locate segments of a lesson containing answers to their precise queries. ChatGPT
offers a mechanism to facilitate scenarios like these, termed "Prompt training." The ChatGPT language
model can be furnished with a reference text, from which it can extract answers to a question. To employ
this technique, we can leverage the chat completions OpenAI API. The reference text is included as
part of the chat, to be completed by the OpenAI language model. However, one challenge arises from
this approach: all OpenAI models impose a limit on the number of tokens that can serve as reference
text. For the chatgpt-3.5-turbo model, this limit stands at 4096 tokens. Therefore, if we intend to have
the model address a question based on a single lesson or the entire course, we must initially devise a
method to select pertinent text from the lesson or the entirety of the course for use as a reference.</p>
      <p>This can be achieved by initially segmenting teaching materials into smaller units and subsequently
selecting suitable segments based on semantic similarity with the question. Semantic similarity searches
can be conducted using embeddings. Embeddings represent text as numerical vectors, with greater
similarity between vectors of separate texts indicating a closer semantic relationship between the two.
OpenAI offers distinct embedding models that can be employed to generate embeddings from provided
text.</p>
    </sec>
    <sec id="sec-15">
      <title>4.3.1. Implementation</title>
      <p>We have implemented a plugin for helping find the answers related to materials in a course. This
was achieved by firstly developing a method to automatically break down lesson text into smaller
chunks, each sized appropriately for the embedding’s engine (~1600 tokens). The ensuing embeddings
are generated and stored, alongside their corresponding texts, within a vector database (Redis). Plugin
adds a text block like already existing OpenAI chat block. This plugin receives user questions, generates
embeddings from them, compares these embeddings with those from pertinent courses or lessons,
chooses the top 5 most similar text chunks, and employs these chunks as reference text when utilizing
the chat completions API.</p>
    </sec>
    <sec id="sec-16">
      <title>4.3.2. Splitting a lesson file into chunks</title>
      <p>For the first iteration of the plugin, we have split the text blindly, without taking care about logical
units. This is something that can be improved upon, developing more precise ways to split files into
logical units, like paragraphs (Figure 4).</p>
    </sec>
    <sec id="sec-17">
      <title>4.3.3. Storing chunks</title>
      <p>Chunks are stored in a Redis database, that runs on the same server as Moodle. Redis is useful as it
already provides means to compare large vectors and therefore, embeddings can be queried according
to vector similarity. We save text, title, text_embedding and title_embedding in redis for each chunk.
Title here is lesson title.</p>
      <p>To store our embedding data in Redis, we first need to create a search index (Figure 5).
After that, we need to store chunks of text along with their embeddings in this index (Figure 6).
So, we pass a query parameter which would be our question, and there we first call OpenAI API to
create embedding for that query. Then we search Redis for closest matching embedding vectors, and
return texts and titles associated with them.
4.3.5 Asking questions with reference text</p>
      <p>Now that we have relevant chunks ready, we can construct the question and provide reference texts.
Here is query Message function that takes questions, and relevant chunks of reference text and creates
question ready to be sent to chat completion API (Figure 8).
In Figure 9 is given a method for constructing prompts for chat completion. Chat completion API does
provide a means to give the full context to the engine by providing previous messages in a chat that
should be completed. There we will also add a question that should not be answered by OpenAI. This
will be useful to stop students from abusing this functionality to have ChatGPT solve their assignments.</p>
      <p>After the implementation of the modified OpenAI ChatGPT Source of Truth (SoT), we defined
homework assignments as "Questions." For example, a homework assignment was defined as follows:
"Create a class named 'Rectangle.' Provide methods for calculating the perimeter and area. Implement
a method to check if the rectangle is actually a square. Provide a getter method that returns the longer
side of the rectangle. Implement a static method for comparing two rectangles based on their area.
Implement a non-static method for comparing two rectangles based on their perimeter."As a response,
it is indicated that inquiring about this question is not allowed“(Figure 10). Furthermore, Chat GPT can
recognize the text of assignments even if it is slightly modified, potentially detecting that it pertains to
homework.</p>
    </sec>
    <sec id="sec-18">
      <title>5. Conclusion</title>
      <p>The body of previous research demonstrates the growing interest in leveraging Chat GPT to
transform eLearning experiences. As we delve into the specifics of integrating Chat GPT into Moodle,
it is important to build upon these insights and contribute to the collective understanding of how
AIdriven technologies can enhance education in the digital age. In conclusion, our development efforts
have led to the creation of the "Source of Truth" (SoT) feature, which was absent in the previous version
of the plugin. Our overarching plan is to continue advancing and refining the entire module, with the
goal of providing valuable support to both students and educators within the Moodle platform.
However, it's essential to acknowledge that further comprehensive testing, especially with student
involvement, is imperative to assess the functionality's real-world viability thoroughly. Given the
relatively novel nature of our topic, an extended testing period of several months will likely be required
to identify potential challenges and areas for improvement. It is conceivable that students may attempt
to misuse the module. Nevertheless, it's worth noting that such misuse is also possible on the ChatGPT
website itself, where this version of the "Source of Truth" feature is not available. In essence, our work
represents a significant step towards enhancing the educational experience within Moodle through the
implementation of innovative features like SoT, although ongoing refinement and vigilant testing
remain essential for its successful integration. In summary, the integration of Chat GPT into Moodle
presents numerous advantages. Yet, to fully realize its potential within the Moodle LMS, we must
actively address the associated challenges, including data privacy, ethical use, accuracy, customization,
user acceptance, and ongoing maintenance. All in all, ChatGPT signifies the future, a future guided by
AI. Its utility, including its role as a translator surpassing conventional tools like Google Translate,
marks a substantial advancement. So, ChatGPT's potential reaches far beyond these capabilities. In
conclusion, the strides we are witnessing represent a substantial leap forward for humanity.</p>
    </sec>
    <sec id="sec-19">
      <title>6. Acknowledgements</title>
      <p>The work presented here was supported by the Ministry of Education, Science and Technological
Development of the Republic of Serbia ref. no. 451-03-68/2022-14/200029.</p>
    </sec>
    <sec id="sec-20">
      <title>7. References</title>
      <p>[1] Biswas, Som S. "Role of chat gpt in public health." Annals of biomedical engineering 51.5
(2023): 868-869.
[2] McGee, Robert W. "Annie Chan: Three Short Stories Written with Chat GPT." Available at</p>
      <p>SSRN 4359403 (2023).
[3] Mathew, Alex. "Is Artificial Intelligence a World Changer? A Case Study of OpenAI’s Chat</p>
      <p>GPT." Recent Progress in Science and Technology Vol. 5 (2023): 35-42.
[4] Biswas, Som S. "Potential use of chat gpt in global warming." Annals of biomedical
engineering 51.6 (2023): 1126-1127.
[5] Ali, Mohammad Javed, and Ali Djalilian. "Readership awareness series–paper 4: Chatbots and
chatgpt-ethical considerations in scientific publications." Seminars in ophthalmology. Taylor &amp;
Francis, 2023.
[6] Rudolph, Jürgen, Samson Tan, and Shannon Tan. "ChatGPT: Bullshit spewer or the end of
traditional assessments in higher education?" Journal of Applied Learning and Teaching 6.1
(2023).
[7] Liebrenz, Michael, et al. "Generating scholarly content with ChatGPT: ethical challenges for
medical publishing." The Lancet Digital Health 5.3 (2023): e105-e106.
[8] Biswas, Som. "Prospective Role of Chat GPT in the Military: According to</p>
      <p>ChatGPT." Qeios (2023).
[9] Van Dis, Eva AM, et al. "ChatGPT: five priorities for research." Nature 614.7947 (2023):
224226.
[10] Biswas, Som. "ChatGPT and the future of medical writing." Radiology 307.2 (2023): e223312.
[11] Kitamura, Felipe C. "ChatGPT is shaping the future of medical writing but still requires human
judgment." Radiology 307.2 (2023): e230171.
[12] Jiao, Wenxiang, et al. "Is ChatGPT a good translator? A preliminary study." arXiv preprint
arXiv:2301.08745 (2023).
[13] Kung, Tiffany H., et al. "Performance of ChatGPT on USMLE: Potential for AI-assisted medical
education using large language models." PLoS digital health 2.2 (2023): e0000198.
[14] Wang, Fei-Yue, et al. "What does ChatGPT say: The DAO from algorithmic intelligence to
linguistic intelligence." IEEE/CAA Journal of Automatica Sinica 10.3 (2023): 575-579.
[15] Alberts, Ian L., et al. "Large language models (LLM) and ChatGPT: what will the impact on
nuclear medicine be?." European journal of nuclear medicine and molecular imaging 50.6
(2023): 1549-1552.
[16] Tlili, Ahmed, et al. "What if the devil is my guardian angel: ChatGPT as a case study of using
chatbots in education." Smart Learning Environments 10.1 (2023): 15.
[17] Ouadoud, Mohammed, Nouha Rida, and Tarik Chafiq. "Overview of E-learning Platforms for</p>
      <p>Teaching and Learning." Int. J. Recent Contributions Eng. Sci. IT 9.1 (2021): 50-70.
[18] Hauger, David, and Mirkam Köck. "State of the Art of Adaptivity in E-Learning</p>
      <p>Platforms." LWA. 2007.
[19] Alshammari, Sultan Hammad, M. Bilal Ali, and Mohd Shafie Rosli. "LMS, CMS and LCMS:</p>
      <p>The confusion among them." Science International 30.3 (2018): 455-459.
[20] Liao, Yi, et al. "Gpt-based generation for classical chinese poetry." arXiv preprint
arXiv:1907.00151 (2019).
[21] Wang, Fei-Yue, et al. "What does ChatGPT say: The DAO from algorithmic intelligence to
linguistic intelligence." IEEE/CAA Journal of Automatica Sinica 10.3 (2023): 575-579.
[22] Ouyang, Long, et al. "Training language models to follow instructions with human feedback."</p>
      <p>Advances in Neural Information Processing Systems 35 (2022): 27730-27744.
[23] Firat, Mehmet. "How chat GPT can transform autodidactic experiences and open education."</p>
      <p>Department of Distance Education, Open Education Faculty, Anadolu Unive (2023)
[24] Lan, Duong Hoai. "Analyzing The Impact Of Chat-Gpt Usage By University Students In</p>
      <p>Vietnam." Journal of Namibian Studies: History Politics Culture 35 (2023): 1001-1015.
[25] FIRAT, Mehmet. "Integrating AI applications into learning management systems to enhance
elearning." Instructional Technology and Lifelong Learning 4.1 (2023): 1-14.
[26] Fuchs, Kevin. "Exploring the opportunities and challenges of NLP models in higher education:
is Chat GPT a blessing or a curse?." Frontiers in Education. Vol. 8. Frontiers, 2023.
[27] Tajik, Elham, and Fatemeh Tajik. "A comprehensive Examination of the potential application of
Chat GPT in Higher Education Institutions." TechRxiv. Preprint (2023): 1-10.
[28] Vashisht, Vipul, and Pankaj Dharia. "Integrating chatbot application with qlik sense business
intelligence (BI) tool using natural language processing (NLP)." Micro-Electronics and
Telecommunication Engineering: Proceedings of 3rd ICMETE 2019. Singapore: Springer
Singapore, 2020. 683-692.
[29] Anggraeni, Merry, Mohammad Syafrullah, and Hillman Akhyar Damanik. "Literation Hearing
Impairment (I-Chat Bot): Natural Language Processing (NLP) and Naïve Bayes Method." Journal
of Physics: Conference Series. Vol. 1201. No. 1. IOP Publishing, 2019.
[30] Regin, R., S. Suman Rajest, and T. Shynu. "An automated conversation system using natural
language processing (nlp) chatbot in python." Central Asian Journal of Medical and Natural
Science 3.4 (2022): 314-336.
[31] Simoulin, Antoine, and Benoit Crabbé. "Un modèle Transformer Génératif Pré-entrainé pour le_
français (Generative Pre-trained Transformer in_ (French) We introduce a French adaptation
from the well-known GPT model)." Actes de la 28e Conférence sur le Traitement Automatique
des Langues Naturelles. Volume 1: conférence principale. 2021.
[32] Haroon, Suhail, C. A. Hafsath, and A. S. Jereesh. "Generative Pre-trained Transformer (GPT)
based model with relative attention for de novo drug design." Computational Biology and
Chemistry 106 (2023): 107911.
[33] Yu, Caiyang, et al. "GPT-NAS: Neural Architecture Search with the Generative Pre-Trained</p>
      <p>Model." arXiv preprint arXiv:2305.05351 (2023).
[34] Dayawansa, Sam, Georgios Mantziaris, and Jason Sheehan. "Chat GPT versus human touch in
stereotactic radiosurgery." Journal of Neuro-Oncology (2023): 1-3.
[35] Biswas, Som. "Role of Chat GPT in Education." Available at SSRN 4369981 (2023).
[36] Shoufan, Abdulhadi. "Exploring Students’ Perceptions of CHATGPT: Thematic Analysis and</p>
      <p>Follow-Up Survey." IEEE Access (2023).
[37] Liu, Yiheng, et al. "Summary of chatgpt/gpt-4 research and perspective towards the future of
large language models." arXiv preprint arXiv:2304.01852 (2023).
[38] Raman, Raghu, et al. "University students as early adopters of ChatGPT: Innovation Diffusion</p>
      <p>Study." (2023).
[39] Yilmaz, Ramazan, and Fatma Gizem Karaoglan Yilmaz. "The effect of generative artificial
intelligence (AI)-based tool use on students' computational thinking skills, programming
selfefficacy and motivation." Computers and Education: Artificial Intelligence (2023): 100147.</p>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>