You are on page 1of 106

Making a chatbot

______________________________________________________________________________

ABSTRACT
Chatbots are computer programs that can simulate conversation with human users. They are often used in
customer service applications, where they can answer questions, provide support,and resolve issues. Chatbots can
also be used for marketing and sales, education and entertainment. ChatBot can be described as software that can
chat with people using artificial intelligence. These software are used to perform tasks such as quickly responding to
users, informing them, helping to purchase products and providing better service to customers. In this paper, we
present the general working principle and the basic concepts of artificial intelligence based chatbots and related
concepts as well as their applications in various sectors such as telecommunication, banking, health, customer call
centers and e-commerce.
Making a chatbot
INDEX
INTRODUCTION
1.INTRODUCTION
1.1 INTRODUCTION TO PROJECT

• A chatbot is a program that communicates with you.


• It is a layer on top of, or a gateway to, a service. Sometimes it is powered by machine learning (the chatbot
gets smarter the more you interact with it). Or, more commonly, it is driven using intelligent rules (i.e. if
the person says this, respond with that).
• The services a chatbot can deliver are diverse. Important life-saving health messages, to check the
weather forecast or to purchase a new pair of shoes, and anything else in between.
• The term chatbot is synonymous with text conversation but is growing quickly through voice
communication… “Alexa, what time is it?” (other voice-chatbots are available!)
• The chatbot can talk to you through different channels; such as Facebook Messenger, Siri, WeChat,
Telegram, SMS, Slack, Skype and many others.
• Consumers spend lots of time using messaging applications (more than they spend on social media).
Therefore, messaging applications are currently the most popular way companies deliver chatbot
experiences to consumers.
The development of a chatbot project requires a thorough understanding of the needs and preferences of the
target users. Developers must analyze user queries and design conversational flows that accurately respond to
their requests. Additionally, chatbots must be trained on relevant data and should be able to learn from user
feedback to improve their responses over time. A chatbot project involves developing a software application
that can communicate with users through text or voice interactions, typically online. The purpose of a chatbot
project is to simulate human conversation and provide users with relevant information or assistance with a
particular task. Chatbot projects can be used in various industries, including customer service, e-commerce,
healthcare, and education.
1.2 Existing system:
These existing systems provide a solid foundation for building chatbots, and can help speed up development by
providing pre-built modules and tools. However, it is important to note that each system has its own set of
strengths and weaknesses, and no one system is ideal for every situation. Thus, it is important to carefully
consider the requirements of your chatbot project and choose the system that best meets your needs.
There are several existing systems for chatbot projects that have already been developed and are in use by
various organizations. Here are some examples:
1.Dialogflow - A development suite provided by Google that allows developers to build chatbots for a variety of
applications, including customer service, information retrieval, and e-commerce.
2.Botpress - An open-source platform for building chatbots that includes pre-built modules for common use
cases, as well as a visual interface for designing and editing conversations.
3.Microsoft Bot Framework - A development platform provided by Microsoft that supports the development of
chatbots using a variety of programming languages and frameworks, including Node.js and C#.
4.Rasa - An open-source framework for building chatbots using machine learning and natural language
processing. It allows developers to build more interactive and personalized chatbots.
5.Amazon Lex - A platform provided by Amazon Web Services (AWS) for building conversational interfaces using
voice and text.
1.3 Proposed system:
The proposed system for a chatbot project is a modular architecture that can be adapted to different needs. The
system consists of four main components:
•Natural language processing (NLP): The NLP component is responsible for understanding the user's input. It does
this by breaking down the input into its constituent parts, such as words, phrases, and entities.
•Dialog management (DM): The DM component is responsible for managing the conversation between the user
and the chatbot. It does this by keeping track of the current state of the conversation, generating responses, and
routing requests to the appropriate components.
• Knowledge base (KB): The KB is a repository of information that the chatbot can access to generate responses.
The KB can be anything from a simple list of facts to a complex database of information.
• User interface (UI): The UI is the component that users interact with. It is responsible for displaying the chatbot's
responses and allowing users to input their requests.
The proposed system is designed to be scalable and extensible. It can be easily adapted to new needs by adding
new components or changing the existing ones. The system is also designed to be robust and reliable. It can
handle a large number of concurrent users and is able to recover from errors.
The proposed system is a powerful tool that can be used to create chatbots that are both effective and user-
friendly. It is a good choice for anyone who wants to build a chatbot for their business or organization.
• Semantic parsing: This technique converts the user's input into a semantic representation. The semantic
representation is a more abstract representation of the user's input that can be used by the other
components of the chatbot.
• Dialog management (DM): The DM component is responsible for managing the conversation between
the user and the chatbot. It does this by keeping track of the current state of the conversation,
generating responses, and routing requests to the appropriate components. The DM component uses a
variety of techniques to manage the conversation, including:
• State tracking: The DM component keeps track of the current state of the conversation. This includes
things like the current topic of conversation, the user's previous requests, and the chatbot's previous
responses.
• Response generation: The DM component generates responses to the user's requests. The responses are
generated based on the current state of the conversation and the chatbot's knowledge base.
• Request routing: The DM component routes requests to the appropriate components. For example, if the
user requests information about a product, the DM component would route the request to the product
knowledge base.
• Knowledge base (KB): The KB is a repository of information that the chatbot can access to generate
responses. The KB can be anything from a simple list of facts to a complex database of information. The
KB is typically organized into a hierarchy of topics and subtopics. For example, the KB might have a topic
for products, a subtopic for laptops, and a subtopic for Dell laptops
• User interface (UI): The UI is the component that users interact with. It is responsible for displaying the
chatbot's responses and allowing users to input their requests. The UI is typically a web-based application
that can be accessed from any device with a web browser.
• The proposed system is a powerful tool that can be used to create chatbots that are both effective and
user-friendly. It is a good choice for anyone who wants to build a chatbot for their business or organization.

Chatbot schematic diagram


System analysis
System analysis:
2.1 INTRODUCTION:
A chatbot system analysis is a process of evaluating the strengths and weaknesses of a chatbot system
in order to improve its performance. This analysis can be done by a variety of methods, including user
surveys, usability testing, and technical analysis.
The goal of a chatbot system analysis is to identify areas where the system can be improved in order
to provide a better user experience. This may include improving the chatbot's ability to understand
natural language, increasing the range of tasks that the chatbot can perform, or making the chatbot
more engaging and user-friendly.
A chatbot system analysis can be a valuable tool for improving the performance of a chatbot system.
By identifying areas where the system can be improved, businesses can create chatbots that are more
useful and effective for their customers.
Here are some of the key factors to consider when conducting a chatbot system analysis:
User experience: The chatbot's ability to understand natural language and provide helpful and
informative responses is essential for a good user experience.
Task performance: The chatbot's ability to perform the tasks that it is designed to do is also important.
This includes tasks such as answering questions, providing customer support, or making sales.
some of the benefits of conducting a chatbot system analysis:
•Improved user experience: By identifying and addressing areas where the chatbot can be improved, businesses
can create chatbots that are more user-friendly and provide a better overall experience.
•Increased efficiency: Chatbots can help businesses to automate tasks, such as answering customer questions
or providing support. This can free up employees to focus on other tasks, which can lead to increased efficiency.
•Reduced costs: Chatbots can help businesses to reduce costs by eliminating the need for human employees to
perform certain tasks. This can save businesses money on salaries, benefits, and training.
Overall, conducting a chatbot system analysis can be a valuable tool for improving the performance of a chatbot
system. By identifying areas where the system can be improved, businesses can create chatbots that are more
useful, effective, and efficient.

2.2 Study of System


Modules used:
• Natural language processing (NLP)
• Dialog management
• User interface (UI)
• Knowledge base
• Machine learning
• Sentiment analysis
• Text generation
System analysis tools:
There are a number of system tools that can be used to create and manage chatbots. Some of the most
popular tools include:
Google Dialogflow: Dialogflow is a natural language processing (NLP) platform that helps you build
conversational interfaces for websites, mobile apps, and other devices. Dialogflow uses machine learning to
understand the meaning of user input and generate natural-sounding responses. y system tools that can be
used to create and manage chatbots. The best tool for you will depend on your specific needs and
requirements.
In addition to these system tools, there are a number of other resources that can be helpful when creating and
managing chatbots. These resources include:
Chatbot tutorials: There are a number of tutorials available online that can teach you how to build chatbots.
These tutorials can be a great way to get started with chatbot development.
Chatbot communities: There are a number of online communities where you can connect with other chatbot
developers. These communities can be a great resource for getting help and advice.
Chatbot conferences: There are a number of conferences that are held each year that focus on chatbots. These
conferences can be a great way to learn about the latest trends in chatbot development.
2.3 Hardware and software requirements:
Hardware requirements:
The hardware requirements for a chatbot will vary depending on the size and complexity of the bot, as well as
the number of users that will be interacting with it. However, some general hardware requirements include:
A computer with a powerful processor and a lot of RAM
A large hard drive or solid-state drive for storing data
A good internet connection
In addition to these general requirements, some chatbots may also require specific hardware, such as a
webcam or microphone. For example, a chatbot that is designed to help customers with technical support
may need a webcam so that it can see the customer's computer screen.
Processor : 2.4 GHz
RAM : 4 GB
Free disk space: 2 GB
Software requirements :
you will also need to consider the software requirements for your chatbot. This will include the chatbot platform itself,
as well as any additional software that you need to install, such as a natural language processing (NLP) engine.
The software requirements for a chatbot will also vary depending on the platform that you choose. For example,
Dialogflow requires the Google Cloud Platform, while IBM Watson Assistant requires the IBM Cloud Platform.
Once you have chosen a chatbot platform and determined the hardware and software requirements, you can start
building your chatbot. There are many resources available to help you with this process, including online tutorials and
books.
Natural language processing (NLP) engine: An NLP engine is used to understand the meaning of human language. This is
essential for a chatbot that is designed to have conversations with humans.
Dialog management system: A dialog management system is used to control the flow of conversation between a chatbot
and a human. This includes things like determining which utterances are relevant to the current conversation, generating
responses, and handling errors.
Knowledge base: A knowledge base is used to store information that the chatbot can access and use to answer
questions. This could include things like product information, customer support information, or company policies.
Web server: A web server is used to host the chatbot so that it can be accessed by users over the internet.
Database: A database is used to store data for the chatbot, such as the user's conversation history, the chatbot's
knowledge base, and the chatbot's settings
2.3 PROPOSED SYSTEM:
A. Context Identification:
Pre-processing is applied to the input text to standardize the input as per the system’s
requirement. Based on the keywords used in the text, appropriate context is recognized.
B. Personal Query Response System (Module-1): Upon receiving personal queries like CGPA, attendance, etc., the
authenticity of the user is checked through user-id and password. If the user detail is invalid, an appropriate
response is sent. If the user authenticates successfully, the input text is processed to extract keywords. Based on
the keywords, information required by the user is understood and the information is provided from the database.
C. AIML Response System (Module-2): If the user is trying to make a normal conversation with the bot, the input is
mapped to an appropriate pattern in Artificial Intelligence Modeling Language (AIML) files. If the response is
available, it is sent to the user. Other data provided to the chatbot such as username, gender, etc. are also saved. If
the pattern is not available in AIML files, a random response is sent suggesting “Invalid Input”.
D. Query Analysis and Response System (Module-3): When a user wants some information pertaining to college,
the response will be provided through this module. If the input matches a pattern in the AIML files, the appropriate
response will be sent to the user. If the AIML files have no entry for that particular query pattern, keywords are
fetched from the input. An algorithm to check sentence similarity (NLP) is applied to the modified input to check its
similarity with the questions of a predefined question-set, whose answers are available.
Architecture:
The architecture of a chatbot can vary depending on the specific needs of the chatbot. However, there are some common components
that are found in most chatbot architectures.
•User interface: The user interface is the part of the chatbot that users interact with. This could be a web page, a mobile app, or even a
chatbot that is integrated into another application.
•Natural language processing (NLP) engine: The NLP engine is used to understand the meaning of human language. This is essential for a
chatbot that is designed to have conversations with humans.
•Dialog management system: The dialog management system is used to control the flow of conversation between a chatbot and a
human. This includes things like determining which utterances are relevant to the current conversation, generating responses, and
handling errors.
•Knowledge base: The knowledge base is used to store information that the chatbot can access and use to answer questions. This could
include things like product information, customer support information, or company policies.
•Web server: The web server is used to host the chatbot so that it can be accessed by users over the internet.
•Database: The database is used to store data for the chatbot, such as the user's conversation history, the chatbot's knowledge base,
and the chatbot's settings.
In addition to these common components, some chatbots may also include additional features, such as:
•Machine learning: Machine learning can be used to improve the performance of a chatbot over time. For example, a chatbot that uses
machine learning can learn to identify patterns in user input and generate more accurate responses.
•.
•Sentiment analysis: Sentiment analysis can be used to understand the emotional tone of a user's input. This
can be helpful for chatbots that are designed to provide customer support or that are used in marketing
campaigns.
•Text generation: Text generation can be used to create new text, such as blog posts, articles, or even poems.
This can be helpful for chatbots that are used in creative writing applications or that are used to generate
marketing content.
The architecture of a chatbot can be complex, but it is important to design a chatbot that is well-suited to the
specific needs of the users. By carefully considering the needs of the users and the capabilities of the available
technologies, you can create a chatbot that is both effective and engaging

ANALYZING ARCHITECTURE:
Choosing an architecture for a chatbot, it is important to consider the following factors:
•Purpose of the chatbot: What is the purpose of the chatbot? Is it to provide customer service, answer
questions, or sell products?
•Target audience: Who is the target audience for the chatbot? What are their needs and expectations?
•Budget: How much money is available to develop and maintain the chatbot?
Once these factors have been considered, it is possible to choose the best architecture for the chatbot.
In addition to the architecture, there are a number of other factors that should be considered when
developing a chatbot, such as:
.

• Natural language processing (NLP): NLP is the ability of a computer to understand human language.
NLP is essential for chatbots, as they need to be able to understand the user's input in order to respond
appropriately
• Dialog management: Dialog management is the process of controlling the flow of conversation between the
user and the chatbot. Dialog management is responsible for things like determining which chatbot response is most
appropriate, and for keeping the conversation on track.
• User interface (UI): The UI is the way that the user interacts with the chatbot. The UI should be easy to use and
understand, and it should be designed to meet the needs of the target audience.
By considering all of these factors, it is possible to develop a chatbot that is effective and meets the needs of the
target audience. An architecture of Chatbot requires a candidate response generator and response selector to give
the response to the user’s queries through text, images, and voice.
A general model:

A general model for chatbots can be divided into three main components:
Natural language processing (NLP): NLP is the ability of a computer to understand human language. This is
essential for chatbots, as they need to be able to understand the user's input in order to respond appropriately.
Dialog management: Dialog management is the process of controlling the flow of conversation between the
user and the chatbot. Dialog management is responsible for things like determining which chatbot response is
most appropriate, and for keeping the conversation on track.
User interface (UI): The UI is the way that the user interacts with the chatbot. The UI should be easy to use and
understand, and it should be designed to meet the needs of the target audience. Here is a more detailed
overview of each component:
Natural language processing (NLP)
NLP is a complex field of computer science that deals with the interaction between computers and human
(natural) languages. NLP techniques are used in a wide variety of applications, including chatbots, machine
translation, and text analysis.
The goal of NLP is to enable computers to understand and process human language in a way that is similar to
how humans do. This includes the ability to:
Understand the meaning of words and phrases: NLP systems need to be able to understand the meaning of
words and phrases in order to interpret the user's input.
Identify the structure of sentences: NLP systems need to be able to identify the structure of sentences in order to
understand the relationships between words and phrases.
Generate natural language text: NLP systems need to be able to generate natural language text in order to respond
to the user's input.
There are a number of different NLP techniques that can be used for chatbots. Some of the most common
techniques include:
Part-of-speech tagging: Part-of-speech tagging is the process of assigning a part-of-speech tag to each word in a
sentence. Part-of-speech tags provide information about the grammatical function of each word, which can be
used to understand the meaning of the sentence.
Named entity recognition: Named entity recognition is the process of identifying named entities in a text. Named
entities include things like people, places, organizations, and products. Named entity recognition can be used to
provide context for the user's input, which can help the chatbot to generate more relevant responses.
• Coreference resolution: Coreference resolution is the process of identifying words or phrases that refer to the
same entity. Coreference resolution can be used to track the identity of entities throughout a conversation,
which can help the chatbot to keep track of the conversation and generate more coherent responses.
• Determining which chatbot response is most appropriate: Dialog management needs to be able to determine
which chatbot response is most appropriate for the user's input. This can be a complex task, as it involves
taking into account a number of factors, such as the user's intent, the context of the conversation, and the
chatbot's knowledge base.
User interface (UI):
The UI is the way that the user interacts with the chatbot. The UI should be easy to use and understand, and it
should be designed to meet the needs of the target audience.
Some of the key factors to consider when designing a chatbot UI include:
•Clarity: The UI should be clear and easy to understand. The user should be able to easily figure out how to use
the chatbot and what they can do with it.
•Simplicity: The UI should be simple and easy to use. The user should not have to spend a lot of time trying to
figure out how to use the chatbot.
•Consistency: The UI should be consistent throughout. The user should be able to use the chatbot in the same
way, regardless of where they are in the conversation.
•Responsiveness: The UI should be responsive. The user should not have to wait a long time for the chatbot to
respond.
By considering all of these factors, it is possible to develop a chatbot UI that is effective and meets the needs
of the target audience.
Advantages:
Chatbots offer a number of advantages over traditional customer service channels, such as phone
calls and email. Some of the key advantages of chatbots include:
24/7 availability: Chatbots are available 24 hours a day, 7 days a week, which can be helpful for businesses
that need to provide customer support outside of traditional business hours.
Cost-effectiveness: Chatbots can be a cost-effective way to provide customer service, as they can replace the need
for human customer service representatives.
Improved efficiency: Chatbots can help to improve customer service efficiency by automating common tasks, such
as answering frequently asked questions.
Increased customer satisfaction: Chatbots can help to increase customer satisfaction by providing a more
convenient and personalized customer experience.
Improved data collection: Chatbots can collect data about customer interactions, which can be used to improve
products and services.
Overall, chatbots can offer a number of advantages for businesses that are looking to improve their customer
service. However, it is important to note that chatbots are not a replacement for human customer service
representatives. Chatbots can be a valuable tool for businesses, but they should not be used to replace the human
touch.
Answering frequently asked questions: Chatbots can be used to answer frequently asked questions (FAQs) about
products, services, and policies. This can free up human customer service representatives to handle more complex
issues.
Providing support for self-service tasks: Chatbots can be used to provide support for self-service tasks, such as
resetting passwords and tracking orders. This can help customers to resolve issues quickly and easily without
having to wait for a human representative to respond.
Providing personalized recommendations: Chatbots can be used to provide personalized recommendations to
customers based on their past purchases and browsing history.
Feasibility report
3. FEASIBILITY REPORT
Preliminary investigation examine project feasibility, the likelihood the system will be useful to the organization.
The main objective of the feasibility study is to test the Technical, Operational and Economical feasibility for
adding new modules and debugging old running system. All system is feasible if they are unlimited resources and
infinite time. There are aspects in the feasibility study portion of the preliminary investigation:

Technical Feasibility

Operational Feasibility

Economical Feasibility

3.1 TECHNICAL FEASIBILITY:


The technical issue usually mised during the feasibility stage of the investigation includes the
following:
➢ Does the necessary technology exist to do what is suggested?
➢ Do the proposed equipment's have the technical capacity to hold the data required to use the new system?
➢ Will the proposed system provide adequate response to inquiries, regardless of the number or location of
users?
➢ Can the system be upgraded if developed?
➢ Are there technical guarantees of accuracy, reliability, case of access and data security?
Earlier no system existed to cater to the needs of 'Secure Infrastructure
Implementation System'.
The current system developed is technically feasible. It is a web based user interface for audit workflow at
NIC-CSD. Thus it provides an easy access to the users. The database's purpose is to create, establish and
maintain a workflow among various entities in order to facilitate all concerned users in their various
capacities or roles. Permission to the users would be granted based on the roles specified. Therefore, it
provides the technical guarantee of accuracy, reliability and security. The software and hard requirements for
the development of this project are not many and are already available in-house at NIC or are available as
free as open source.

3.2 OPERATIONAL FEASIBILITY

Proposed projects are beneficial only if they can be turned out into information system. That will meet the
organization's operating requirements, Operational feasibility aspects of the project are to be taken as an
important part of the project implementation. Some of the important issues raised are to test the
operational feasibility of a project includes the following:
➢ Is there sufficient support for the management from the users?

➢ Will the system be used and work properly if it is being developed and implemented?

➢ Will there be any resistance from the user that will undermine the posuble application
benefits?
This system is targeted to be in accordance with the above-mentioned issues. Beforehand,
the management issues and user requirements have been taken into consideration. So
there is no question of resistance from the tiers that can undermine the possible application
benefits.
The well-planned design would ensure the optimal utilization of the computer resources
and would help in the improvement of performance status.

3.3 ECONOMICAL FEASIBILITY


➢ A system can be developed technically and that will be used if installed must still be a
good investment for the organization. In the economic feasibility, the development cost
in creating the system is evaluated against the ultimate benefit derived from the new
systems. Financial benefits must equal or exceed the coast.

➢ The system is economically feasible. It does not require any addition hardware or
software. Since the interface for this system is developed using the existing resources
Software requirements specifications
4.SOFTWARE REQUIREMENT SPECIFICATION
To create a software requirements specification (SRS) for a chatbot, you'll need to define the
functional and non-functional requirements of the system. Here are some key elements to consider
when documenting the SRS for a chatbot:
Introduction:
Provide an overview of the chatbot project.
Define the purpose and goals of the chatbot.
Specify the target audience or user base.

1.User Interface Requirements:


1. Describe the user interface elements of the chatbot, including text-based or voice-based interactions.
2. Specify any requirements related to the chatbot's appearance, such as branding or visual design
elements.
2.Natural Language Processing (NLP) Requirements:
1. Define the language(s) the chatbot should support.
2. Specify any specific language processing capabilities required, such as entity recognition, sentiment
analysis, or intent detection.
3. Outline any requirements related to multilingual support if applicable.
• 4.1 Functional Requirements:
• Describe the chatbot's core functionalities, such as handling user queries, providing information, or
performing specific tasks.
• Specify any integration requirements with external systems or APIs.
• Outline any specific conversational flows or dialogues the chatbot should support.
• Define any user authentication or authorization mechanisms if required.
• The chatbot must be able to understand and process natural language input from users. This includes
understanding the intent of the user's request, as well as the meaning of the words and phrases used.
• The chatbot must be able to learn and improve over time. This means that it must be able to identify
patterns in user behavior and use this information to improve its responses.
• The chatbot must be trained on a large dataset of text and code. This dataset will provide the chatbot with
the knowledge it needs to understand and respond to user requests.
• The chatbot must have a user-friendly UI that makes it easy for users to interact with it. The UI should be
designed to be intuitive and easy to use, even for users who are not familiar with chatbots.
• The chatbot must be able to integrate with other systems and applications. This will allow it to access and
process data from other sources, such as customer relationship management (CRM) systems and product
databases.
4.2 Performance Requirements:
• Specify the expected response time for the chatbot.
• Define any scalability requirements to handle increasing user load.
• Identify any constraints related to system resources or hardware limitations.
The performance requirements for a chatbot are as follows:
➢ Response time: The chatbot must be able to respond to user requests in a timely manner. The response time
should be no more than a few seconds.
The response time for a chatbot depends on a number of factors, including the complexity of the user's request,
the chatbot's training data, and the chatbot's processing power. In general, chatbots can respond in a matter of
seconds to simple requests, but may take a few minutes to respond to more complex requests. the response time
of a chatbot is constantly being improved. As chatbots become more sophisticated, they will be able to respond to
user requests more quickly and accurately.
➢ Accuracy: The chatbot must be able to accurately understand and respond to user requests. The accuracy rate
should be at least 90%. Accuracy is an important metric for chatbots, as it measures the percentage of time
that the chatbot correctly understands and responds to a user's query. There are a number of factors that can
affect the accuracy of a chatbot, including the quality of the training data, the complexity of the chatbot's
language model, and the way that the chatbot is designed to handle ambiguous or incomplete queries.
The training data used to train a chatbot should be as representative of the real-world queries that
the chatbot will be expected to handle as possible. A complex language model can better understand the nuances
of human language and respond more accurately to a wider range of queries.
➢ Engagement: The chatbot must be able to engage users and keep them interested in the conversation. The
chatbot should be able to use natural language and humor to keep users engaged. Chatbot engagement is a
measure of how well a chatbot is able to hold a user's attention and interest. There are a number of factors that
can affect chatbot engagement, including the chatbot's personality, the chatbot's ability to understand and
respond to user queries, and the chatbot's ability to provide value to the user.
Users are more likely to engage with a chatbot that they feel like they can relate to. The chatbot should
have a personality that is consistent with the brand or company that it represents. The chatbot should be easy to
understand and use. The user should be able to easily enter their query and receive a response. The chatbot should
be able to provide the user with the information or assistance that they need. The chatbot should be able to
answer questions, provide instructions, and complete tasks.
➢ Scalability: The chatbot must be able to scale to meet the needs of a growing user base. The chatbot should be
able to handle a large number of concurrent users without slowing down.
Scalability is the ability of a chatbot to handle increasing traffic and demand. There are a number of factors that
can affect the scalability of a chatbot, including the chatbot's architecture, the chatbot's language model, and
the chatbot's infrastructure. A scalable architecture can handle increasing traffic and demand without breaking
down. There are a number of different scalable architectures that can be used for chatbots, such as the
microservices architecture and the serverless architecture.
A large language model can better understand the nuances of human language and respond more
accurately to a wider range of queries. There are a number of different large language models that can be used for
chatbots, such as GPT-3 and LaMDA. A scalable infrastructure can handle increasing traffic and demand without
breaking down. There are a number of different scalable infrastructures that can be used for chatbots, such as
cloud computing and edge computing.
Chatbot Process Flow Diagram:
Wondering what the chatbot process flow diagram is all about? Well, you're certainly in the right place. While
chatbots seem all that great in terms of engaging the visitor on your site, it ain't that simple.
The seamless development of thoughts and responses in a conversation is known as conversation flow. A natural
exchange of invitation and inspiration to talk takes place, resulting in a pleasant and relaxing experience.
Writing a flowable script is a crucial component of the design process for a chatbot. People are accustomed to
digital assistants like Siri and Alexa conversing in a sophisticated manner, and consumer polls suggest that they
anticipate bots to have human-level conversational qualities, from intellect to humor.
You don't want your chatbot to give your company a bad first impression, thus you don't want it to be inept. If
your bot talks and performs effectively, it can relieve your agents' workload while also promoting a positive brand
image.
Following a proper chatbot process flow diagram can really make a difference with the little bot you have to
represent your business. So, without further ado, here are 7 tips to make the most out of your chatbot with a
chatbot process flow.
Putting conversational user interface into context
Conversational interfaces have gradually made their way into our daily lives. When you call your bank, the
automated voice assistant instructs you to use phrases rather than the dial pad to make requests. We talk to Alexa
as if she were a genuine person in our house. "You've got mail," we've come a long way.
As a result, no one has time for chatbots that aren't up to par. Because conversational UI raises the bar for
intelligence, scripts must be carefully written.
Writing for conversational UI isn't easy; it needs a lot of imagination and forethought. Mariana Lin, Siri's writer,
and creative director likened it to writing for a surrealist play. You'll make a character with objectives, but you'll
have no idea what the other characters will do.
Make a decision about the chatbot's purpose.
➢ Determine the aim of your chatbot as the first stage in developing your conversational flow. That's true, just
because your chatbot isn't human doesn't mean it won't be questioned about its duties.
➢ What does it make a living doing? Is your chatbot similar to a Walmart greeter in terms of assisting customers
with their purchases?
➢ What will your target audience do with it? Quick activities like tracking the status of a shipment or long-term
goals like fitness tracking?
➢ How much work will it entail? Will it send users reminders on a regular basis or pop up every now and then to
congratulate them on reaching a goal? Or is it more of a hit-and-run situation, like checking the weather or
game stats?
➢ Make a fictitious CV for your chatbot. Make a list of its responsibilities and abilities. Concentrate on its
advantages.
Create a persona for your chatbot.
Create a backstory for your chatbot before you start crafting your screenplay. This is a strategy that is commonly
employed in fiction writing, but it will give your bot more authenticity and help you develop its voice.
For example, if you were assigned to write a tale about a girl in a creative writing class, you could be at a loss for
words. You might have an easier time envisioning what the girl looks like, sounds like, and feels like if you were told
she's fifteen and going through her first breakup.
The character of your chatbot will aid you in determining the tone, writing style, maturity, and politeness with
which you will write. It doesn't have to be interesting; your chatbot may just be a cheery bank teller or a hipster
beer snob.
Structure the conversation flow:
Replies in messaging are brief. Chatbots that are poorly written transmit walls of text with an
overflow of information, but this is not how genuine discussions function. In general, chatbot responses should be
succinct and to the point. It's best explained by John Mayer.
To stay organized and make brainstorming simpler, write your script in chunks. Making a conversation diagram is a
simple way to accomplish this.
Conversations include elements, and a diagram will aid you in mapping out every possible response from your
chatbot. In a chatbot discussion, you can employ the following elements:
•Greeting
•Asking
•Informing
•Checking
•Error
•Apologizing
•Suggesting
•Conclusion
Create a flow chart outline using your preferred sketching tools and a discussion type in mind. Create a
greeting or two, probable user reactions, chatbot responses, and so on using simple boxes and arrows. If you have
live chat, you can search your transcripts for frequently requested questions that your chatbot can respond to.
Begin with the Chatbot Process Flow Diagram
You can begin crafting discussion situations now that you have a structure to work with. Depending on the objective
of your bot, you may need to write a lot of them.
The key is to keep messages short, which is why the schematic boxes are used. When creating your script, pretend
you're messaging someone in real-time. Put yourself in the shoes of the user and let go of your curse of knowledge.
It's also crucial to consider the tempo. Even if you can't draw pauses, keep them in mind
while you write your elements. A therapy bot's discussion may be slower than a traffic reporting bot's.It may take
some time to write and fine-tune your discussion flow. Don't worry about getting it perfect the first time; just jot
down everything your chatbot might say and decide whether or not to use it later.
Chatbot Process Flow Diagram: Final Thoughts
Investing in a bot that conveys messages regarding your brand actually makes an effort
to be more “human” with words can make a real difference. Following a proper chatbot process flow diagram will
certainly help in connecting with the visitor and foster strong conversions.
Need help? Distinguished.io has a list of the best chatbot development companies in the world. Visit our site and
hire a professional chatbot development firm with ease!
It may appear like ending a chatbot interaction is a waste of time. Users may be tempted to skip the niceties and
simply close the page because they aren't speaking to a real person.
SELECTED SOFTWARE
5.SELECTED SOFTWARE
5.1 INTRODUCTION TO Google Dialogflow
Dialogflow is a natural language understanding platform that makes it easy to design and
integrate a conversational user interface into your mobile app, web application, device, bot, etc.
Dialogflow can analyze multiple types of input from your customers, including text or audio inputs (like
from a phone or voice recording). It can also respond to your customers either through text or with
synthetic speech.
Dialogflow is a powerful tool that can be used to create a variety of conversational experiences, including:
Chatbots that can answer customer questions, provide support, or sell products.
Virtual assistants that can help users with tasks such as setting alarms, playing music, or controlling smart
home devices.
Interactive voice response systems (IVRs) that can be used to automate customer service calls.
To get started with Dialogflow, you'll need to create an account and create an agent. An agent is a
collection of intents, entities, and responses that define how Dialogflow will interact with your users.
Once you've created an agent, you can start adding intents. Intents are the building blocks of Dialogflow.
They define what your bot can do and how it can respond to user input.
For example, you might create an intent for "order food". This intent would define the different ways that
a user can order food, such as "I'd like to order a pizza" or "Can I get a burger?".
Once you've created some intents, you can start adding entities. Entities are used to represent specific types of data, such as
names, addresses, or products.
For example, you might create an entity for "product". This entity would define the different types of products that your bot
can sell, such as "pizza" or "burger".
Finally, you can start adding responses. Responses are the text or speech that your bot will use to respond to user input.
For example,
you might create a response for the "order food" intent. This response might say "What would you like to order?".
Once you've added some intents, entities, and responses, you can start testing your bot. You can do this by using the
Dialogflow console or by using the Dialogflow API.

Once you're happy with your bot, you can deploy it to production. Dialogflow provides a variety of deployment options,
including:
• Hosting your bot on Google Cloud Platform.
• Integrating your bot with your existing website or app.
• Making your bot available through a public API.
Dialogflow is a powerful tool that can be used to create a variety of conversational experiences. If you're looking to create a
chatbot or virtual assistant, Dialogflow is a great place to start.
Diagram of the chatbot application on Google Cloud:
DIALOGFLOW FEATURES

Dialogflow is a natural language understanding platform that makes it easy to design and integrate a
conversational user interface into your mobile app, web application, device, bot, etc. Dialogflow can analyze
multiple types of input from your customers, including text or audio inputs (like from a phone or voice
recording). It can also respond to your customers either through text or with synthetic speech.
Dialogflow has a number of features that make it a powerful tool for creating conversational experiences,
including:
Natural language understanding: Dialogflow uses Google's advanced natural language understanding technology
to understand the intent of user input. This means that your bot can understand a wide range of natural
language queries, even if they are not perfectly phrased.
Intents: Intents are the building blocks of Dialogflow. They define what your bot can do and how it can respond
to user input. For example, you might create an intent for "order food". This intent would define the different
ways that a user can order food, such as "I'd like to order a pizza" or "Can I get a burger?".
Entities: Entities are used to represent specific types of data, such as names, addresses, or products. For
example, you might create an entity for "product". This entity would define the different types of products that
your bot can sell, such as "pizza" or "burger".
Responses: Responses are the text or speech that your bot will use to respond to user input. For example, you
might create a response for the "order food" intent. This response might say "What would you like to order?".
Training data: Dialogflow uses training data to learn how to respond to user input. This training data can be in
the form of text conversations, audio recordings, or a combination of both.
Debugging tools: Dialogflow provides a number of debugging tools that can help you troubleshoot problems
with your bot. These tools include a conversation log, a natural language analysis tool, and a speech
recognition tool.

User
user_id (PK) (PK)

Message | +-------------------+ | message_id (PK) | | user_id (FK)


| | content | | timestamp

Response | +-------------------+ | response_id (PK) | | message_id


(FK) | | content | | timestamp | +-------------------+
Dialogflow is a powerful tool that can be used to create a variety of conversational experiences. If you're looking
to create a chatbot or virtual assistant, Dialogflow is a great place to start.
Here are some of the key features of Dialogflow's framework:
•Flexible architecture: Dialogflow is built on a flexible architecture that allows you to create chatbots that fit your
specific needs.
•Easy to use: Dialogflow is easy to use, even if you don't have any coding experience.
•Powerful natural language understanding: Dialogflow uses Google's advanced natural language understanding
technology to understand the intent of user input.
•Wide range of integrations: Dialogflow integrates with a wide range of third-party services, making it easy to
extend the capabilities of your chatbot.
•Affordable pricing: Dialogflow is affordable for businesses of all sizes.
If you're looking for a powerful and easy-to-use chatbot platform, Dialogflow is a great option.
Dialogflow Architecture:
The Dialogflow architecture for chatbots is a three-tier architecture that consists of the following components:
Front-end: The front-end is the user interface that users interact with. The front-end can be a web application, a
mobile application, or a voice-activated device.
Dialogflow: Dialogflow is the natural language processing (NLP) engine that powers the chatbot. Dialogflow uses
machine learning to understand user input and generate responses.
Back-end: The back-end is the system that provides the data and functionality that Dialogflow needs to respond to
user input. The back-end can be a database, a web service, or an API.
Dialogflow interface:
The Dialogflow interface also includes a number of tools and features that help you to create and manage your
Dialogflow agents. These tools and features include:
Debugger: The debugger allows you to test your Dialogflow agents and see how they will respond to different user
inputs.
Logging: The logging feature allows you to see all of the conversations that your Dialogflow agents have with users.
Metrics: The metrics feature allows you to see how well your Dialogflow agents are performing.
The Dialogflow interface is a powerful tool that can help you to create and manage your Dialogflow agents. With
the Dialogflow interface, you can easily create agents that can understand and respond to a wide range of user
inputs.
The Dialogflow interface is a web-based application that allows you to create and manage your Dialogflow agents.
The interface is divided into three main sections:
Agents: This section lists all of your Dialogflow agents. You can create new agents, edit existing agents, and delete
agents.
Intents: This section lists all of the intents that are defined for your agents. Intents define the different types of
conversations that your agents can have with users. You can create new intents, edit existing intents, and delete
intents.
Training data: This section lists all of the training data that is used to train your Dialogflow agents. Training data can
be in the form of text conversations, audio recordings, or both. You can add new training data, edit existing training
data, and delete training data.
MEMORY MANAGEMENT:
Dialogflow uses a variety of techniques to manage memory. Some of these techniques include:
➢ Garbage collection: Dialogflow uses a garbage collector to automatically free memory that is no longer being
used. The garbage collector is a software program that automatically frees memory that is no longer being
used. The garbage collector works by tracking the objects that are being used by a program and freeing the
memory for any objects that are no longer being used.
➢ Memory pooling: Dialogflow uses memory pools to reuse memory that has been allocated but is no longer
being used. Memory pooling is a technique that reuses memory that has been allocated but is no longer
being used. Memory pooling works by creating a pool of memory that can be used to allocate new objects.
When an object is no longer being used, it is returned to the pool and can be reused to allocate a new
object.
➢ Memory compression: Dialogflow uses memory compression to reduce the amount of memory that is used
to store data. Memory compression is a technique that reduces the amount of memory that is used to store
data. Memory compression works by encoding data in a more compact format. This can be done by
removing unnecessary data or by using a more efficient encoding scheme.
These techniques help Dialogflow to efficiently manage memory and prevent memory leaks.
Dialogflow uses lazy loading to load data only when it is needed. This can help to reduce the
amount of memory that is used to store data. Dialogflow uses caching to store data that has been previously
loaded. This can help to reduce the number of times that data needs to be loaded, which can help to improve
performance and reduce memory usage. Dialogflow uses code optimization to reduce the amount of memory
that is used by the code. This can be done by removing unnecessary code or by using more efficient algorithms.
Dialog Flow Framework: Dialog Flow Framework is a free and open-source python software stack for creating
chatbots, released under the terms of Apache License 2.0. The Dialogflow Framework Stack is a set of tools and
libraries that can be used to build conversational AI applications. The stack includes:
Dialogflow: A natural language processing (NLP) engine that can understand and respond to user input.
Dialogflow CX: A conversational AI platform that provides a graphical user interface for building and managing
Dialogflow agents.
Dialogflow API: A RESTful API that can be used to integrate Dialogflow with other systems.
Dialogflow SDKs: A set of SDKs that can be used to build conversational AI applications in a variety of programming
languages.
Client application development:
Client application development for Dialogflow Framework can be done using a variety of programming languages
and frameworks. Once you have chosen a programming language and framework, you can start developing your
client application. The following are some general steps involved in client application development for Dialogflow
Framework:
Create a Dialogflow agent: The first step is to create a Dialogflow agent. A Dialogflow agent is a virtual agent that
can understand and respond to user input. You can create a Dialogflow agent in the Dialogflow Console Add intents
to your agent: Intents are the building blocks of Dialogflow agents. An intent represents a specific type of user
interaction. For example, you might have an intent for "book a flight" or "get weather information."
Train your agent: Once you have added intents to your agent, you need to train your agent. Training your agent
helps Dialogflow to learn how to understand and respond to user input. You can train your agent in the Dialogflow
Console.
Create a client application: Once your agent is trained, you can start creating your client application. Your client
application will interact with Dialogflow to understand and respond to user input.
Deploy your client application: Once your client application is complete, you need to deploy it. You can deploy your
client application to a variety of platforms, including web, mobile, and voice.
Client application development for Dialogflow Framework can be a complex process, but it is also a re warding one.
By following the steps outlined above, you can create a client application that can understand and respond to user
input in a natural and engaging way.
Client application development for Dialogflow Framework can be done using a variety of programming languages and
frameworks. Here are a few examples:
Python: The Dialogflow Python SDK provides a simple and easy-to-use API for interacting with Dialogflow.
Node.js: The Dialogflow Node.js SDK provides a powerful and flexible API for interacting with Dialogflow.
Java: The Dialogflow Java SDK provides a comprehensive and well-documented API for interacting with Dialogflow.
C#: The Dialogflow C# SDK provides a powerful and easy-to-use API for interacting with Dialogflow.
Ruby: The Dialogflow Ruby SDK provides a simple and easy-to-use API for interacting with Dialogflow.
Flexible architecture of Dialogflow:
Dialogflow is a flexible and powerful framework for building conversational agents, including text-based chatbots.
It follows a modular architecture that allows for flexibility and customization. Here's a high-level overview of the
flexible architecture of Dialogflow:
1.User Interface:
1. Dialogflow provides a user interface where developers can define and manage the conversation flow,
intents, entities, and responses.
2. Developers can use the Dialogflow Console or Dialogflow API to configure and interact with the chatbot.
2.Natural Language Understanding (NLU):
1. Dialogflow uses NLU techniques to understand user input and extract meaning from it.
2. The NLU component includes intent recognition, entity recognition, and context analysis.
3. Developers define intents to represent the different actions or requests users can make, and entities to
capture important information from user inputs.
3.Dialog Management:
Dialogflow's dialog management component handles the conversation flow and manages the context of the
conversation.
It uses the detected intents and entities to determine the appropriate responses or actions.
Developers define the conversation flow using intents, which represent different stages or steps in the
conversation.
Dialogflow supports context management to maintain the context of the conversation and handle multi-turn
conversations.
4.Fulfillment:
Dialogflow provides a fulfillment mechanism that allows you to connect your chatbot with backend systems or
external APIs.
Fulfillment enables the chatbot to perform actions, retrieve data, or provide dynamic responses.
Developers can use Dialogflow's built-in fulfillment editor, use Cloud Functions for Firebase, or deploy custom
webhook services to handle fulfillment logic.
5.Integration:
Dialogflow supports various integration options to deploy and connect the chatbot with different channels and
platforms.
It provides integration with popular messaging platforms like Facebook Messenger, Slack, Telegram, and more.
Dialogflow also offers RESTful APIs and client libraries for custom integrations into web or mobile applications.
6.Analytics and Monitoring:
Dialogflow provides analytics and monitoring capabilities to track and analyze the performance of your
chatbot.
It offers metrics on user interactions, intents, fulfillment, and other key performance indicators.
Developers can access these analytics through the Dialogflow Console or use the Dialogflow API to retrieve
and process the data.
Overall, Dialogflow's flexible architecture allows developers to design, train, and deploy text-based
chatbots that can understand natural language, manage conversations, connect to external systems, and
integrate with various platforms. The modular nature of the framework enables customization and scalability
to suit different chatbot requirements.
SYSTEM DESIGN
6.SYSTEM DESIGN:
6.1 INTRODUCTION:
A text-based chatbot is a computer program that can simulate conversation with human
users. Chatbots are often used in customer service applications, where they can answer
questions, resolve issues, and provide support to customers. Chatbots can also be used for
other purposes, such as providing information, entertainment, or education.
The system design for a text-based chatbot typically includes the following components:
Natural language processing (NLP): NLP is the process of understanding and interpreting
human language. NLP is used by chatbots to understand the meaning of user input and
generate responses. The NLP component must be able to understand the meaning of user
input. This can be a challenge, as human language is often ambiguous and can be interpreted
in different ways.
Machine learning (ML): ML is the process of using data to train a model to perform a task. ML
is used by chatbots to learn how to respond to user input in a natural and engaging way. The
NLP component must be able to understand the meaning of user input. This can be a
challenge, as human language is often ambiguous and can be interpreted in different ways.
Database: The database stores the data that the chatbot needs to respond to user input. This data can include
things like product information, customer support knowledge, or even just a list of possible responses.
Web application: The web application is the user interface that users interact with. The web application sends user
input to the chatbot and displays the chatbot's responses. The web application must be easy to use and navigate. It
must also be responsive and able to handle a large number of users.
The system design for a text-based chatbot can be complex, but it is essential to get right. A
well-designed chatbot can provide a valuable service to users, while a poorly-designed chatbot can be frustrating
and even harmful. By carefully considering these key considerations, you can design a text-based chatbot that is
both effective and user-friendly. Computer-aided design packages are the primary software to help Mechanical
Designers throughout the world. In the beginning, it used to replace hand-drawn technical drawings. The
technology of the 21st century led engineers to develop software and hardware so that CAD [1]
software and its tools integrate with computers and mobile, easy to use, affordable that way,
the organization and higher institutes started incorporating these type of courses into their
education curriculum.
The user uses these 2D drafting and 3D models developed by the software in
the form of technical design to present their design ideas and concepts to other users [2]. The most commonly used
CAD software is Autodesk AutoCAD, Dassault Catia, Dassault Solidwork, Autodesk Inventor, Autodesk Fusion
360,PTC Creo, and Siemens NX. Technical drafting generates after model completion submitted for evaluation by
instructors. The user mainly focuses on learning the CAD software through procedural-based knowledge,
which means knowing the associated commands useful for a particular problem
Design Technique / Procedure:
Any designer generally follows the necessary five steps before designing CHATBOT. The first step is to
determine the Bot’s purpose (Why do customers need a bot?). After that designer must decide between a
platform based on rules or NLPs. That means after the why, how does it come into play? Rule-based bots have
defined decision trees through which they chat. It is similar to step by step diagram or schema chart where the
conversation plan predicts what a client might ask and how CHATBOT should respond. Natural language bot
(NLPs) can understand the context, even though the questions are more complicated. Because of their ability to
learn from their mistakes, they improve their response to the customer’s inquiry. Think of all the different
scenarios or tasks that designer want their CHATBOT to do and put together all the related questions in other
forms to accomplish these same tasks. Each task users wish CHATBOT to do will set by an intention [7]. After this
designer tests CHATBOT by conversing or text like a human.
As a result, every question asked or intended by clients can be expressed in many ways. That
depends on the manner in which the user wants wishes to convey. For instance, Alexas, turn off the TV. Alexas,
could you please turn off the TV? Why don’t you turn off the TV? A user may use either of these phrases to
instruct the Bot to turn off the television. These phrases have the same intention/task of turning off the TV, but
they request different expressions /variants [7]. In the next step designer design the flow of conversation. A
designer needs to write all the logic to keep the user bound to the flow after acknowledging the user’s goal. For
instance, let’s say the organization is building a bot to schedule a medical appointment with the doctor. The Bot
asks the user to give their working mobile number, name, and a specialist to whom to consult, and then the Bot
shows the open slots and then book the slot by user confirmation through a one-time password through a
registered mobile number [7].
Normalization:
Normalization in text-based chatbot is the process of converting text into a standard form. This can be
done by removing noise, such as punctuation and stop words, and by converting words to their canonical forms.
Normalization can improve the accuracy of natural language processing (NLP) tasks, such as text classification and
sentiment analysis.
There are a number of different normalization techniques that can be used for text-based chatbots. Some of the
most common techniques include:
•Tokenization: Tokenization is the process of breaking down text into individual words or tokens. This can be done
using regular expressions or NLTK.
•Stop word removal: Stop words are common words that do not add much meaning to text. These words can be
removed using a stop word list.
•Stemming: Stemming is the process of reducing a word to its root form. This can be done using a stemming
algorithm.
•Lemmatization: Lemmatization is the process of reducing a word to its lemma, which is the base form of the word.
This can be done using a lemmatizer.
The choice of normalization technique will depend on the specific NLP task that is being performed. For example,
stemming is often used for text classification tasks, while lemmatization is often used for sentiment analysis tasks.
Normalization is an important step in the development of text-based chatbots. By normalizing text, chatbots can
improve their accuracy and performance.
Here are some of the benefits of normalization in text-based chatbots:
•Improved accuracy: Normalization can improve the accuracy of NLP tasks, such as text classification and
sentiment analysis.
•Reduced noise: Normalization can remove noise from text, such as punctuation and stop words. This can
improve the accuracy of NLP tasks and make it easier for chatbots to understand user input.
•Increased efficiency: Normalization can make it easier for chatbots to process text. This can improve the
performance of chatbots and make them more responsive to user input.
If you are developing a text-based chatbot, I recommend using normalization. Normalization can improve the
accuracy, efficiency, and performance of your chatbot.
The designer has to select a suitable platform for deployment, choosing the right platform where BOT can deploy,
such that it is easily accessible for users—for example, WhatsApp, Telegram, Your Website, Facebook Messenger
Slack, etc.
DFD for a text-based chatbot:
A data flow diagram (DFD) is a graphical representation of the flow of data through a system. DFDs can be used
to model a wide variety of systems, including text-based chatbots.
A DFD for a text-based chatbot would typically include the following components:
•External entities: External entities represent the users of the chatbot.
•Processes: Processes represent the steps that the chatbot takes to process user input and generate responses.
•Data stores: Data stores represent the data that the chatbot needs to process user input and generate
responses.
In this DFD, the external entities are the user and the database. The processes are the following:
1.Receive user input: This process receives user input from the user.
2.Parse user input: This process parses user input and extracts the meaning of the user's request.
3.Search database: This process searches the database for information that matches the user's request.
4.Generate response: This process generates a response to the user's request based on the information that
was found in the database.
The data stores are the following:
User input: This data store stores the user's input.
Database: This data store stores the information that the chatbot needs to process user input and generate
responses.
The data flows are the following:
1.User input to receive user input: This data flow represents the movement of user input from the user to the
process that receives user input.
2.Parsed user input to parse user input: This data flow represents the movement of parsed user input from
the process that parses user input to the process that searches the database.
3.Database results to generate response: This data flow represents the movement of database results from
the process that searches the database to the process that generates a response.
This is just a basic example of a DFD for a text-based chatbot. The specific components and data flows of a
DFD for a text-based chatbot will vary depending on the specific chatbot.
1.External entities are represented by squares as the source or destination of data.
2.Processes are represented by rectangles with rounded corners.
3.Data Flows are referred to by arrows to denote the physical or electronic flow of
data.
4.Data Stores are physical or electronic-like XML files denoted by open-ended
6.2Unified Modeling Language: Unified Modeling Language (UML) is a visual modeling language that is used to
describe the structure and behavior of software systems. UML can be used to model a wide variety of systems,
including text-based chatbots.
The following are some of the most common UML diagrams that can be used to model text-based chatbots:
•Use case diagram: A use case diagram shows the different ways that users can interact with a system. Use case
diagrams can be used to identify the different features that a text-based chatbot should have.
•Class diagram: A class diagram shows the different classes of objects in a system and the
relationships between those classes. Class diagrams can be used to model the different
components of a text-based chatbot, such as the user interface, the natural language
processing engine, and the database.
•Sequence diagram: A sequence diagram shows the order in
which messages are exchanged between objects in a system.
Sequence diagrams can be used to model the conversation
between a user and a text-based chatbot.
•Activity diagram: An activity diagram shows the flow of control
in a system. Activity diagrams can be used to model the
different steps that a text-based chatbot takes to process user
input and generate responses.
UML diagrams can be used to communicate the design of a text-based chatbot to a wide audience, including
business users, technical users, and system analysts.
Here are some of the benefits of using UML diagrams to model text-based chatbots:
•UML diagrams can be used to communicate the design of a text-based chatbot to a wide audience. This can
help to ensure that everyone involved in the development of the chatbot has a shared understanding of the
system.
•UML diagrams can be used to identify potential problems with the design of a text-based chatbot. This can help
to prevent problems from occurring during development or testing.
•UML diagrams can be used to document the design of a text-based chatbot. This can be helpful for future
maintenance and development of the chatbot.
If you are developing a text-based chatbot, I recommend using UML diagrams to model the system. UML
diagrams can help to ensure that the system is well-designed and that it meets the needs of the users.
OUTPUT SCREENS
SYSTEM TESTING AND
IMPLEMENTATION
8.SYSTEM TESTING AND IMPLEMENTATION
Some of the key considerations for system testing for text-based chatbots:
•Functional requirements: The chatbot must meet the functional requirements of the users. This includes being
able to understand user input, generate responses, and access the necessary data.
•Performance requirements: The chatbot must meet the performance requirements of the users. This includes
being able to handle a large number of users and respond to user input in a timely manner.
•Usability requirements: The chatbot must be easy to use and navigate. This includes having a clear and concise
user interface and providing helpful error messages.
By carefully considering these key considerations, you can ensure that your text-based chatbot is well-tested
and meets the needs of the users.
some of the benefits of system testing for text-based chatbots:
•Identifying and fixing bugs: System testing can help to identify and fix bugs in the chatbot. This can help to
ensure that the chatbot is reliable and meets the needs of the users.
•Improving the chatbot's performance: System testing can help to improve the chatbot's performance. This can
help to ensure that the chatbot can handle a large number of users and respond to user input in a timely
manner.
If you are developing a text-based chatbot, I recommend performing system testing. System testing can help to
ensure that the chatbot is well-tested and meets the needs of the users.
8.1 INTRODUCTION:
System testing for text-based chatbots is the process of evaluating the chatbot's functionality and
performance. This type of testing is typically performed after the chatbot has been developed and before it is
deployed to users. There are a number of different ways to test text-based chatbots. Some common methods
include:
Testing the process of finding differences between the expected behave willed by system models and the
observed behavior implemented system. From dealing point of view, testing is the attempt of falsification of
the system with respect the system models. The goal of testing is to design tests that exercise defects in the
yes and to reveal problems.
The process of executing a program with intent of finding errors is called sting During testing, the program to
be tested is executed with a set of test cases. And the output of the program for the test cases is evaluated to
determine if the program is performing as expected. Testing forms the first step in determining the errors in
the program. The success of testing in revealing errors in program depends critically on test.
8.2 A strategic approach to software testing:
A strategic approach to software testing is a plan that outlines the goals, objectives, and methods of
software testing. A strategic approach can help to ensure that software is tested effectively and efficiently.
There are a number of different factors that should be considered when developing a strategic approach to
software testing. These factors include:
The type of software being developed
The size and complexity of the software
The target audience for the software
The budget and resources available for testing
Once these factors have been considered, a strategic approach can be developed. The strategic approach should
include the following elements:
Goals and objectives: The strategic approach should clearly define the goals and objectives of software testing.
These goals and objectives should be specific, measurable, achievable, relevant, and time-bound.
Methods: The strategic approach should outline the methods that will be used to test software. These methods
may include unit testing, integration testing, system testing, and acceptance testing.
Resources: The strategic approach should identify the resources that will be needed to test software. These
resources may include people, time, and money.
Schedule: The strategic approach should include a schedule for testing software. This schedule should be realistic
and achievable.
Communication: The strategic approach should include a plan for communicating with stakeholders about
software testing. This communication plan should ensure that stakeholders are aware of the testing process and
the results of testing.
8.2.1 Unit testing: Unit testing focuses on the building blocks of the software system, that is, b and sub system.
There are three motivations behind focusing on components. Fest, unit testing reduces the complexity of the
overall tests activities, allowing us to boss on smaller units of the system. Second, unit testing makes it easier to
pinpoints and correct faults given that few components are involved in this test. Third, Unit testing allows
parallelism in the testing activities, that is each component can be tested independently of one another. Hence
the goal is to test the internal logic of the module. Unit testing involves testing individual components of the
chatbot, such as the natural language processing engine and the database.
8.2.2 Integration Testing: In the integration testing, many test modules are combined into sub systems. which
are then tested. The goal here is to see if the modules can be integrated property, the emphasis being on
testing module interaction. After structural testing and functional testing we get error free modules. These
modules are to be integrated to get the required results of the system. After checking a module, another
module is tested and is integrated with the previous module. After the integration, the test cases are generated
and the results are tested. Integration testing involves testing how different components of the chatbot interact
with each other.
8.2.3 System Testing: System testing In system testing the entire software is tested. The reference document for
this process is the document and the goal is to see whether the software meets its requirements. The system
was tested for various test cases with various inputs K24 Acceptance Testing CNGE work Acceptance testing is
sometimes performed with realistic data of the client to demonstrate that the software is working satisfactory.
Testing here focus on the external behavior of the system, the internal logic of the program is not emphasized In
acceptance testing the system is tested for various inputs.
8.2.4 Acceptance testing: Acceptance testing is performed by users to ensure that the chatbot meets their
needs. Acceptance Testing is the last phase of software testing performed after System Testing and before
making the system available for actual use. User acceptance testing is used to determine whether the product is
working for the user correctly. Specific requirements which are quite often used by the customers are primarily
picked for the testing purpose. This is also termed as End-User Testing. This testing helps the project team to
know the further requirements from the users directly as it involves the users for testing.
Automated test execution.
8.3 TESTING TECHNIQUES:
• Black box or functional testing
• White box testing or structural testing.

8.3.1 Black Box Testing: This method is used when knowledge of the specified function that a product has been
designed to perform is known. The concept of black box is used to represent a system whose inside workings are
not available to inspection. In a black box the test item is a "Black", since its logic is unknown, all that is known is
what goes in and what comes out, or the input and output. Black box testing attempts to find errors in the
following categories:• Incorrect or missing functions. Interface errors error in data structure• Performance errors
Initialization and termination errors As shown in the following figure of Black-box testing, we are not thinking of
the internal workings, just we think about What is the output to our system? What is the output for given input to
our system?
8.3.2 White Box Testing: White box testing is concerned with testing the implementation of the program The
intent of structural is not to exercise all the inputs or outputs but to exercise the different programming and
data structure used in the program. Thus structural testing Aims to achieve test cases that will force the
desire coverage of different structures Two types of path testing are statement testing coverage and branch
testing. White box testing techniques analyze the internal structures the used data structures, internal
design, code structure, and the working of the software rather than just the functionality as in black box
testing. It is also called glass box testing or clear box testing or structural testing. White Box Testing is also
known as transparent testing or open box testing.
White box testing is a software testing technique that involves testing the internal structure and workings of
a software application. The tester has access to the source code and uses this knowledge to design test cases
that can verify the correctness of the software at the code level.
White box testing is also known as structural testing or code-based testing, and it is used to test the
software’s internal logic, flow, and structure.
IMPLEMENTATION
A. AIML: To create our knowledge base for normal conversation, we have used AIML files to store the question
and answers pair. When user converses with our chat bot, the input is matched to patterns listed in AIML files
and corresponding answer is returned as response. The sample AIML file structure is as:
HELLO
USERNAME Hello User!
B. Lemmatization and POS Tagging Using Word Net: Information extraction from the input text was done by
extracting keywords. For example, “What is the current placement scenario?” contain “current”,
“placement” and “scenario” as the keywords. Appropriate Lemmas of the keywords were found using
Lemmatization and POS tagging, to group together the different inflected form of the words. For example,
require and required should map to require. Word Net from Python’s package was used for this purpose.
C. Log File: We have maintained a log file which stores the inputs which the chatbot was not able to answer.
Administer can see the log and add the response of relevant sentences to the knowledge base. This would help
in improvement of the chatbot knowledge system i.e. the databases.
D. Semantic Sentence Similarity:
There are various combinations in which user can input the same query. For example,
Q1: What is the notice regarding PG courses re-registration? Q2: Tell me about re-registration in PG courses in
our collegeQ1 and Q2 both mean the same thing (same sense). Also, there will be many more combinations for
this same query and finding all such combinations will not be feasible. The scalability and performance of the
system will also get affected. To overcome this problem, similarity is found out between the user input and the
queries present in the available question set (whose answers are available with the system). The query which
matches with the input with maximum score gets selected (if greater than threshold) and the appropriate
response is returned. Similarity score for two sentences is calculated by averaging the similarity of the individual
keywords of those sentences. Each keyword of the first sentence is matched with every keyword of the second
sentence to find the word with maximum similarity to it. Then the similarity score of individual words are
averaged to represent the sentence similarity. To find the word similarity- Path Similarity and Wu-Palmer (WUP)
Similarity is used. Path similarity computes shortest number of edges from one word sense to another word
sense, assuming a hierarchical structure like WordNet. In general, word senses which have a longer path distance
are less similar than those with a very short path distance, e.g. man, dog versus man, tree (expectation is that
man is more similar to dog than it is to tree). The Wu-Palmer metric weights the edges based on distance in the
hierarchy
CONCLUSION
CONCLUSION:
It is often impossible to get all the data on a single interface without the complications of
going through multiple forms and windows. The college chatbot aims to remove this difficulty by providing a
common and user-friendly interface to solve queries of college students and teachers. The purpose of a chatbot
system is to simulate a human conversation. Its architecture integrates a language model and computational
algorithm to emulate information online communication between a human and a computer using natural
language. The college student and employees can freely upload their queries. The chatbot provides fast and
efficient search for answers to the queries and gets the relevant links to their question. A background research
took place, which included an overview of the conversation procedure and tries to find out the relevant
keywords related to that query to provide the proper link. The database storage includes information about
questions, answers, keywords, and logs. We have also developed an interface. The interface developed will
have two parts, one for users and the other for the administrator. he Chabot improves customer services,
because of this improvement the benefits of the Chatbot are increasing day by day. In today’s world messaging
has become one of the popular means of communication, whether it is a text message or through messaging
apps. The Chabot’s are used in different fields for different purposes, because of these different types of
businesses are being developed Chabot’s.

You might also like