I built three chatbots without an LLM. Your AI bill is optional.
I built three chatbots with no language model behind them. The page that runs all three is about 340 KB of JavaScript. Given 256 test sentences that were kept out of their training, in Indonesian, slang included, they understood 242. Nobody is billed per message, because there is nothing to bill.
This is what a business chatbot gets asked:
- Where is the nearest store?
- How many leave days do I have left?
- Is this product halal?
- Can I book a test ride on Saturday?
The default answer to “we need a chatbot” is now “plug in an LLM”. LLMs are overused, and for this kind of chatbot I would not use one at all.
A dozen questions is not a language problem
An LLM is worth paying for when the task is open, when someone asks for something nobody planned for. A bot like these is the opposite. It can do a short list of things, and each one ends in a lookup: a price, a points balance, a schedule, a leave quota.
The work has three steps:
- Decide which of a dozen things the person wants.
- Pull out a date or a branch name, when there is one.
- Fetch the right record.
That is classification, and I was shipping it as a consultant before LLMs were an option.
14 misses out of 256
For this site I built three of them again, the way I would today: a shop assistant, a dealer assistant and an HR assistant, each handling ten to twelve kinds of question. They use NLP.js, an open-source library. The data in the demo is made up, because the real systems are not mine to show. The part that understands the customer is real.
The three bots train in 28, 13 and 6 milliseconds in a browser tab. Put that on a server instead and it would not show up on the bill.
The 256 test sentences were written for the test. They are not real customer logs. Here is the full score, misses included:
| What happened | Sentences |
|---|---|
| Understood correctly | 242 of 256 |
| Said it did not understand and offered the menu | 9 |
| Answered the wrong question, with confidence | 5 |
Separately, I gave the bots 24 sentences that had nothing to do with the job. They turned 20 away. The other four got a wrong answer.
“But an LLM call is cheap”
Per message, it is. It is still a bill that grows with every customer and never stops, for a job a 340 KB page does for nothing.
You do still pay to host the integrations: the connections to SAP, the HR system, the middleware, the APIs. You pay that with or without a model. The LLM bill lands on top.
Cost is not even the best reason
A classifier can pick the wrong answer, and mine did: five times in the test, and four more on the off-topic sentences. What it gives you in return:
- It cannot invent an answer. Every reply is one that somebody wrote and approved, so the worst case is the wrong approved answer, never an invented one. That matters when the question is whether a product is halal.
- It cannot be talked into ignoring its instructions. It has none.
- Nothing goes to a model provider. An employee’s question about their leave stays where it was asked.
You can make an LLM pick from the same list of approved answers. It may miss fewer than mine did; I have not measured that. But then you are paying per message for what the classifier does for free, so decide what those few misses are worth.
The price of doing it my way is that someone has to write the example sentences, and write more whenever the list of questions grows. Have an LLM draft them if you like. Do it when you build the bot, not on every message.
When an LLM earns its bill
Two cases:
- Open questions across a pile of documents. Use one.
- A fallback when the classifier is unsure, and a “sorry, I did not get that” would lose you the customer. Call a model for that one message. In my test the bots gave up on about one message in thirty.
Two warnings about that fallback. The message does go to a provider, so keep it away from anything sensitive. And it does nothing for the confident wrong answers. Those need better example sentences.
Booking a test ride is not one of those cases. Asking for a bike, a dealer, a date and a time is a form with manners.
A model that can write poetry is an expensive way to look up a points balance.
Before you add an LLM to a chatbot, write down every question it has to answer. If the list fits on one page, you do not need the LLM.