Table of Contents
- Key takeaways
- What is an NLP chatbot?
- How does NLP work in a chatbot?
- Intents: what the user wants
- Entities: the details inside the message
- Context: what was already said
- Retrieval: where the facts come from
- NLP vs NLU vs NLG: what is the difference?
- What are the types of NLP chatbots?
- Intents and entities vs LLMs: which NLP approach should you use?
- Worked example: one message through three kinds of chatbot
- What NLP tasks does a chatbot use?
- What is an example of an NLP chatbot?
- How do you build an NLP chatbot?
- Common NLP chatbot problems and how to fix them
- Frequently asked questions
- Basics
- What is NLP in a chatbot?
- What is an NLP chatbot?
- How does NLP work in a chatbot?
- Comparisons
- What is the difference between NLP and NLU?
- What is the difference between NLP and an LLM?
- What is the difference between a rule-based chatbot and an NLP chatbot?
- What is the difference between machine learning and NLP in a chatbot?
- Building
- What are the best frameworks for an NLP chatbot?
- How many training phrases does an intent need?
- Does an LLM chatbot still need intents?
- Accuracy and limits
- Why does an NLP chatbot give wrong answers?
- Can an NLP chatbot understand different languages?
- Can an NLP chatbot detect emotions?
- Sources

- NLP is the part of a chatbot that turns free text into meaning, and meaning back into a reply.
- Intent-based chatbots match each message to a list of intents, such as "track order", and pull out entities, such as an order number or a date. Google's Dialogflow recommends 10-20 example phrases per intent.
- LLM chatbots skip the intent list. The model reads any phrasing, and retrieval supplies the facts from your pages and documents.
- Use intents and scripted flows for fixed tasks like refunds or bookings. Use an LLM with retrieval for open questions about products, policies, and how-to steps.
- When an LLM chatbot gets an answer wrong, check the source content first. Missing or outdated pages are a common cause.
Key takeaways
Approach | How it understands a message | Best for | Main risk |
Keyword matching | Looks for fixed words such as "refund" | A handful of menu-style questions | Misreads any message that uses other words |
Intent-based NLU | Classifies the message into a known intent and extracts entities | Fixed tasks with a few outcomes | Falls back on every topic nobody scripted |
LLM only | A language model reads the message and writes a reply from what it learned in training | General conversation | Invents business facts it was never given |
LLM with retrieval (RAG) | The model reads the message, retrieves passages from your content, and answers from them | Open questions about your products and policies | Repeats outdated or missing content |

What is an NLP chatbot?
How does NLP work in a chatbot?
- Read the message. The text is split into tokens, which are words or word pieces, and the language is detected.
- Work out the meaning. Intent classification names the goal of the message. Entity extraction pulls out the details, such as a product, a date, or an order number.
- Track the conversation. Dialogue state keeps what was already said, so a follow-up such as "what about the red one?" still makes sense.
- Find the facts. A scripted chatbot runs the flow tied to the intent. An LLM chatbot with retrieval searches the business's content for passages that answer the question.
- Write the reply. Natural language generation turns the result into a sentence, either from a template a person wrote or from a language model.
Intents: what the user wants
Entities: the details inside the message
Context: what was already said
Retrieval: where the facts come from
NLP vs NLU vs NLG: what is the difference?
Term | What it covers | In a chatbot | Example |
NLP (natural language processing) | The full field: reading, understanding, and producing language | Every language step in the pipeline | Tokenizing a message, detecting its language |
NLU (natural language understanding) | Turning text into meaning | Intent classification and entity extraction | "Can I send back my jacket?" becomes intent: return, product: jacket |
NLG (natural language generation) | Turning meaning into text | Writing the reply | "Yes. Returns are accepted within 30 days of delivery." |
What are the types of NLP chatbots?
Type | Understanding | Answers come from | Setup work | Handles new phrasing |
Keyword matching | Fixed words and rules | Canned replies | Write rules for every keyword | Poorly |
Intent-based NLU | Trained intent classifier plus entities | Templates and scripted flows | 10-20 example phrases per intent, plus flows | Within each intent |
LLM only | Pretrained language model | The model's training data | Write instructions | Well |
LLM with retrieval | Pretrained language model | Passages retrieved from your content | Connect content and write instructions | Well |
Intents and entities vs LLMs: which NLP approach should you use?

If you need... | Pick... | Why |
Answers to open questions about products, policies, or how-to steps | LLM with retrieval | Nobody can script every phrasing, and the facts live in your content |
A booking, refund, or account change that must follow fixed steps | Intent-based flow | Every step is predictable and auditable |
A bot that stays current when pages change weekly | LLM with retrieval | Updating content updates answers, with no retraining |
Structured data from a message, such as a date or order number | Entity extraction | Entities give the system clean values to act on |
Small talk with no business facts | LLM only | No retrieval needed when nothing factual is at stake |
A question outside the trained content | Neither. Decline and offer a person | Guessing is how chatbots give wrong answers |

Worked example: one message through three kinds of chatbot
Chatbot type | What it understands | What it replies | Result |
Keyword matching | No keyword "return" or "refund" appears, because the customer wrote "send it back" | "Sorry, I didn't understand. Choose an option from the menu." | Fails |
Intent-based NLU | Intent: return request. Entities: product = blue rain jacket, date = March 3 | Starts the returns flow and asks for the order number | Works, but only because someone built a returns intent and flow |
LLM with retrieval | Reads the question, retrieves the returns policy passage | "Returns are accepted within 30 days of delivery. If the jacket arrived on or after March 3, at least 13 days are left. Here is the returns page." | Works, and links the source |
What NLP tasks does a chatbot use?
NLP task | What it does | Example in a chatbot |
Tokenization | Splits text into words or word pieces | Each word, or piece of a word, becomes a token the model can process |
Intent classification | Names the goal of the message | "Where's my parcel?" maps to track order |
Named entity recognition | Finds names, places, dates, and other entities | IBM's example: "London" is a location and "Maria" is a person |
Sentiment analysis | Detects attitude and emotion in text | An angry message is routed to a person sooner |
Language detection and translation | Identifies the language and replies in it | A question in Spanish gets a Spanish answer from English content |
Question answering | Finds or writes the answer to a question | Retrieves the shipping policy and answers from it |
What is an example of an NLP chatbot?
How do you build an NLP chatbot?
Framework or route | Approach | What you define | Fits |
Google Dialogflow ES | Intent-based NLU | Intents, training phrases, entities, contexts | Teams on Google Cloud building fixed flows |
Amazon Lex V2 | Intent-based NLU | Intents, sample utterances, slots, a fallback intent | Teams on AWS building fixed flows |
Microsoft CLU (Azure AI Language) | Intent-based NLU, with an LLM-based training option | Intents and entities, or intent descriptions for the LLM option | Teams on Azure |
Rasa | Agent platform with language models and RAG guides | Flows, custom actions, and prompts | Developer teams that want control over flows and code |
Model API plus your own retrieval | LLM with retrieval | Indexing, retrieval code, prompts, and the chat interface | Developer teams with time to maintain it |
No-code RAG platform | LLM with retrieval | Content sources, instructions, and the widget's look | Teams without developers that need a website chatbot |
- List the questions and tasks the chatbot must handle, using real transcripts or emails.
- Split them into open questions and fixed tasks.
- Connect the content that answers the open questions, and build flows for the fixed tasks.
- Write instructions for tone, scope, and when to hand off to a person.
- Test with a fixed set of real questions, including some the content cannot answer.
- Launch, read transcripts weekly, and fill the content gaps they show.
Common NLP chatbot problems and how to fix them
- Ambiguous messages. "It doesn't work" names no product. Have the chatbot ask one clarifying question instead of guessing.
- Missing content. An LLM chatbot with retrieval cannot answer from a page that does not exist. Read the questions it declined and add the missing pages.
- Invented answers. LLMs can state facts that appear nowhere in your content. Ground answers in retrieval and instruct the bot to decline when no passage matches. The guide to stopping chatbot hallucinations lists more guardrails.
- Slang, typos, and dialects. Intent classifiers miss phrasings far from their examples. Add real customer phrasings to the training phrases, or use an LLM, which handles informal text better.
- Lost context. A bot that forgets the last turn asks again for the order number. Test multi-turn conversations before launch.
- No route to a person. NLP will misread some messages. Every chatbot needs a visible way to reach a human.













