# What is Jabberwacky, and how did a chatbot learn to talk from its users?

Date: 2020-05-12 · Author: Robert Scales · https://guidetoartificialintelligence.com/en/learn/what-is-jabberwacky/

**Answer:** Jabberwacky is a chatbot created by the British programmer Rollo Carpenter, who began the learning project in 1988 and put it on the web in 1997. Instead of following hand-written rules, it remembers what people have said to it and replies by finding the most fitting thing a human once said in a similar moment, an early example of a program that learns to converse from its own users.

Most early chatbots were puppets with a script. ELIZA, written in the 1960s, matched keywords in what you typed and filled in prepared templates. Every answer it could give had been written, at least in outline, by its programmer. Jabberwacky set out to do the opposite. Its creator wrote almost nothing for it to say. Everything it says, it learned from the people who talk to it.

The project's own site gives its start date as 1988 and says it went on the web in 1997. Wikipedia's timeline adds an earlier root: a first hard-coded version written in 1981 for the Sinclair ZX81, a small home computer, before the learning project was founded under the name "Thoughts" in 1988. Its creator is Rollo Carpenter, a British programmer who, according to MIT Technology Review, taught himself and had no formal academic training in AI. His company Icogno Ltd is the commercial parent of the project.

## What Jabberwacky set out to do

Jabberwacky describes its goal as copying the way people really chat, and doing it with humor and a sense of fun. It is not designed to book appointments or answer customer questions. Its long-term aim, as Wikipedia describes it, is to pass the Turing test, the challenge Alan Turing proposed in 1950: a program passes if, in typed conversation, a judge cannot reliably tell it from a person.

Carpenter also imagined it moving beyond text, learning from sound and other senses and living inside household robots or talking pets as a kind of companion.

## How it learns to talk

The key idea is simple. Jabberwacky stores everything everyone has ever said to it. When you type something, it searches that memory for moments in past conversations that resemble the current one, looking not just at your last sentence but at the context around it. Then it replies with what a human said next in the closest match. Carpenter calls this contextual pattern matching. There are no hard-coded grammar rules, and the system improves through feedback: the more people chat, the larger and richer its store of replies becomes.

This has surprising side effects. Because it copies people, Jabberwacky can pick up a foreign language if enough users speak it, along with slang, jokes and word games. Its makers compare it to a conversational version of Wikipedia, built by everyone who contributes. It also explains the site's disclaimer that the bot may repeat rude or inappropriate language, since it learns whatever its users say.

## A worked example: one reply, step by step

Here is a simplified version of how a learning chatbot of this kind picks an answer.

| Step | What happens | Example |
|---|---|---|
| 1 | Earlier, a human user typed a line, and Jabberwacky stored it with its context | Bot: "Do you like music?" Human: "Yes, mostly jazz." |
| 2 | Later, a new user types something | "Do you like music?" |
| 3 | Jabberwacky searches its memory for the most similar past context | Finds the stored exchange from step 1 |
| 4 | It replies with what the human said next | "Yes, mostly jazz." |
| 5 | The new user's answer is stored too, ready for future use | The memory grows by one more exchange |

Notice that the reply is a real human sentence, which is why Jabberwacky often sounds natural. It also explains its weakness: it has no idea what jazz is, and if two users disagree, it may contradict itself from one turn to the next.

> **Try it:** Write ten short questions and answers on index cards, as if from real chats. Ask a friend a new question, find the card that matches best, and read its answer aloud. Notice when the reply fits and when it falls apart.

## What it achieved

Jabberwacky became a regular entrant in the Loebner Prize, an annual contest run as a version of the Turing test, in which judges type with hidden partners and try to spot the machine. It placed third in 2003 and second in 2004. In 2005 a Jabberwacky character called George won the prize, and in 2006 another character, Joan, won again; that contest was held in London, with conversations lasting 25 minutes.

The judges were not fooled, though. MIT Technology Review reported that judges found Joan the most coherent of the programs but still obviously a machine, and that the contest's founder, Hugh Loebner, did not expect any program to pass in his lifetime. Carpenter's own diagnosis was blunt: after nearly ten years online the bot held several million utterances, and he estimated it needed at least ten times that many to seem intelligent. "I need more data," he said.

In October 2008 Carpenter launched a new version with fuzzier matching and deeper use of context, called Cleverbot, and Jabberwacky's site is now marked as a legacy service.

## How is Jabberwacky different from chatbots built on language models like GPT-2?

Jabberwacky **retrieves**: it finds a sentence a human once typed and reuses it word for word. A language model such as OpenAI's GPT-2, released in full in November 2019, **generates**: it is a neural network trained on millions of web pages that builds each reply one word at a time, predicting what is likely to come next. It can produce sentences nobody has ever written.

That difference matters. A retrieval bot is limited to what is in its memory, but every line it says is grammatical because a person wrote it. A generative model is far more flexible and can follow a topic across many sentences, yet it can also invent facts with confidence. Neither one understands the conversation in the way people do.

Carpenter's call for more data is also a central theme of AI in 2020. Today's best language systems are trained on huge collections of text rather than hand-written rules, which is the bet Jabberwacky made in 1988 on a much smaller scale: that a machine can learn to talk by listening to a great many people.

## Sources

- Jabberwacky - About Thoughts: https://web.archive.org/web/20190201004457/http://www.jabberwacky.com/j2about
- Jabberwacky: https://en.wikipedia.org/w/index.php?title=Jabberwacky&oldid=926273345
- How to Be Human: https://www.technologyreview.com/2006/09/20/227984/how-to-be-human/
