Markov chains provide an easy way to generate plausible-sounding nonsense in a chatbot. They aren't particularly useful for serious purposes, but they can be used for an entertainment bot or to lighten the conversation with occasional silliness.

What is a Markov chain?

A Markov chain is a statistical process built on a state machine. In computational theory, a state machine is a physical or virtual machine that has some number of discrete states. It transitions from one state to another according to a set of rules. In a Markov process, the rules are based on probabilities. Given the machine's current state, there's a specified probability for one or more states that it will go there next. It could stay in the same state if that's appropriate.

When a chatbot uses this method, it will produce a piece of output to go with the state transition. This lets it construct sentences that are different every time but are more or less coherent. The starting state can be based on the user input, giving the response some relevance.

How does a Markov bot respond to users?

For instance, suppose the user asks "What is the secret of the universe?" The bot might pick up "universe" as a keyword to select its starting state. It could start by picking from one of several universe-related phrases and build up a reply by random association. It might be something like "Space is / a remarkably / delicious drink / made from / recycled cork boards." The response will usually look like nonsense, but once in a while its answers might be mistaken for profound philosophy.

A Markov chain bot could imitate a well-known person's style. It would take a large collection of sentences the celebrity has said and construct its states and probabilities based on them. Some bots of this kind might even adapt over time, "learning" new states and probabilities from new input. A bot could learn to imitate its users or work current headline topics into its output.

While this type of bot isn't a serious application of the technology, some people could take its output seriously. It should be used with caution.

Contact us to get your own chatbot

More about chatbots

Chatbot use cases in industries

Chatbots are more versatile than you may think. After all, it is just an interface technology. Chat, speech and messaging interfaces are very flexible. We’ve gathered different kinds of popular use cases in varying industries. Check them out to see what are the most popular use cases in your industry!

Read More »

Better public services with chatbots

Many services which government call centers now handle could benefit from chatbot support. Some of these areas are: General information. Queries about locations, hours, and deadlines make up a large portion of call center activity. Chatbots can provide this type of information without making people wait. The users retain the text of the response for

Read More »

How Chatbots Will Improve The Customer Experience

How will AI (artificial intelligence) chatbot be the solution for the modern day customer service? Satisfying the customer expectations has always been a hot-button issue for companies to tangle with throughout all industries. Nowadays people are getting more and more accustomed to interacting through social media, mobile apps and email. Therefore, the demand for better

Read More »

Introduction to Discord bots

The rise of online chat rooms has, in recent years, seen an explosion in the number of intelligent chat bots that can offer a range of services. They are an example of conversational design that offers a human-like interaction through computer text. Discord bots can do many things to create an enhanced human experience, including

Read More »

Do you really need an AI chatbot? Button vs AI-driven chatbots

Some chatbots let users enter natural-language questions. Others only let them enter predefined choices using buttons or menu items. Both approaches have advantages in the right situation. The advantages of buttons Button-based chatbots are far simpler to program, so they cost less and don’t take as much time to set up. No artificial intelligence is

Read More »

Fun with Markov Chain Chatbots

Markov chains provide an easy way to generate plausible-sounding nonsense in a chatbot. They aren’t particularly useful for serious purposes, but they can be used for an entertainment bot or to lighten the conversation with occasional silliness. What is a Markov chain? A Markov chain is a statistical process built on a state machine. In

Read More »