How do chatbots work?

Although they haven’t been taught the rules of grammar, they often make grammatical sense.
a person's hands typing on a laptop keyboard
Chatbots might seem like a new trend, but they're sort of based on an old concept. DepositPhotos

Share

If you remember chatting with SmarterChild back on AOL Instant Messenger back in the day, you know how far ChatGPT and Google Bard have come. But how do these so-called chatbots work—and what’s the best way to use them to our advantage?

Chatbots are AI programs that respond to questions in a way that makes them seem like real people. That sounds pretty sophisticated, right? And these bots are. But when it comes down to it, they’re doing one thing really well: predicting one word after another.

So for ChatGPT or Google Bard, these chatbots are based on what are called large language models. That’s a kind of algorithm, and it gets trained on what are basically fill-in-the-blank, Mad-Libs style questions. The result is a program that can take your prompt and spit out an answer in phrases or sentences.

But it’s important to remember that while they might appear pretty human-like, they are most definitely not—they’re only imitating us. They don’t have common sense, and they aren’t taught the rules of grammar like you or I were in school. They are also only as good as what they were schooled on—and they can also produce a lot of nonsense.

To hear all about the nuts and bolts of how chatbots work, and the potential danger (legal or otherwise) in using them, you can subscribe to PopSci+ and read the full story by Charlotte Hu, in addition to listening to our new episode of Ask Us Anything