0% found this document useful (0 votes)
50 views8 pages

An AI-Driven Interactive Chatbot: A Well-Trained Chatbot That Communicates With The Users and Reduces The Manual Interaction

AI (Artificial Intelligence) - driven interactive chatbot provides easy conversation and reduces manual interaction. This study enhances the chatbot quality with custom information which helps the end-user to inquire questions that are not in build.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views8 pages

An AI-Driven Interactive Chatbot: A Well-Trained Chatbot That Communicates With The Users and Reduces The Manual Interaction

AI (Artificial Intelligence) - driven interactive chatbot provides easy conversation and reduces manual interaction. This study enhances the chatbot quality with custom information which helps the end-user to inquire questions that are not in build.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

An AI-Driven Interactive Chatbot: A Well-Trained


Chatbot that Communicates with the Users and
Reduces the Manual Interaction
Ritendu Bhattacharyya1, Sharat Chandra K. Manikonda2, Bharani Kumar Depuru3
1
Team Leader, Research and Development, Innodatatics, Hyderabad, India.
2
Vice President, Innodatatics, Hyderabad, India.
3
Director, Innodatatics, Hyderabad, India

*Corresponding Author: Bharani Kumar Depuru


ORC ID: 0009-0003-4338-8914

Abstract:- AI (Artificial Intelligence) - driven interactive I. INTRODUCTION


chatbot provides easy conversation and reduces manual
interaction. This study enhances the chatbot quality with In this realm of AI, chatbots [14] started playing a great
custom information which helps the end-user to inquire role in human life. It is an innovation that is powered by deep
questions that are not in build. Before this research learning techniques. It engages people to make casual or deep
candidates used to interact with the salesperson of the conversation. This admirable technology is now spread in
institute, but this research proposes that candidates are every domain i.e., healthcare e-commerce education, etc. All
not required to wait for the conversation with the of them use this chatting methodology to ease searching and
salesperson, they can sit with the chatbot whenever they insights. The demand for advancement in technology is
want to ask for any details about the institute. This increasing like anything chatbot is one example of the
particular solution will give a bit of relief to the advancement that specially reduces so many manual
salesperson and it will increase the number of candidates interactions and makes communication very smooth.
where they will get easy clarifications very promptly with
no time. The history of chatbots can be seen in the past. Now with
the advancement of NLP (Natural Language Processing) [1], it
This aims to provide a flexible chatting interface developed and grown immensely. The invention of the
where end-users can propose any questions and get a transformer and attention mechanism [15] is a game-changer
resolution. This will lend a hand to increase the quality of for textual or sequential data. In that sense implementation of
the admin operation and also candidates can form proper a chatbot offers a seamless interaction between humans and
decisions with crystal clear clarity. machines.

This study uses various tech stacks. The process we The era of chatbots can be seen in the past. Now with the
discussed was implemented using LLM (Large Language extreme enhancement of NLP [1] the domain of deep learning
Models) generative AI. Seamless deployment makes it easy has grown immensely. The innovative solution called
to chat and get answers within seconds. transformers is really groundbreaking in the domain of text
data execution. In that sense advancement of a chatbot offers a
Keywords:- Chatbot, Transformers, LLM, Lang chain, Prompt smooth engagement of humans and machines.
Engineering, Mistral 7B, PALM2, Flask
This research refers to the CRISP-ML(Q) [Fig.1][2]
methodology which is open source provided by 360DigiTMG.
Cross Industry Standard Practice for Machine Learning with
Quality Assurance is the full form of CRISP-ML(Q) [2].

IJISRT24FEB203 www.ijisrt.com 153


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig.1: CRISP-ML (Q) Methodological Framework, outlining its key components and steps visually. (Source:-Mind Map -
360DigiTMG)

This exploration has taken LLM (large language models) [3] into consideration. Pre-trained LLM models can only answer
whatever data it was trained on. In this research according to the business problem users are supposed to ask queries that are institutes-
specific. Also leveraging only pre-trained models if we proceed to solve the business problem, it will hallucinate [4]. To prevent the
hallucination [4] this research proposes to do cumulative training or we can use a vector store index for embedding the extra
information.

II. METHODS AND TECHNOLOGY

Table 1 System Requirements (Computer Hardware and Software) used:


Operating System Ubuntu

RAM 16 GB

Instance Type g4dn.xlarge

GPU 16 GB

A. Mode Architecture

Fig.2: Architecture Diagram: explanation of the workflow of the chatbot (Source:- https://360digitmg.com/ml-workflow)

IJISRT24FEB203 www.ijisrt.com 154


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
The architecture [Fig.2] explains the overall blueprint of Table 2 Data dimension:
the project. Popular well-known LLM framework Lang chain
Raw Questions 43
[5] was used to implement the Palm 2 [6] model debuted by
Google. Lang chain was chosen because it's easy to implement
Augmented Question 1075
and flexible. With this, so far implementation applications can
respond to the basic pre-trained knowledge.
C. Data Preprocessing:
Now according to our business problem, we prepared the Data tidying properly is the most major step while
required data, which is not trained in the Palm 2 [6] model, researching AI projects. Raw data is always very scattered.
and created PDFs. Those pdf data have been extracted and Using raw data machines can probably not understand the
embedded using the Vector Store Index [11]. These context. For that reason, data should be prepared properly.
embeddings merged into the Palm 2 [6] model. This upgraded Using Python we can play with the text data and Excel data.
model is now used for conversational improvement through For this step, the researcher should expose the inferences'
prompt engineering [12]. credibility. Deciphering the preceding data is very mandatory.
After that data should be prepared in the model-
By employing vast technology AWS and Flask, the understandable format.
entire interface deployment operation has been concluded.
AWS deployment was carried out using an EC2 instance [13]. We proceed with some preprocessing steps before giving
AWS was chosen because of its adaptability and that to the model. The entire survey about the institution is
expansiveness. listed in an Excel sheet and created the columns, questions,
and answers in the Excel sheet. Picked up each question and
B. Data Collection: answer, and created 25 variations for the same. We have
Primary data has been accumulated. Harvested material gathered 43 questions [Fig.3] from the organization. So after
for the institute named 360digitmg. It was assembled in the pushing each question to the variation of 25 questions, it
form of a question-answer format. Every possible question has resulted in 1075 questions [Fig.4], which is a decent number
been listed which can be asked by the apprentice. The to consider for the application.
document has been formatted as a survey since it will facilitate
the maximization of knowledge in the model.

Fig.3: Raw format of the data

IJISRT24FEB203 www.ijisrt.com 155


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig.4: Augmented data

This entire Excel sheet was retrieved by Python and converted into a PDF file [Fig.5]. This PDF file data arrangement is very
simple. It consists of the survey in a sequential manner.

Fig.5: PDF version of data


also 1 million human-annotated data. In llama 2 7B contains 7
D. Model Building: billion parameters. This is the model that has been tried out as
In the world of AI, we have so many LLM models the base model. Hugging face makes the implementation very
available, which can help to solve this research’s business easy, by using the pre-trained model.
problem.
 Mistral 7B:
 Llama 2: Mistral 7b [8] outdid llama 2 13b model [Fig.6] per the
Llama 2 [7] is an amazing research proposed by Meta. It research findings. Also in reference to the addition, it
has portrayed a pretty good accuracy in compare to other surpassed llama 1 34b models too. Hugging face made the
models. It has surpassed some of the benchmarks like MMLU, implementation very easy. It underwent in-depth training with
Trivia QA, Natural Questions, etc. It has gone through the instruction publicly shared dataset.
rigorous training with an enormous amount of public data and

IJISRT24FEB203 www.ijisrt.com 156


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig.6: Mistral 7B and Llama 2 comparison (Source:- https://mistral.ai/news/announcing-mistral-7b/)

 Zephyr 7B: E. Model Evaluation


Zephyr 7b [9] went through rigorous training with so All the models have been tried out. Created 10 test
many freely accessible datasets also with some synthetic questions and answers manually. Those 10 questions were fed
datasets. It’s the fine-tuned variant of Mistral 7b. Here it has to the model and responses were observed. So for evaluation,
an upper hand in the context of the knowledge. Again with the a human evaluation [10] [Fig.7] procedure has been obtained.
hugging face, it was implemented very easily. It has two As the sense of the sentence matters when we are comparing,
versions one is zephyr 7b alpha and another one is zephyr 7b that’s why the similarity score won’t work here. Manually for
beta. In this study, both have been tried out. all the models, evaluated the real answer with the predicted
answer.
 Palm 2:
Palm 2 [6] is a powerful LLM debuted by Google. It can After checking all of them, in conclusion, two models
take complicated prompts also and it won't hallucinate. It went have been selected i.e., Mistral 7B, Google Palm 2. Now to
through meticulous training. It is extremely good with narrow it down to one model, we checked the response time,
complicated code outputs mathematics problems translation where the difference was huge between these two models.
etc. Here we tried this model which resulted in very good Mistral 7B responded between 30 seconds to 60 seconds
output implementation. Using the Langchain framework it was depending on the size of the response, on the other hand,
very easy. Google Palm 2 responded between 1 second to 5 seconds
depending on the response.

IJISRT24FEB203 www.ijisrt.com 157


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165

Fig.7: Test questionnaire evaluation with model response

III. RESULTS AND DISCUSSION

After the accomplishment of the successful model, research was concluded with the API (Application Programming Interface)
deployment using Flask and AWS (Amazon Web Service). The entire website was pushed to the ec2 instance. In this research, AWS
was used because of the adjustability and the expandability of the deployment.

Fig.8: Home page: Where user can ask their doubts

Initially, it arrives at a page [Fig.8] where the user can speak with the chatbot and ask doubtful queries. The “Ask” button has to
be pressed once the question has been typed. Once the button is clicked it will reroute to a new page [Fig.9] which will consist of the
response.

Fig.9: Response page

IJISRT24FEB203 www.ijisrt.com 158


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
IV. CONCLUSION Siddhartha Brahma, Kevin Brooks, Michele Catasta,
Yong Cheng, Colin Cherry, Christopher A. Choquette-
To wrap up, our examination into the fusion of deep Choo, Aakanksha Chowdhery, Clément Crepy, Shachi
learning methodologies, exemplified by the palm2 model, for Dave, Mostafa Dehghani, Sunipa Dev, Jacob Devlin,
the development of a conversational agent tailored to Mark Díaz, Nan Du, Ethan Dyer, Vlad Feinberg,
streamline interactions between salespeople and candidates Fangxiaoyu Feng, Vlad Fienber, Markus Freitag, Xavier
marks a significant advancement in the realm of sales support Garcia, Sebastian Gehrmann, Lucas Gonzalez, Guy Gur-
technologies. The empirical evidence gathered throughout this Ari, Steven Hand, Hadi Hashemi, Le Hou, Joshua
research underscores the transformative potential of Howland, Andrea Hu, Jeffrey Hui, Jeremy Hurwitz,
leveraging advanced NLP and machine learning techniques to Michael Isard, Abe Ittycheriah, Matthew Jagielski,
enhance the effectiveness of communication channels. Wenhao Jia, Kathleen Kenealy, Maxim Krikun, Sneha
Kudugunta, Chang Lan, Katherine Lee, Benjamin Lee,
By incorporating specialized data from institutes, we Eric Li, Music Li, Wei Li, YaGuang Li, Jian Li,
have demonstrated a real and practical approach to optimize Hyeontaek Lim, Hanzhao Lin, Zhongtao Liu, Frederick
the chatbot’s performance, ensuring it matches seamlessly Liu, Marcello Maggioni, Aroma Mahendru, Joshua
with the unique requirements of the sales domain. This kind of Maynez, Vedant Misra, Maysam Moussalem, Zachary
customization alleviates the time burden on sales professionals Nado, John Nham, Eric Ni, Andrew Nystrom, Alicia
besides elevating the overall user experience, and encourages Parrish, Marie Pellat, Martin Polacek, Alex Polozov,
more meaningful activities between sales teams and potential Reiner Pope, Siyuan Qiao, Emily Reif, Bryan Richter,
candidates. Parker Riley, Alex Castro Ros, Aurko Roy, Brennan
Saeta towards: PaLM 2 Technical Report,
REFERENCES https://doi.org/10.48550/arXiv.2305.10403
[7]. Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert,
[1]. Diksha Khurana, Aditya Koli, Kiran Khatter, Sukhdev Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov,
Singh, Natural language processing: state of the art, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan
current trends and challenges, 2022, Volume 82, Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya
https://doi.org/10.1007/s11042-022-13428-4 Chen, Guillem Cucurull, David Esiobu, Jude Fernandes,
[2]. Stefan Studer, Thanh Binh Bui, Christian Drescher, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao,
Alexander Hanuschkin, Ludwig Winkler, Steven Peters Vedanuj Goswami, Naman Goyal, Anthony Hartshorn,
and Klaus-Robert Muller, Towards CRISP-ML(Q): A Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas,
Machine Learning Process Model with Quality Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem
Assurance Methodology, 2021, Volume 3, Issue 2. Korenev, Punit Singh Koura, Marie-Anne Lachaux,
https://doi.org/10.3390/make3020020 Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu,
[3]. Humza Naveed, Asad Ullah Khan, Shi Qiu, Muhammad Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar
Saqib, Saeed Anwar, Muhammad Usman, Naveed Mishra, Igor Molybog, Yixin Nie, Andrew Poulton,
Akhtar, Nick Barnes, Ajmal Mian, A Comprehensive Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan
Overview of Large Language Models, 2023, Schelten, Ruan Silva, Eric Michael Smith, Ranjan
https://arxiv.org/pdf/2307.06435.pdf Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross
[4]. Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu,
Zhangyin Feng, Haotian Wang, Qianglong Chen, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan,
Weihua Peng, Xiaocheng Feng, Bing Qin, Ting Liu, A Melanie Kambadur, Sharan Narang, Aurelien Rodriguez,
Survey on Hallucination in Large Language Models: Robert Stojnic, Sergey Edunov, Thomas Scialom
Principles, Taxonomy, Challenges, and Open Questions, towards Llama 2: Open Foundation and Fine-Tuned Chat
2023, https://doi.org/10.48550/arXiv.2311.05232 Models, 2023,
[5]. Keivalya Pandya, Mehfuza Holia, Automating Customer https://doi.org/10.48550/arXiv.2307.09288
Service using LangChain: Building custom open-source [8]. Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch,
GPT Chatbot for organizations, 2023, Chris Bamford, Devendra Singh Chaplot, Diego de las
https://doi.org/10.48550/arXiv.2310.05421 Casas, Florian Bressand, Gianna Lengyel, Guillaume
[6]. Rohan Anil, Andrew M. Dai, Orhan Firat, Melvin Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-
Johnson, Dmitry Lepikhin, Alexandre Passos, Siamak Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut
Shakeri, Emanuel Taropa, Paige Bailey, Zhifeng Chen, Lavril, Thomas Wang, Timothée Lacroix, William El
Eric Chu, Jonathan H. Clark, Laurent El Shafey, Yanping Sayed Mistral 7B, 2023,
Huang, Kathy Meier-Hellstern, Gaurav Mishra, Erica https://doi.org/10.48550/arXiv.2310.06825
Moreira, Mark Omernick, Kevin Robinson, Sebastian [9]. Lewis Tunstall, Edward Beeching, Nathan Lambert,
Ruder, Yi Tay, Kefan Xiao, Yuanzhong Xu, Yujing Nazneen Rajani, Kashif Rasul, Younes Belkada, Shengyi
Zhang, Gustavo Hernandez Abrego, Junwhan Ahn, Jacob Huang, Leandro von Werra, Clémentine Fourrier, Nathan
Austin, Paul Barham, Jan Botha, James Bradbury, Habib, Nathan Sarrazin, Omar Sanseviero, Alexander M.

IJISRT24FEB203 www.ijisrt.com 159


Volume 9, Issue 2, February – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Rush, Thomas Wolf Zephyr: Direct Distillation of LM
Alignment, 2023,
https://doi.org/10.48550/arXiv.2310.16944
[10]. Cheng-Han Chiang, Hung-yi Lee Can Large Language
Models Be an Alternative to Human Evaluations?
https://doi.org/10.48550/arXiv.2305.01937
[11]. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio
Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich
Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel,
Sebastian Riedel, Douwe Kiela Retrieval-Augmented
Generation for Knowledge-Intensive NLP Tasks, 2020,
https://doi.org/10.48550/arXiv.2005.11401
[12]. Banghao Chen, Zhaofeng Zhang, Nicolas Langrené,
Shengxin Zhu Unleashing the potential of prompt
engineering in Large Language Models: a comprehensive
review, 2023, https://doi.org/10.48550/arXiv.2310.14735
[13]. Rahul Saini, Rachna Behl An Introduction to AWS –
EC2 (Elastic Compute Cloud), 2020, Vol. 24,
http://dx.doi.org/10.15439/2020KM4
[14]. Chokri Kooli, Chatbots in Education and Research: A
Critical Examination of Ethical Implications and
Solutions, 2023, https://doi.org/10.3390/su15075614
[15]. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob
Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser,
Illia Polosukhin Attention Is All You Need, 2023,
https://doi.org/10.48550/arXiv.1706.03762

IJISRT24FEB203 www.ijisrt.com 160

You might also like