Table of Contents
- Key takeaways
- What is machine learning in customer support?
- How is machine learning used in a customer support chatbot?
- Intent classification: working out what the customer wants
- Retrieval: finding the right help content
- Generation: writing the reply
- Evaluation: measuring whether the chatbot works
- How do you build a customer support chatbot using machine learning?
- How the three routes were ranked
- 1. Build it yourself with an ML library or a model API: best for a chatbot inside your own product
- 2. SiteGPT: best for a website chatbot that answers from your existing content
- 3. A helpdesk's built-in AI agent: best for teams that already work tickets in a helpdesk
- How to build the chatbot in 7 steps
- Worked example: 2,000 conversations a month
- What the model usage costs if you build it yourself
- What the same volume costs on the other two routes
- How to score the test run
- Should you build or buy a customer service chatbot?
- Common mistakes when building a machine learning chatbot
- Frequently asked questions
- Basics
- How is machine learning used in customer service?
- Does a customer service chatbot need machine learning?
- What is the difference between machine learning and NLP in a chatbot?
- Building
- What do you need to build a machine learning chatbot?
- Which type of AI system is best for improving customer service?
- Why does a chatbot forget what the customer said earlier in the conversation?
- Can you build a customer service chatbot without code?
- Models and data
- Do you need to train your own model?
- How much training data does an intent classifier need?
- Is fine-tuning worth it for a customer service chatbot?
- Cost and evaluation
- How much does it cost to run a machine learning chatbot?
- How do you evaluate a customer service chatbot?
- What is a good accuracy score for a chatbot?
- Sources

- A modern customer service chatbot uses machine learning in four places: intent classification, retrieval, generation, and evaluation.
- Most teams never train a model. They index their own content and let a pretrained language model answer from it.
- There are three ways to build one: write it yourself on a model API or ML library, use a no-code retrieval platform, or switch on the AI inside a helpdesk.
- In the worked example below, 2,000 conversations a month cost $17.70 in OpenAI usage on gpt-6-luna. Engineering time is the larger cost of that route.
- Build it yourself when the chatbot is part of your product. Buy when it answers questions about your product.
Key takeaways
Machine learning job | What it does | Typical tool | Number to watch |
Intent classification | Sorts a message into a known request type | Dialogflow intents, or a scikit-learn text classifier | Precision and recall per intent |
Retrieval | Finds the help passages closest in meaning to the question | Embeddings with Sentence Transformers or OpenAI file search | Context recall |
Generation | Writes the reply from the retrieved passages | A language model such as gpt-6-luna | Faithfulness score |
Evaluation | Scores the chatbot on a fixed test set | A labeled question set, scikit-learn metrics, Ragas | Pass rate before and after each change |

What is machine learning in customer support?
- Ticket routing. A classifier reads each new ticket and sends it to the right queue.
- Sentiment detection. A model flags messages that sound upset so a person can step in early.
- Topic analysis. A model groups past conversations so the team can see which questions come up most.
How is machine learning used in a customer support chatbot?
Job | Input | Output | Who trains the model |
Intent classification | One customer message | A label such as "refund" or "order status" | You, with example phrases |
Retrieval | The question and your indexed content | The few passages most likely to hold the answer | Nobody. A pretrained embedding model is used as it is |
Generation | The question, the passages, and written instructions | A reply in plain language | The model provider |
Evaluation | A fixed set of test questions | Scores per question type | Nobody. This is measurement |
Intent classification: working out what the customer wants
Retrieval: finding the right help content
Generation: writing the reply
Evaluation: measuring whether the chatbot works
- Intent classification uses precision and recall. The scikit-learn documentation defines precision as the ability not to label a negative sample as positive. It defines recall as the ability to find all the positive samples.
- Retrieval uses context recall. The Ragas documentation defines it as how many of the relevant pieces of information were retrieved.
- Generation uses faithfulness. Ragas defines it as the number of claims in the reply that the retrieved content supports, divided by the total number of claims in the reply. The score runs from 0 to 1.
How do you build a customer support chatbot using machine learning?
How the three routes were ranked
- Control. Whether you choose the model, the retrieval method, and the logic.
- Skills needed. Whether the route needs an engineer.
- Time to a working chatbot. Whether the first version takes minutes or a project.
- Pricing unit. Whether you pay per token, per message, or per resolved conversation.
Route | Best for | You choose the model | Needs an engineer | Pricing unit |
1. Build it yourself | A chatbot inside your own product | Yes | Yes | Per token, plus engineering time |
2. SiteGPT | A website chatbot that answers from existing content | No | No | Per plan, with a monthly message quota |
3. A helpdesk's AI agent, such as Fin | Teams that already work tickets in a helpdesk | No | No | Per resolved conversation |
1. Build it yourself with an ML library or a model API: best for a chatbot inside your own product
- An intent classifier for the requests that need a fixed flow. scikit-learn or Dialogflow covers this.
- A retrieval layer. Sentence Transformers runs open-source embedding models on your own hardware. OpenAI's file search is a hosted tool in the Responses API that searches uploaded files by meaning and by keyword.
- A language model called through an API, with conversation history sent on every turn.
- A chat widget, a handoff to a person, logging, and a test harness.
- Full choice of model, retrieval method, and business logic.
- Usage is billed per token, and the bill is low at small volumes.
- The chatbot can call your own systems, such as an order database.
- An engineer has to build it and keep it running.
- The widget, the handoff, and the analytics are your work too.
- Fine-tuning is a shrinking option on OpenAI. Its pricing page says the fine-tuning platform is being wound down and is closed to new users.
2. SiteGPT: best for a website chatbot that answers from your existing content
- Content sources: website URLs, sitemaps, uploaded files, raw text, Google Drive, Dropbox, OneDrive, Box, Notion, GitHub, and YouTube.
- Scheduled content refresh: monthly on Growth, weekly on Scale, daily on Enterprise. Starter is manual refresh only.
- Chat integrations on Growth and above: Google Chat, Messenger, Slack, Crisp, Freshdesk Messaging, and Zoho SalesIQ. Zendesk is on Scale and above.
- Analytics that do some of the evaluation work. Growth lists knowledge gaps and the questions the chatbot could not answer. Scale adds AI-classified topics, sentiment, and resolution outcomes for every conversation.
- 95+ languages.
- No engineer and no model work. The setup steps are in how to create an AI chatbot.
- A fixed monthly price with a known message quota.
- A person can take over. The Growth plan's iOS app sends a push notification when a visitor asks for a human.
- You do not train a model or bring your own. The plans run on GPT-4.1-mini and GPT-4.1.
- There is no visual flow canvas for scripted, branching conversations.
- There is no free plan. The 7-day trial needs a credit card.
- There is no Intercom or HubSpot integration today.
- The Starter plan has no chat integrations and no scheduled refresh.
3. A helpdesk's built-in AI agent: best for teams that already work tickets in a helpdesk
- An AI agent that answers inside the same tool where agents already work tickets.
- Handoff to the agents who already work in that helpdesk.
- Pricing tied to results. Fin charges $0.99 per outcome, with at most one outcome per conversation.
- Nothing to connect if the team already uses the helpdesk.
- No charge when the customer asks for a person or Fin cannot answer.
- Spending limits and alerts can cap the monthly bill.
- The cost rises with every resolved conversation, so a busy month costs more.
- You do not choose the model or the retrieval method.
- Add-ons raise the bill. Fin lists a Pro add-on from $100 per workspace a month and Copilot at $29 per teammate a month.
How to build the chatbot in 7 steps
- Collect real questions. Export 200 recent customer questions from email, chat, or tickets. Remove personal data.
- Label each question. Mark it as answerable from content, needs a fixed flow or a person, or out of scope. This labeled list becomes the test set.
- Pick the route. Use the decision matrix below. Choose before writing any code.
- Load and index the content. Add the pages and files that answer the questions from step 1. Fix contradictions between pages first. The guide to training a chatbot on your own data covers the cleanup.
- Write the instructions and the routing. Tell the model to answer only from the content and to decline when the content has no answer. Send refunds, cancellations, and account changes to a fixed flow or a person.
- Run the test set. Score the chatbot on the 200 questions. Record the numbers.
- Launch, then re-test after every change. A new page, a new instruction, or a new model version can each lower the score. Run the same 200 questions again each time.
Worked example: 2,000 conversations a month
What the model usage costs if you build it yourself
Line | Calculation | gpt-6-luna | gpt-6.1-sol |
Input tokens | 6,000 calls x 3,000 = 18M tokens | 18 x $0.10 = $1.80 | 18 x $2.00 = $36.00 |
Output tokens | 6,000 calls x 300 = 1.8M tokens | 1.8 x $0.50 = $0.90 | 1.8 x $10.00 = $18.00 |
File search calls | 6,000 calls at $2.50 per 1,000 | $15.00 | $15.00 |
Total per month | Sum of the three lines | $17.70 | $69.00 |
Cost per conversation | Total / 2,000 | $0.009 | $0.035 |
- The retrieval tool costs more than the model on gpt-6-luna. File search is $15.00 of the $17.70.
- The larger model costs 20 times more for the tokens. That is $54.00 against $2.70.
- Indexing the content is close to free. OpenAI's embeddings guide lists text-embedding-3-small at about 62,500 pages per dollar, so 500 pages cost under one cent.
What the same volume costs on the other two routes
Share of conversations Fin resolves | Outcomes | Cost at $0.99 per outcome |
30% | 600 | $594 a month |
50% | 1,000 | $990 a month |
70% | 1,400 | $1,386 a month |
SiteGPT plan | Billed monthly | Billed yearly, per month | GPT-4.1-mini messages a month | Price per message, monthly billing | Price per message, yearly billing |
Starter | $59 | $39 | 4,000 | $0.0148 | $0.0098 |
Growth | $129 | $79 | 10,000 | $0.0129 | $0.0079 |
Scale | $429 | $259 | 40,000 | $0.0107 | $0.0065 |

How to score the test run
Question type | Count | Correct outcome | Result | Score |
Answerable | 160 | A correct answer | 136 correct, 14 wrong, 10 declined | 136 / 160 = 85% |
Not answerable | 40 | Decline and offer a person | 36 declined, 4 invented an answer | 36 / 40 = 90% |
All questions | 200 | Either outcome above | 172 passed | 172 / 200 = 86% |
- Precision: 42 / 48 = 87.5%. Of the messages sent to the refund flow, 6 did not belong there.
- Recall: 42 / 50 = 84%. The classifier missed 8 refund requests.
- F1 score: 2 x 0.875 x 0.84 / (0.875 + 0.84) = 85.7%.
Should you build or buy a customer service chatbot?
If you need... | Pick... | Why |
A chatbot inside your own app that calls your own systems | Build it yourself | Only your code can reach your data and logic |
A specific model, or a model hosted on your own hardware | Build it yourself | Platforms choose the model for you |
To learn how the machine learning works | Build it yourself | The other routes hide those parts |
A website chatbot live this week with no engineer | Indexing, the model, and the widget are included | |
Answers from a site, files, and cloud drives that change often | Scheduled refresh runs monthly on Growth and weekly on Scale | |
A fixed monthly price | Plans have a set price and a set message quota | |
An AI agent inside the helpdesk your agents already use | The helpdesk's AI agent | Handoff and ticket data are already connected |
To pay only when a conversation is resolved | Fin | It charges $0.99 per outcome and nothing when it cannot answer |
Scripted, branching flows drawn on a canvas | None of the three routes above is built for that |

Common mistakes when building a machine learning chatbot
- Training a model when indexing would do. Most question answering needs retrieval over your content. It does not need a new model.
- Launching with no test set. A team with no baseline cannot tell whether a change helped.
- Testing only answerable questions. The test set also needs questions the chatbot should decline. The guide to chatbot hallucinations covers why.
- Letting a generated answer make a commitment. Refunds and account changes belong in a fixed flow or with a person.
- Dropping the conversation history. The model does not remember earlier turns unless the application sends them.
- Indexing content that contradicts itself. The chatbot will state one of the two versions as fact.
- Counting only the model bill. In the worked example, tokens cost $2.70 a month. The engineer costs far more.




























