CSIC-6040-排版347-353
CSIC-6040-排版347-353
CSIC-6040-排版347-353
Volume 85 (2024)
1. Introduction
With the rapid development of computer technology, artificial intelligence has become one of the
hottest research fields at present. Among them, natural language processing is an important branch,
which studies how to enable computers and humans to communicate in a natural language way. In
traditional natural language processing, it is usually necessary to write rules for each specific task.
Thanks to the continuous development of artificial neural networks, especially the generative pre-
trained transformer (ChatGPT), we only need to input a large amount of natural language data to the
machine to let the machine learn and train the model by itself.ChatGPT is a kind of natural language
processing technology, which is based on pre-training techniques to generate human-level natural
dialog content. This approach not only reduces the workload of coding rules but also improves the
accuracy and smoothness of the conversation. Currently, ChatGPT has been widely used in many
fields and has shown promising application results. As a result, ChatGPT has attracted growing
research interest from both industry and academia.
ChatGPT can be traced back to the development of artificial intelligence. In 1936, Turing put
forward the famous "Turing test" in the 1940s and 1950s, which gave a method to judge whether the
machine has "intelligence". However, due to the low level of technology, it can only stay in a small
range of experiments. In 2012, Microsoft Corporation demonstrated a fully automatic simultaneous
interpretation system, which can automatically translate English speech into Chinese speech for
output, marking the transformation of artificial intelligence from small-scale experiments to
practicality, which is a major breakthrough. However, due to the limited algorithm, it is unable to
directly generate text content. ChatGPT was born in 2022, which made great achievements of
generative artificial intelligence (AIGC) in the field of natural language text generation and natural
language processing. With the continuous development of in-depth learning in the field of artificial
intelligence, the field of natural language processing has gradually been focused and deeply studied.
Through the self-attention mechanism, the in-depth learning and understanding of text data is realized,
and good performance has been achieved in natural language processing. ChatGPT is a pre-training
model based on transformer architecture. After four technical iterations, the current GPT-4 has been
347
Highlights in Science, Engineering and Technology CSIC 2023
Volume 85 (2024)
obtained. The sizes of the databases used for training included in the four different versions of GPT
models are also quite different. The following table compares the training data of the four models [1].
Table 1. Data comparison of quartic GPT model
Model Training parameter quantity (unit: 10 billion) Training set
GPT-1 0.12 5GB
GPT-2 1.5 40GB
GPT-3 175 45TB
GPT-4 175 45TB
Among them, GPT-2 generated in the second iteration is a major breakthrough in the field of
natural language processing and is more excellent in text generation and text classification. The
advent of ChatGPT has promoted the development of many fields: in the medical field, people can
use ChatGPT to quickly and accurately obtain the parameters of the existing literature, generate the
required model combined with other data processing languages, and then visualize the data processing
results with interactive development applications, indicating that it has great potential in drug research
and development. In education, through efficient human-computer collaboration and the generation
of more personalized learning content for students, we can improve students' learning efficiency and
reduce teachers' workload. In programming, it can generate the code needed by users in a short time
and improve the efficiency of code reproduction. However, ChatGPT still has many shortcomings,
such as the inability to dynamically update the database online, the phenomenon of mixing basic data
materials, and so on. This paper mainly analyzes the key technologies of ChatGPT and its typical
applications in the fields of medical treatment, programming and education. At the same time, this
paper will also discuss the existing performance of ChatGPT and give some prospects for its future
development.
2. Key Technology
Based on the machine deep-learning algorithm, ChatGPT uses the large language model, the code
pre-training model, the prompt technology to understand and generate the text of the GPT model, the
context-aware technology and automatic clustering technology to improve the accuracy of the answer,
and the reinforcement-learning based on human feedback (RLHF) technology to fine-tune the original
language model, until the existing ChatGPT appears.
2.1. Large language model
The so-called big language model is actually a technical architecture that captures knowledge from
a large number of labeled and unlabeled data through training, and stores knowledge in a large number
of parameters to achieve efficient processing of various tasks. ChatGPT uses a large database
containing more than 10 billion data for pre-training. The model can understand the potential
relationships and patterns between texts in the pre-training stage, greatly improving its language
expression ability and knowledge coverage, and enabling it to accurately judge and answer the daily
human language. ChatGPT uses language modeling technology to predict the probability distribution
of the next word through the given previous work, which can make it better to understand the context
and generate corresponding coherent text [2]. ChatGPT also uses a self-monitoring training method,
using unlabeled text corpus. This training method can maximize the use of a large number of
unlabeled data to achieve the optimization of the model.
2.2. Prompt
In ChatGPT, the prompt usually refers to an input text paragraph or phrase as the starting point
that guides for generating model output. rompt can be a question, a text description, a conversation
or any form of text input. The model will generate the corresponding output text based on the context
348
Highlights in Science, Engineering and Technology CSIC 2023
Volume 85 (2024)
and semantic information provided by prompt. Set the situational dialogue mode through prompt and
make different response modes for different situations.
2.3. RLHF: Reinforcement Learning based on Human Feedback
ChatGPT will first pre-train a language model and use this language model for human-computer
interaction. In the process of interaction, it will manually score and rank the preferences of the
answers it produces, and then ChatGPT will train a reward model (RM), in which the input is some
prompts and responses, and the output is a scaling value, which is called reward. Rewards can be used
as indicators; they are used to let the model learn how to output the response to maximize the reward
and fine-tune its pre-trained large language model. The specific calculation of the reward function
determined by the PPO algorithm used is as follows: input the prompt into the initial language model
and the current fine-tuning language model to get the output text respectively, pass the text from the
current strategy to the reward model to get a scalar reward, compare the generated text of the two
models, and calculate the penalty item for the difference, Finally, the language model is optimized
according to the reward index. The following Figure 1 shows the flow chart of ChatGPT using these
three key technologies.
349
Highlights in Science, Engineering and Technology CSIC 2023
Volume 85 (2024)
interact with other applications, improve the efficiency of data acquisition and code writing, and
simplify the development process.
In terms of intelligent diagnosis and treatment, ChatGPT can carry out intelligent dialogue with
patients and provide preliminary diagnosis suggestions according to patients' symptoms and medical
history. By asking patients questions and collecting relevant information, ChatGPT can help doctors
narrow the scope of diagnosis, provide possible disease prediction, and guide doctors to carry out
more detailed examination and further diagnosis. For example, before surgery, it can provide patients
with preoperative advice and information about surgery, and help patients reduce preoperative fear
[5]. The following Tabel 1 is a comparison of the response data of AI and non-AI [5]. The data shows
that the text generated by artificial intelligence not only has low similarity, but also has higher
comprehensibility, scientific sufficiency and satisfaction than the artificial answer. ChatGPT can
provide decision support for doctors by analyzing a large number of medical data and literature. It
can generate personalized treatment plans according to the patient's personal characteristics and
disease information and evaluate the risks and effects of different treatment options. This will help
doctors make more accurate diagnosis and treatment strategies.
Table 2. Comparison of AI and non-AI response data
Intelligibility Scientific adequacy Answer satisfaction
artificial intelligence 5.0-6.4 5.4-6.5 4.9-6.3
Non-artificial intelligence 4.8-5.8 5.1-6.3 4.8-5.8
3.2. Application of ChatGPT in programming field
ChatGPT can help people learn about programming. For students learning programming, ChatGPT
can help students communicate in natural language. Even for students who have no programming
foundation at the beginning, it can also speed up their learning and understanding. In one study,
researchers conducted an 8-week experiment with 41 students who participated in the experiment.
The students were asked to use ChatGPT to assist them in program learning and give feedback to the
teacher after learning. Experiments showed that students believe that ChatGPT enhances their
confidence in learning programming, can show more accurate coding, and provides opportunities to
solve complex problems [6]. Therefore, its role in assisting students in learning code can be seen.
ChatGPT also plays a great role in fixing software errors. In a study, researchers evaluated
ChatGPT on the standard error repair benchmark set of QuixBugs, and the results showed that its
repair performance was outstanding, that providing more repair information through its dialog system
could improve its performance in repairing errors [7]. ChatGPT can generate new code snippets to
meet specific needs by learning the patterns and structures in the existing code base. This can save
time and energy for developers to complete the project faster. In a case study, it applied the powerful
analysis ability of the large language model to the field of system performance optimization and found
that the memory allocation of the objective function and the test execution time were significantly
optimized [8].
3.3. Application of ChatGPT in Education
In terms of teaching assistance, ChatGPT can provide a variety of services, such as automated
testing, providing answers, explaining course materials, and so on. As shown in Figure 2, using
ChatGPT, teachers can easily provide students with answers and have a deeper understanding of
students' questions and puzzles. Students can interact with teachers through ChatGPT to get answers
quickly and improve learning efficiency. ChatGPT can also provide students with personalized
learning suggestions. It can provide corresponding teaching materials and exercises according to
students' learning progress and ability, so as to help students better master knowledge points. In
language learning, it can help students improve their language abilities such as listening, speaking,
reading and writing. It can provide real-time voice and text translation to help students understand
and learn different languages and cultures. At the same time, it can also provide oral practice to help
350
Highlights in Science, Engineering and Technology CSIC 2023
Volume 85 (2024)
students improve their oral expression ability. ChatGPT's automatic grading system can provide
students with faster and more accurate learning assessments [9] and reduce the workload of teachers.
5. Conclusion
ChatGPT is mature based on the development of a variety of technologies. It has great potential in
the fields of medical treatment, programming and education. However, it is worth mentioning that
ChatGPT still has some defects. In the future development, in order to achieve a wider application,
we can optimize the algorithm model of ChatGPT, add the emotion recognition function, integrate
multimodal technology with ChatGPT, and generate more personalized and user-emotional text after
identifying human emotions.
References
[1] Z. Jin, "analysis of the technical principles of ChatGPT and prospects for pre trained large models," 2023
IEEE 3rd International Conference on information technology, big data and artistic intelligence(ICIBA),
Chongqing, China, 2023, pp. 1755-1758, doi: 10.1109/iciba568602023.10165540
[2] A. M. J. Hashana, P. brundha, M. U. Ahmed ayoobkhan and F. s, "deep learning in ChatGPT - a survey,"
2023 7th International Conference on trends in electronics and Informatics(icoei), tiruleveli, India, 2023,
pp. 1001-1005, doi: 10.1109/icoei567652023.10125852
352
Highlights in Science, Engineering and Technology CSIC 2023
Volume 85 (2024)
[3] Palak Handa, deepti Chhabra, Nidhi goel, Sri Krishnan, exploring the role of ChatGPT in medical image
analysis, biomedical signal processing and control, Volume 86, Part C, 2023105292, ISSN 1746-8094
[4] Closesmeijer m, Janssen a, Koopman s, cnossen m, Matthew R. ChatGPT in pharmaceuticals?Potential
opportunities and limitationsAuthorea preprints. 2023. doi: 10.22541/au168235933.39569649/v1
[5] Yanhui Zhang, Haolong Pei, Shihan Zhen, Qian Li, Fengchao Liang, chat generative pre trained
transformer (ChatGPT) usage in health, Gastroenterology&Endoscopy, Volume 1, issue 32023, pages
139-143, ISSN 2949-7523
[6] Ramazan Yilmaz, Fatma gizem karaoglan Yilmaz, augmented intelligence in programming learning:
examining student views on the use of ChatGPT for programming learning, computers in human behavior:
artistic humans, Volume 1, issue 22023100005, ISSN 2949-8821
[7] D. sobania, M. Briesch, C. Hanna and J. petke, "an analysis of the automatic bug fixing performance of
ChatGPT," 2023 ieee/acm International Workshop on automated program repair (APR), Melbourne,
Australia, 2023, pp. 23-30, doi: 10.1109/apr591892023.00012
[8] W. -c Lei, L. - Y Jian, y. -w Chen and L. - D Chou, "using ChatGPT on improving program performance
with pprof and benchmark," 2023 5th International Conference on computer communication and the
Internet (ICCCI), Fujisawa, Japan, 2023, pp. 256-260, doi: 10.1109/iccci593632023.10210148
[9] Mohd javaid, abid Haleem, Ravi Pratap Singh, Shahbaz Khan, Ibrahim Haleem Khan, unlocking the
opportunities through ChatGPT tool towards ameliorating the education system, benchmark Council
transactions on benchmarks, standards and evaluations, Volume 3, issue 22023100115, ISSN 2772-4859
[10] Sukhpal Singh gill, Minxian Xu, Panos patros, Hua Ming Wu, rupinder Kaur, kamalpreet Kaur, Stephanie
Fuller, manmeet Singh, priyansh Arora, AJITH Kumar parrikad, vladi stankovski, AJITH Abraham,
southya K. Ghosh, Hanan lutfiyya, Salil s. kanhee, rami bahsoon, Omer Rana, schahram dustdar, rizos
sakellariou, Steve uhson hLig, Rajkumar Buyya, Transformative effects of ChatGPT on modern education:
emerging era of AI Chatbots, Internet of things and cyber physical systems, volume 42024, pages 19-23,
ISSN 2667-3452
353