Building a Helperbot

Part 2: The Backend

Now that I have the design for the basic chatbot (see part 1), its time to build the actual application that it will live in.

The Idea: Simple Product FAQ’s

Basically, when you launch a product or service, your brand new users have a ton of questions about how to use it.

Those questions are usually super repetitive and fill up your inbox.

So instead of answering 50 different people with the same answer, why not build out a simple support page for the product and let a Helperbot talk to your users for you?

The Solution

So the idea then is to create something that makes generating and designing your product FAQ’s insanely simple .

Then each project you launch get’s designated it’s own Helperbot, who can answer users’ questions for you (…hopefully. Let’s see if this works!)

So Let’s Go

Okay so here’s the basic idea: A user creates a project. A project has several topics within it. Then, each topic has a unique set of FAQ’s & tips within it. Straightforward enough.

After a little bit of time and some tinkering, I think I’ve got a nice little foundation. Here’s the default template layout so far for a new project:

I’m scratching my own itch here by building a page that shows you how to use Helperbot (you could fill this in with your own unique product instead though).

On the left we have the basic info about the current project/product, on the right we see the breakdown of topics. Each topic has a set of common questions and answers listed inside.

Adding the Chatbot

So now, with the basic structure setup, it’s time to incorporate Helperbot.

If you look at the bottom-left corner of the above image, you can see I’ve already added Helperbot into the product.

But currently he’s a blackbox. He’s not interacting with the project. Instead he’s still just running off a hardcoded script of responses.

So let’s fix that.


I don’t know a ton about chatbots, so the next steps here will mostly be me testing hypotheses.

That being said, here’s the basic breakdown of what I’m going to try to do first. Each time a user asks the bot a question I want to:

  • 1) Grab the user’s message.
  • 2) Compare the message against a bank of generic words (ex:
    ‘I’, ‘you’, ‘me’, ‘it’, etc.) and strip out any matches.
  • 3) Assuming that what’s left can be treated as key words, next iterate through what’s left and try to find matches against the current projects FAQ’s.
  • 4) Place each match into a results array.
  • 5) Return the results array to the bot.
  • 6) Sanitize the user’s original message and display it back into the chat window.
  • 7) Display responses through the bot based off the what was found.

After some more tinkering based off the steps listed above, I think I have a rough Version-1 that works!

This seems to work pretty well which is awesome! ..However there’s some pretty obvious issues.

For one, right now the way I have it setup, Helperbot will only return the first match that he finds and places into the results array.

On top of that, Helperbot is searching by each keyword individually.

This means if a project has more than 1 answer in it that can be found from the same keyword, the odds of the bot returning the relevant answer quickly diminishes.

So next up, I’m going to try to work on resolving some of these issues by implementing some type of full text search.