ICTAPP-23-82-FinalVersion

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/372890276

Getting to Know ChatGPT: An Introduction to Implementation and Working

Conference Paper · August 2023

CITATIONS READS

4 6,544

6 authors, including:

Imran Uddin Noreen Fayyaz Khan


Khyber Pakhtunkhwa Agricultural University, Peshawar FATA University
9 PUBLICATIONS 80 CITATIONS 9 PUBLICATIONS 45 CITATIONS

SEE PROFILE SEE PROFILE

Iqtidar Ali
Khyber Pakhtunkhwa Agricultural University, Peshawar
17 PUBLICATIONS 97 CITATIONS

SEE PROFILE

All content following this page was uploaded by Imran Uddin on 04 August 2023.

The user has requested enhancement of the downloaded file.


Proceedings of 1st International Conference on Computing Technologies, Tools and Applications

________________________________________________________________________
Getting to Know ChatGPT: An Introduction to Implementation and Working
Abdul Sami1, Imran Uddin1,*, Noreen Fayyaz2, Muhammad Bilal3, Muhammad Shahid1 and Iqtidar Ali1
1
Institute of Computer Sciences and Information Technology (ICS/IT), The University of Agriculture Peshawar, Pakistan.
2
Department of Computer Science, FATA University, Peshawar, Pakistan.
3
Department of Computer Science, Islamia College University, Peshawar, Pakistan.
*Corresspond Author: imranuddin@aup.edu.pk

Abstract: ChatGPT is an advanced technology that uses sophisticated artificial intelligence techniques to generate natural
language responses based on a given prompt or input. It has been applied in various fields, such as customer service, content
creation, and natural language processing. This investigation and analysis of ChatGPT delve into its origins, implementation
and working, and impact on different research areas. It assesses the Pros and Cons of ChatGPT. It also explore the limitations
and how to implements its model in a custom environment. Additionally, it explores the influence of ChatGPT on cybersecurity,
customer support, health care and software development.
Keywords: ChatGPT; ChatGPT-4; Generative AI; Pre-Train Transformer; Natural Language Processing (NLP)
 Generative Pre-Trained Transformer: The Generative
I. INTRODUCTION Pre-Trained Transformer (GPT) is a machine learning
ChatGPT is based on the Generative Pre-trained model that employs a blend of supervised and
Transformer (GPT) language model, which was first unsupervised learning methodologies to comprehend and
introduced by OpenAI in 2018 [1]. The GPT model uses generate language that closely resembles human language.
unsupervised learning to generate human-like coherent and [3].
natural-sounding text. ChatGPT was developed to apply the
 Language Model: A language model is a form of artificial
GPT model to chatbot technology, providing an advanced and
intelligence model that is trained to produce text that
responsive tool for natural language processing and
mimics human language.
communication. From answering simple queries to more
complex tasks such as generating appreciation letters and  Multimodal Neurons: Multimodal neurons are units of
facilitating challenging conversations about productivity artificial neural networks that possess the capability to
issues [2], ChatGPT is capable of comprehending and comprehend and interpret the appearance of an object
analyzing user requests / queries with the vast amount of text across various modes or representations, including images,
data and with diverse inputs available, generating appropriate text, and speech. [13]. Additionally, MUlti-DialoGUE
responses that closely resembles the human language. (MUD-Dialogue) Challenge, which is an evaluation
framework for open-domain dialogue systems. The
Aside from its practical applications, ChatGPT's ability to
produce human-like language and accomplish tasks which is challenge consists of a large-scale dataset and a suite of
a major innovation in the field of NLP and AI. evaluation metrics designed to test various aspects of
dialogue system performance. The paper may be relevant
Therefore, this paper aims to provide an in-depth to the development and evaluation of chatbot systems like
exploration of the ChatGPT model, focusing potential ChatGPT.
applications, to help understand its Pros and cons and the
practical implementation of ChatGPT in an existing  Natural Language Processing: The field of Natural
environment. The key concepts related to ChatGPT are: Language Processing (NLP) encompasses utilizing
algorithms to scrutinize and comprehend human language,
 Attention Mechanism: A neural network utilizes an including text and speech, for extracting significance and
attention mechanism to enable the model to concentrate beneficial information.
solely on aspects of input data while generating
predictions. In [12] briefly discuss the use of deep learning  Neural Network: A neural network is a machine learning
techniques and the challenges and opportunities in model that consists of interconnected processing nodes,
developing effective dialogue systems. It may be relevant which are trained on data to execute specific tasks by
to the development and application of ChatGPT, as both modifying the intensity of connections between them.
aim to provide advanced and responsive tools for natural [14].
language processing and communication.  Supervised Fine-Tuning: Supervised fine-tuning refers
 Generative Model: A generative model is a category of to a machine learning method that involves training a pre-
model that can produce novel data, in contrast to merely existing model on a smaller dataset that has been labeled,
classifying or forecasting based on input data. with the objective of enhancing its performance on a
specific task. [15].

May 9–11, 2023 Institute of Computer Sciences and Information Technology (ICS/IT), The University of Agriculture Peshawar, Pakistan
274

 Transfer Learning: Transfer learning refers to the ability The main drawback is that GPT models learn from a vast
of tools such as ChatGPT to employ the knowledge dataset of text using a statistical approach that may perpetuate
obtained from one task to enhance its efficiency in another, biases and stereotypes present in the data, resulting in the
interconnected task. (Pan & Yang, 2010). generation of offensive or harmful content (Dale, 2017; Lucy
& Bamman, 2021). Moreover, GPT models lack contextual
II. LIMITATION OF THE STUDY and semantic understanding of the text they produce and do
not perform well in tasks requiring common sense or logical
This study does not have its own existing and predictive reasoning that are not covered in the training data (Strubell et
limitations since the concept of ChatGPT is very limited. The al., 2019). In addition, GPT models are computationally
resources refers are very minimum. expensive to train, necessitating large amounts of data and
 Minimum research outcome availability computational resources, making them challenging to
implement for certain organizations and individuals.
 User experience sharing is far generalized Additionally, running these algorithms and data storage
systems at OpenAI's scale consumes a significant amount of
 The experience shared are based on perceptions
energy (Zhou et al., 2021). Therefore, it is crucial to be aware
 The version of ChatGPT is in primary stage of these limitations and to employ GPT technology
responsibly.
According to Kirmani (2022), ChatGPT is an open-source
tool created by OpenAI that uses GPT language model
technology. This highly advanced chatbot can perform various
III. WORKING OF CHATGPT
text-based tasks, ranging from answering simple questions to ChatGPT employs a deep neural network structure
completing more complex tasks, such as generating thank-you comprising multiple layers of transformers, which are
letters and guiding individuals through challenging specialized in processing sequential data, primarily natural
productivity discussions (Liu et al., 2021). ChatGPT's language text, to generate human-like and coherent outputs.
extensive data stores and efficient design enable it to To train ChatGPT, a massive corpus of text data is fed into the
comprehend and interpret user requests, generating responses model to enable it to learn the patterns and associations
in nearly natural human language. This capability, combined between words, phrases, and sentences, and the model's
with its potential to generate human-like language and execute refinement is an iterative process that continues as it is
complex tasks, makes ChatGPT a significant innovation in the exposed to more data. After training, ChatGPT can be fine-
field of artificial intelligence and natural language processing. tuned for specific tasks or applications like content generation
This review paper will examine how ChatGPT operates and or language translation.
its possible impacts on different industries.
The operation of ChatGPT involves several steps. The first
The Generative Pre-Trained Transformer (GPT) is a step is for the user to enter a query or prompt into the system,
language model created by OpenAI that has the capability of which is subsequently processed by the model. The model
producing text responses that are almost identical to natural uses its comprehension of language patterns and associations
human language (Dale, 2021). The GPT technology is based to generate a response, which is then returned to the user. The
on a two-step process that involves generative, unsupervised user can further continue the conversation or present more
pretraining using unlabeled data, and discriminative, questions. This approach is wholly trained through
supervised fine-tuning to improve performance on specific reinforcement learning, with human feedback being the main
tasks (Erhan et al., 2010; Budzianowski & Vulić, 2019). In the source of improvement.
pretraining phase, the model learns in a natural way, like how
a person might learn in a new environment, while the fine-  SFT Model: In this the training of the model entails
tuning phase involves more structured refinement by the supervised fine-tuning, which involves collecting
creators (Radford et al., 2018). demonstration data to enhance its performance.

OpenAI's GPT-3 and ChatGPT, as well as other models  RM Model: The reward model evaluates the output of the
like Google's BERT, and Microsoft's XLNet, are all cutting- SFT model and allocates points based on the required /
edge language models. GPT-3 and ChatGPT are based on the desirable results to users.
GPT-3 architecture and can produce text that is almost as good  SFT Model via PPO: Reinforcement learning is employed
as human language, which makes them useful for a wide range to fine-tune the SFT model Policy by allowing it to
of natural language processing tasks like summarization, optimize the RM model, while the fine-tuned model of
language translation, and question answering. In contrast, proximal policy optimization is referred to as PPO.
BERT, RoBERTa, and XLNet primarily focus on
comprehending the meaning of text and are particularly useful
IV. PROS AND CONS
for tasks such as named entity recognition and sentiment
analysis. The primary advantage of GPT-3 and ChatGPT is A. Pros of ChatGPT
their ability to create high-quality text, while BERT,
RoBERTa, and XLNet excel in understanding and interpreting ChatGPT has the Pros of natural language generation
text. capability, which allows it to produce responses that are
similar to human language and coherent. This feature is
The GPT technology has revolutionized the field of natural especially valuable in situations where natural language is
language processing; however, it also has several limitations. important, such as in customer service oriented chatbots and

Proceedings of 1st International Conference on Computing Technologies, Tools and Applications (ICTAPP-23)
275

in language translation applications. Compared to other NLP patterns and correlation in the data on which it was trained,
models, like rule-based methods, ChatGPT can generate more the system can rapidly and accurately generate responses
human-like responses. This can result in more meaningful and [5]. As such, it is an effective solution for companies and
interesting conversations with users, leading to better user customer- oriented organizations that require auto
satisfaction and experience. customer service support or language translation services.
 Explain complex concepts: Chat GPT has the ability to
clarify complex concepts, making it an impressive feature.
To receive a brief and succinct summary of a topic, one
can easily input "explain [topic]" into Chat GPT.
 Write code: There is no doubt about it, Chat GPT is an
excellent coder. If you are struggling with a coding
problem, always ask Chat GPT for some help?
 Cost-Effective Solution: Chat GPT provides a cost-
efficient alternative as it negates the need to hire human
operators for customer services. This can lead to
substantial cost savings, particularly for businesses that
handle many customer service inquiries.
 Language Translation: Chat GPT possesses the ability to
accurately translate text between different languages,
making it a valuable tool for global communication. It can
translate text in real-time, allowing users to communicate
seamlessly and efficiently across language barriers.

VI. IMPACT OF CHATGPT


Figure 1: RHLF Training Method of ChatGPT  Cyber Security: ChatGPT has made a substantial
contribution to the realm of cyber security, as it has the
Another Pros is scalability, allowing it to handle a large
potential to identify and prevent cyber-attacks. The
number of conversations and generate responses quickly,
language model can be employed to detect phishing mails
which makes it a useful and productive tool for businesses and
by analyzing the language used in the email, thereby
organizations that require automated customer service or
distinguishing between genuine and fraudulent emails [2].
language translation services. By reducing the need for human
Similarly, ChatGPT can help detect malware by
intervention, ChatGPT can increase efficiency and save time.
scrutinizing the language used in the code to identify
Its ability to handle multiple conversations at once can also
malicious code. Additionally, ChatGPT can aid in creating
lead to faster response times and improve overall user
secure passwords, as it can generate complex and unique
satisfaction.
passwords that are challenging to predict.
B. Cons of ChatGPT
 Customer Support: ChatGPT has the potential to enhance
ChatGPT has a Cons of the possibility of response bias due customer support services by offering tailored assistance
to its training on huge datasets of text data. Inaccuracies and to customers. It can be leveraged to create virtual agents
biases within the training data can result in ChatGPT's that can deliver customized support and advice to
responses perpetuating stereotypes or discrimination. To customers. These virtual agents can be programmed to
reduce the impact of this bias, it is important to carefully select comprehend and address customer queries and concerns
and curate the training data, as well as continuously monitor effectively. Furthermore, ChatGPT can be utilized to
ChatGPT's responses to identify and correct any potential develop automated systems that can promptly identify and
biases. ChatGPT's lack of emotional intelligence can be resolve potential customer problems. For example, it can
considered another limitation. Unlike humans, ChatGPT may be used to design automated systems that can identify and
have difficulty recognizing and responding to emotional cues, address customers' issues on their behalf. This technology
such as sarcasm or humor, which can result in its responses has the potential to create intelligent customer service
being tone-deaf or insensitive. This limitation can negatively agents that can offer personalized advice and services to
impact the user experience and cause frustration. To improve customers.
its emotional intelligence, it deemed necessary to include
additional programming or training data that enables  HealthCare: ChatGPT has the potential to enhance
ChatGPT to better understand and respond to emotional cues. healthcare services by providing personalized assistance to
doctors and other healthcare professionals. It can be
utilized to develop automated systems that provide
V. WORKING ETHICS OF CHATGPT medical professionals with tailored guidance and advice
 Automated Conversation: Chat GPT enables automated [3]. For example, intelligent health systems can be created
conversations, enabling users to interact with a chatbot using ChatGPT to offer personalized medical advice based
without the need for human intervention. By leveraging on a patient's medical history. Additionally, ChatGPT can

Proceedings of 1st International Conference on Computing Technologies, Tools and Applications (ICTAPP-23)
276

be leveraged to develop systems that detect potential VIII. LIMITATION


health issues and offer timely solutions. Moreover, virtual
agents can be created to offer patients personalized health ChatGPT has some limitations that are important to
advice and support, leading to better patient outcomes. By consider.
allowing for direct interaction with patients, Chatbots have  Firstly, while it has been trained on a vast amount of text,
the potential to positively impact the healthcare sector, it may not have access to the same breadth and depth of
while also addressing privacy concerns of patients. information as a human being. As a result, it may not be
 Software Development: ChatGPT has had a significant able to provide accurate or complete information on all
impact on the field of software development by enabling topics.
developers to integrate natural language processing (NLP)  Secondly, ChatGPT lacks human-like common sense
capabilities into their applications, making them more reasoning abilities. It may struggle to understand the
interactive and user-friendly. The growing popularity of context of a sentence or differentiate between a rhetorical
conversational interfaces, such as chatbots and virtual or sarcastic question.
assistants, is an example of the increasing use of NLP-
based software [2]. ChatGPT has enabled developers to  Thirdly, ChatGPT may not be able to recognize the
create more advanced chatbots that can understand and emotional state of the user or respond in an empathetic
respond to user queries in a more human-like manner. manner. This could be a limitation in situations where
Additionally, this technology has made it easier for users require emotional support or counseling.
developers to integrate machine learning and AI  Fourthly, ChatGPT's training data may contain biases and
capabilities into their applications, thus opening up new stereotypes that could influence its responses, which could
possibilities for software development. As a result, lead to discriminatory, offensive, or inaccurate responses.
ChatGPT has revolutionized software development,
making it more intuitive, engaging, and effective. The  Lastly, ChatGPT's ability to process and generate text in
impact of ChatGPT on coding is remarkable, and it is languages other than English may be limited.
expected to replace platforms such as Stack Overflow in
assisting software developers in their daily work at IX. CONCLUSION
organizations.
In conclusion the paper has provided an in-depth
examination of ChatGPT, a highly sophisticated chatbot that
VII. HOW TO USE CHATGPT
has gained significant attention in recent months. Moreover as
ChatGPT is an AI chatbot that can provide responses to it is a groundbreaking technology that has transformed the
various types of user inquiries. The model is trained using a way we communicate with machines and each other. The
combination of machine learning techniques and human input, paper then delved into working, its pros and cons, the practical
specifically, a process known as Reinforcement Learning implementation in an existing environment. As well as the
from Human Feedback (RLHF). To make use of ChatGPT in impacts in different fields. Moreover, Thanks to its natural
the custom applications, developers are required to obtain an language processing capabilities, it can generate responses
OpenAI API key, granting them access. Here’s the step wise that are almost human-like in their accuracy and coherence.
guide for ChatGPT installation: Moreover, it is a highly flexible and efficient tool that can be
customized to suit a wide range of applications. Despite its
 Create an account in OpenAI Website. many strengths, ChatGPT does have some limitations, such as
 Then browse through the API keys page to generate a new the risk of bias, limited emotional intelligence, lack of
API key. common sense knowledge and a relatively narrow knowledge
base. However, these issues can be addressed by carefully
 Copy and save the API key safely to access the ChatGPT selecting training data and using additional programming.
model as and when needed. Overall, ChatGPT has had a significant impact on various
 For Python language coding, then install the OpenAI fields, including cyber security, customer service, Health care
Python package to access the ChatGPT model from the and software development. It has the potential to enhance
Python IDE. To get the package installed, use the productivity, efficiency, and user satisfaction in a variety of
following line code in command line: ‘pip install openai’ contexts. As ChatGPT continues to evolve and improve, we
can expect to see even more impressive outcomes in the years
 After the OpenAI package has been installed, access the Identify the Headings. We, as professionals, can work
ChatGPT model to produce an answer to any natural alongside this technology to improve our work, rather than to
language query. abuse it or allow it to abuse us in the race to create new
scholarly knowledge and educate future professionals.

REFERENCES
[1] A. Radford, K. Narasimhan, T. Salimans, and I. Sutskever, “Improving Language Understanding by Generative Pre-
Training”, Available at:
https://www.cs.ubc.ca/~amuham01/LING530/papers/radford2018improving.pdf

Proceedings of 1st International Conference on Computing Technologies, Tools and Applications (ICTAPP-23)
277

[2] J. Liu, X. Gao, X. Zhang and J. Zeng, "A Personalized Conversational AI System for Enhancing Mental Health: A Case
Study of Facilitating Challenging Conversations about Productivity Issues”, Journal of Medical Internet Research, vol.
23, no. 3, e21870, 2021.
[3] A. Agrawal, J. Gans and A. Goldfarb, “ChatGPT and How AI Disrupts Industries. Harvard Business Review”, 2022,
Available at:
https://hbr.org/2022/12/chatgpt-and how-ai-disrupts-industries
[4] Y. Altaf, “5 Ways ChatGPT Will Impact Digital Marketing. Entrepreneur”, 2023, Available at:
https://www.entrepreneur.com/growing-a-business/5- ways-chatgpt-will-impact-digital-marketing/446208
[5] S. S. Biswas, “Potential Use of Chat GPT in Global Warming”, Annals of Biomedical Engineering, vol. 51, pp. 1126-
1127, 2023.
[6] H. Else, “Abstracts Written by ChatGPT Fool Scientists”, Nature, vol. 613, no. 7944, pp. 423-423, 2023.
[7] B. D. Lund and T. Wang, “Chatting about ChatGPT: how may AI and GPT impact academia and libraries?”, Library
Hi Tech News, vol. 40, no. 3, pp. 26-29, 2023.
[8] J. Mandelaro, “How will AI Chatbots Like ChatGPT Affect Higher Education?”, News Center, 23, Available at:
https://www.rochester.edu/newscenter/chatgpt-artificialintelligence-ai-chatbots-education-551522/
[9] A. Mok and J. Zinkula, “ChatGPT may be Coming for our Jobs. Here are the 10 Roles that AI is Most Likely to Replace”,
Business Insider Africa, 2023, Available at:
https://africa.businessinsider.com/news/chatgpt-may-becoming-for-our-jobs-here-are-the-10-roles-that-ai-is most-
likely-to/grmgtk3
[10] Q. Movement and P. W. Powering, “What Is ChatGPT?”, How AI Is Transforming Multiple Industries, Forbes, 2023,
Available at:
https://www.forbes.com/sites/qai/2023/02/01/what-is-chatgpt-how-ai-is-transforming-multiple-
industries/?sh=2577dfc8728e"
[11] S. Sachdev, “ChatGPT and its Impact on Society”, The Times of India, 2023, Available at:
https://timesofindia.indiatimes.com/readersblog/marketi ng-savvy/chatgpt-and-its-impact-on-society-50445/
[12] Y. Niu, J. Wang, Y. Huang, X. Wang and H. Zhang, “A Survey on Dialogue Systems: Recent Advances and New
Frontiers”, ACM Transactions on Interactive Intelligent Systems (TiiS), vol. 11, no. 4, pp. 1-46, 2021.
[13] G. Goh, A. Singh, P. Srinivasan and S. Rajasekar, “Towards a Rigorous Evaluation of Open-Domain Dialogue Systems:
The MUlti-DialoGUE Challenge”, arXiv preprint arXiv:2106.07499, pp. 1-6, 2021.
[14] C. M. Bishop, “Mixture Density Networks”, Technical Report NCRG/4288, Neural Computing Research Group, Aston
University, 1994.
[15] J. Lee, W. Yoon, S. Kim, D. Kim, S. Kim, C. H. So and J. Kang, "BioBERT: A Pre-Trained Biomedical Language
Representation Model for Biomedical Text Mining”, Bioinformatics, vol. 36, no. 4, pp. 1234-1240, 2018.

Proceedings of 1st International Conference on Computing Technologies, Tools and Applications (ICTAPP-23)

View publication stats

You might also like