AIMultiple ResearchAIMultiple ResearchAIMultiple Research
We follow ethical norms & our process for objectivity.
This research is not funded by any sponsors.
NLPChatbot
Updated on Apr 28, 2025

How to Build a Chatbot: Components & Architecture in 2025

diagram of chatbot architecturediagram of chatbot architecture

Chatbots allow machines to interact with humans in a natural way. They serve various purposes across different industries, such as answering frequently asked questions, engaging with customers, and providing deeper insights into customer needs.

About half of the large enterprises are considering investing in chatbot development. Thus, it is important to understand chatbots’ underlying architecture to reap the most benefits.

We explored how chatbots work, their components, and the steps involved in chatbot architecture and development.

How do chatbots work?

In simple words, chatbots aim to understand users’ queries and generate a relevant response to meet their needs. Simple chatbots scan users’ input sentences for general keywords, skim through their predefined list of answers, and provide a rule-based response relevant to the user’s query. 

Contemporary chatbots utilize AI and natural language processing (NLP) to interpret users’ intentions from the context of their messages and produce appropriate responses.

Chatbots can be divided into 3 types based on the response-generation method:

1. AI-based chatbots

AI-enabled chatbots rely on NLP to scan users’ queries and recognize keywords to determine the right way to respond. Additionally, some AI-based chatbots also benefit from ML integration and so can self-improve through repeated interaction with  users’ data – as new training data – in order to expand the knowledge database and improve the relevancy and accuracy of their responses. LLM and gen AI based systems specifically use deep learning techniques, to process natural language.

2. Rule-based chatbots

Rule-based chatbots utilize “if/then” logic to create responses by choosing them from a catalog of commands according to predesigned conditions. These chatbots have limited customization capabilities but are reliable and are less likely to go off the rails when it comes to generating responses.

3. Hybrid chatbots

Hybrid chatbots combine rules-based systems with natural language processing (NLP) to interpret user inputs and create responses. Although it is easier to adjust their databases, these chatbots have more limited conversational abilities than those that are powered by artificial intelligence.

To explore in detail, feel free to read our in-depth article on chatbot types.

What are the components of a chatbot?

Typically, chatbots consist of 7 components, and they are structured as follows:

Use of Natural language processing

Chatbots convert users’ text and speech into organized data that can be understood by machines through Natural language processing (NLP). The NLP process involves several key steps:

  • Tokenization: also called lexical analysis, is the process of splitting the string of words forming a sentence into smaller parts, known as “tokens,” based on its meaning and its relationship to the whole sentence.
  • Normalization: also called syntactic analysis, is the process of checking words for typos and changing them into standard form. For example, the word “tmrw” will be normalized into “tomorrow.”
  • Entity recognition: the process of looking for keywords to identify the topic of the conversation.
  • Semantic analysis: the process of inferring the meaning of a sentence by understanding the meaning of each word and its relation to the overall structure.

Natural language understanding

Natural language understanding (NLU) is a branch of NLP dedicated to interpreting the meaning of spoken language by detecting patterns in unstructured verbal input. NLU solutions are made up of three main components:

  • Dictionary to determine the meaning of a word
  • Parser to determines if the syntax of the text conforms to the rules of the language
  • Grammar rules to break down the input based on sentence structure and punctuation

NLU enables chatbots to classify users’ intents and generate a response based on training data.

Knowledge base

A knowledge base is a library of information that the chatbot relies on to fetch the data used to respond to users. Knowledge bases differ based on business needs. For instance, the knowledge base of an e-commerce website chatbot will contain information about products, features, and prices, whereas a knowledge base of a healthcare chatbot will have information about physicians’ calendars, hospital opening hours, and pharmacy duties. 

Additionally, some chatbots are integrated with web scrapers to pull data from online resources and display it to users.

Data storage

Chatbot developers may choose to store conversations for customer service uses and bot training and testing purposes. Chatbot conversations can be stored in SQL form either on-premise or on a cloud.

Dialog manager

A dialog manager is the component responsible for the flow of the conversation between the user and the chatbot. It keeps a record of the interactions within one conversation to change its responses down the line if necessary. 

For instance, if the user says “I want to order strawberry ice cream” and then within the conversation says, “change my order to chocolate ice cream”, the dialog manager will enable the bot to detect the change from “strawberry” to “chocolate” and change the order accordingly.

Natural language generation

Natural language generation (NLG) refers to the method of converting structured data produced by machines into easily readable text for humans. Once the user’s intent is identified, NLG involves four steps to create a response:

  • Content determination: Filtering existing data in the knowledge base to choose what to include in the response.
  • Data interpretation: Understanding the patterns and answers available in the knowledge base.
  • Document planning: Structuring the answer in a narrative manner.
  • Sentence aggregation: Compiling the expressions and words for each sentence in the response.
  • Grammaticalization: Applying grammar rules such as punctuation and spell check.
  • Language implementations: Inputting the data into language templates to ensure a natural representation of the response.

User interfaces

Conversational user interfaces are the front-end of a chatbot that enable the physical representation of the conversation. They are classified into text-based or voice-based assistants. And they can be integrated into different platforms, such as Facebook Messenger, WhatsApp, Slack, Google Teams, etc.

Real-world examples

1.H&M’s virtual shopping assistant

H&M uses a chatbot to assist customers with product recommendations and support. The chatbot architecture integrates with the company’s product database and uses Natural Language Processing (NLP) to understand customer preferences. It can handle queries related to product availability, sizes, and styles, providing personalized recommendations. The architecture also includes an interface to process customer queries in multiple languages and scale during high-traffic periods.

2.Bank of America’s Erica

Bank of America’s virtual financial assistant, Erica, leverages chatbot architecture to handle customer service requests such as account balance inquiries, transaction details, and credit card management. The architecture integrates with Bank of America’s core banking systems, using machine learning algorithms to provide fine-tuned financial insights.

3.Babylon Health’s Symptom Checker

Babylon Health, a digital healthcare service, uses a chatbot that serves as a symptom checker, offering users medical advice based on their input. The chatbot architecture integrates with Babylon’s medical database and AI algorithms to offer real-time health assessments. It connects users with healthcare professionals for follow-ups when necessary. This architecture includes natural language understanding (NLU) capabilities to interpret complex medical terms and ensure privacy by complying with HIPAA regulations.

What are the best practices of chatbot development?

Best practices of the chatbot development process are:

  • Identifying target audience and understanding their needs,
  • Setting realistic goals about chatbot implementation,
  • Understanding which business area will benefit most from a chatbot,
  • Selecting the right chatbot vendor,
  • And optimizing the usability and the accessibility of your chatbot on the customer side.

For more information on best practices, take a look at Top Chatbot Best Practices.

Further reading

And if you believe your business will benefit from a conversational AI solution, scroll down our data-driven lists of vendors:

We can also guide you through the process:

Find the Right Vendors
Share This Article
MailLinkedinX
Cem has been the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per similarWeb) including 55% of Fortune 500 every month.

Cem's work has been cited by leading global publications including Business Insider, Forbes, Washington Post, global firms like Deloitte, HPE and NGOs like World Economic Forum and supranational organizations like European Commission. You can see more reputable companies and resources that referenced AIMultiple.

Throughout his career, Cem served as a tech consultant, tech buyer and tech entrepreneur. He advised enterprises on their technology decisions at McKinsey & Company and Altman Solon for more than a decade. He also published a McKinsey report on digitalization.

He led technology strategy and procurement of a telco while reporting to the CEO. He has also led commercial growth of deep tech company Hypatos that reached a 7 digit annual recurring revenue and a 9 digit valuation from 0 within 2 years. Cem's work in Hypatos was covered by leading technology publications like TechCrunch and Business Insider.

Cem regularly speaks at international technology conferences. He graduated from Bogazici University as a computer engineer and holds an MBA from Columbia Business School.

Next to Read

Comments

Your email address will not be published. All fields are required.

0 Comments