3 Dimensions of the Context problem in Chatbots

Proposed solution using SEAM controllers

Amit Gupta
KritiAI
4 min readApr 3, 2017

--

The main problem in creating chatbots is the problem of context.

Why is the context so difficult in chatbots?

There are 3 dimensions to the context problem:

  1. Context identification
  2. Routing based on context
  3. Fulfillment based on the context

Before discussing chatbots, let’s look at a simplified illustration for the flow on a webpage:

  1. When the user clicks on a link (e.g. “/about-us), the context identification is done by the browser which forwards a request to your server.
  2. Your web server (e.g. apache, nginx, nodejs) does the routing to a specific function in your application logic or a specific script file.
  3. The script then pre-processes the page for the “/about-us” context and sends it back back to the user.

As we see for a webpage flow, the contexts are simplified, the routing is seamless and fulfillment delivery is frictionless. If there is an issue, there are well defined error protocols (e.g. 404, 500) to indicate type of failure and allowing seamless fallbacks.

Now coming back to chatbots…

Problem Dimension 1: Context identification

The user can respond with anything at any point in the flow.

  1. Buttons or quick-replies in the previous message: valid input
  2. Buttons from an old message or menu: context switching
  3. Text input: can be valid, invalid, partially valid, requires NLU
  4. Image input: can be gif, jpg, png, bmp etc.
  5. Emoji only: requires sentiment analysis, limited-use input
  6. Video input
  7. Audio input
  8. File input
  9. Location input
  10. No input

Problem Dimension 2: Routing based on context

The chat channel api will forward the input to your webhook endpoint. The key issues with internal routing to processing are:

  1. All events from all users chatting with your bot are sent to the same end point.
  2. Your chatbot code has to do the session management and keep a session data store.
  3. The code should now identify the exact file or processing function to which the input should be routed based on context and session state.
  4. Your end point now needs to make sense of above 10 input scenarios and compare it with the last message context.
  5. The processing function will identify and prepare what is the next response to the user based on the input provided.

Problem Dimension 3: Fulfillment based on the context

  1. Now based on whether the input is valid, invalid or partially valid, the code will have to decide on where to route the user.
  2. During fulfillment there can be multiple scenarios which will reset the context of the conversation flow and need to be noted by the application logic for the next message from the user.

Complex Challenge for Programmers

The three dimensions of the context problem make it a big challenge for programmers working on giving shape to the UX design flow into a conversational product or a working chatbot.

Each step of the UX flow adds an additional layer of complexity which is not a linear graph. The effort in making a 10-UX-element chatbot vs a 30-UX-element chatbot is not 3X, it is several magnitudes more complex.

Proposed Solution: SEAM Controllers by Kriti AI

The Kriti AI platform addresses the three dimensions of the context problem, by providing a virtual routing engine to your chatbot application logic. We call these virtual machines SEAM controllers (Stateful Engines over Abstracted Mediums).

The Kriti AI chatbot platform provides a 1:1 direct connection between a UX element on your conversational UX with a specific function in your code. This allows you to write highly effective IFTTT code at a fraction of time and effort. The effort complexity now becomes linear whether you have a 10-UX-element-chatbot or a 50-UX-element-chatbot.

The SEAM controllers automatically handle the context regression and context switching and route the user input to the exact function in your code to handle it.

You will still have to write your business logic, but the problem of context is handled behind-the-scenes by the Kriti AI SEAM controllers.

About Kriti AI

Kriti AI is the cutting edge 2nd generation chatbot creation platform. It provides a new set of technologies and toolsets for the innovative chatbot creators who are making conversational AI products.

The overall architecture reduces the learning curve for developers programming the conversational chatbots.

The production times are 4x to 10x faster, and it gives the power to create chatbots which are 10x to 100x more complex and intelligent than those created by existing early first generation platforms.

Our early partners have created innovative conversational products in record time and are getting good traction, including selection into accelerators and industry programs.

Get Started

The documentation is published at https://docs.kriti.ai :

If you want to discuss how this can help your conversational product or set up a demo meeting, or talk about an MVP, do feel free to email me at: amit [at] kriti.ai or reach me on messenger.

Subscribe to this medium publication if you are interested in chatbots and the cutting edge of bot making technology tools.

--

--