Why AI Language Models Are Making Old Chatbot Building Methods Obsolete (And Maybe Costing Some Engineers Their Jobs!)

kiran beethoju
3 min readMay 11, 2024

--

In the past, making a chatbot was kind of like teaching a very young child how to have a conversation. You had to explain every single detail extremely carefully and deal with many frustrations when things did not go right.

How a chatbot flow works on intent : Credits Rasa.

The process went like this: First, you had to define every possible “intent” or goal a user might have, like “I want to know about flu symptoms” or “I need to find a doctor near me.” Imagine listing out every possible reason someone might talk to a healthcare bot — painful!

Then you provided a boatload of example messages for each intent, so the bot could try to recognize them. “I’m feeling feverish and achy” versus “I have a high temperature and body aches.” Like training a toddler that those mean the same thing.

Traditional Flow of Building a Logic behind the chatbot rules : Credits (https://subscription.packtpub.com/book/data/9781788830782/11/ch11lvl1sec61/building-a-chatbot-to-service-customers-24-7)

You also had to tell the poor bot exactly what key pieces of info to extract, like “flu” or “Los Angeles.” We’re talking entity extraction here, folks! As if that’s not complicated enough for a kindergartner.

But wait, there’s more! You had to write out full conversation flowcharts for every scenario. If the user said X, then response Y. If they said Z, better go to template M. Enough rules to make your head spin.

I actually built one of these bots for a healthcare company once. It took 8 months, thousands of example messages, lacs of entities, over 180+ intents, 150 data-fetching routines (Custom API calls/DB calls), and carefully crafted response templates up the wazoo. Miss me with that Rube Goldberg machine!

The core issue is these traditional pattern-matching bots were dumber than a box of rocks. If you phrased something like “I’m coming down with killer body pains and chills” it would probably respond “Sorry, I didn’t understand that you want to learn about woodworking!”

Bot failed to understand the intent which indicates there is no training data: Credits; Chatbot.com

Enter large language models like GPT-3 — a true game-changer. These know-it-all AIs can actually understand conversational language like humans and generate fluent responses, no token matching required. You just give it a primer on the topic, and it’s off to the races, putting together relevant responses on the fly.

Instead of that whole bureaucratic intent/entity/response template rigmarole, you just start a conversation and the model intelligently continues it. Like talking to a very intelligent friend who happens to be a walking encyclopedia.

Of course, getting them to stay on track still takes careful prompting. And they can definitely say some biased or fallacious things without proper constraining. But mastering an LLM beats coding up a million narrow rules.

So pour one out for the old-school chatbot assembly line! With LLMs on the scene, building a conversational AI could eventually be as simple as browsing GitHub prompts and fine-tuning on some examples, rather than manually programming a tangle of components. AI is putting a wholelotta chatbot devs out of a job! But hey, at least their replacement knows more than the brain of a kindergartner.

Follow me on linkedin for more updates : Kiran Beethoju https://www.linkedin.com/in/kirankumarbeethoju/

--

--

kiran beethoju
kiran beethoju

Written by kiran beethoju

Sr. Data Scientist - Healthcare GenAI Practitioner | IIT Jodhpur

No responses yet