Photo by Marc Kleen on Unsplash

A Brief Overview Of Cisco MindMeld

MindMeld Is An Opensource Conversational AI Platform For Deep-Domain Voice Interfaces & Chatbots

Cobus Greyling
8 min readJan 15, 2020

--

Introduction

The Current Conversational AI Landscape

Natural Language Understanding (NLU) and Natural Language Processing (NLP) can generally be divided into two groups…

On the one hand are the cloud based NLU & NLP tools which can assist you in speedily building a conversational interface, for instance a narrow domain chatbot for weather etc.

Cloud Based NLU / NLP Services From Major Vendors

These cloud based services are generally provided by the big technology companies like IBM, Google etc. They form part of a much bigger cloud solution, typically configuration can be performed by making use of a web based interface. Little to no coding is required and a complete NLU API can be configured and setup with just a Graphical User Interface.

Positives

Ease of access, relatively powerful tools are available to anyone with a credit card and email address. Configuration and setup can be quick, wire-framing and prototyping are easy.

These solutions generally make provision for the four pillars of a conversational interface. These pillars are intents, entities, scripts and dialog flow (state management).

Negatives

Due to the ease of setup and configuration, often not enough time is spent on the architecture, and invariably problems are experienced with scaling. Data is kept in the cloud, and protection of private information legislation can be a challenge.

Cost is always a consideration and control is handed over to the technology company; the ease and access of a local installation is not possible (in general).

On the other hand there are a whole host of NLU / NLP tools which are open source, powerful and can be locally installed. State of the art algorithms are available with generally excellent documentation. Prototyping and demo applications can fairly easily be created.

Generally Available NLP / NLU Libraries, Often OpenSource And Can Be Locally Installed

Positives

Special hardware is in most cases not required and making use of virtual environments like Anaconda, installations can be performed efficiently on a PC and visually impressive demonstrations and prototyping can be performed.

No cost is involved, and NLP API’s can be created to use within an organisation. Where local installations are not possible, environments like Jupyter Notebook can be used for installation, prototyping and demos.

Negatives

These tools are exceptional for intent and entity detection, but building a Conversational AI (chatbot) requires a framework of dialog management, state management, scripts and integration points.

These crucial components are not included and will need to be built. The time to launch a market ready Conversational AI solution based on these environments are often underestimated.

Something In Between

Between the two extremes mentioned, there is a chasm which is addressed by two Conversational AI Frameworks. The one being Rasa, and the other Cisco’s MindMeld. Mindmeld even has a converter module which assist with the migration from Rasa to MindMeld. Rasa’s interactive training approach and deprecation of the state machine is exceptional. The fact that Rasa Core and Rasa NLU can be used modularly is also an advantage.

Open Source Conversational AI from Rasa and mindMind

So These frameworks are complete solutions addressing all the main components of a chatbot.

These components being intent detection, entity recognition and extraction, Dialog/State Management, and scripts.

The frameworks have a complete NLU component, can be installed locally, or on a private cloud. The implementation affords freedom in development and customization which the so-called enterprise grade solution cannot match.

With Mindmeld openly competing with Rasa in this space, and with more time on their side in terms of development history, I find Rasa is much easier to configure and make sense of, than Mindmeld. Putting together a user story or customer journey is also straight forward in Rasa.

First Impressions of MindMeld

Basic Overview

MindMeld is a python based machine learning framework for Conversational AI. Open-source libraries which are used include Tensorflow, scikit-learn and NumPy.

Elasticsearch is used to power the Question and Answer portion for MindMeld. Data can be structured in a JSON format, and made searchable by making use of Elasticsearch. This acts as a knowledge base resource available within MindMeld.

Knowledge Base Implementation

When an user enters a dialog the message is taken and on a high level, domain classification is performed. Domains can be seen as categories like weather, scheduling, music, traffic etc.

Once the domain is identified, the next level is intent recognition. From here intents are broken down into intent types; for the intent stores, the following types can exist: sport_store, art_store, hardware_store etc.

Intents can also consist of roles; the intent class can have the roles of start_time, end_time and location.

Entities are extracted from the user’s input and resolved to a canonical value. “CPT” can be resolved to “Cape Town” etc.

Installation

For the installation made use of an AWS EC2 instance running Ubuntu 18.04. Using this OS makes the the installation process much easier and far less tedious. During setup of the EC2 environment, be sure to catch the *.pem file, in order to connect remotely with a SSH session. I was able to perform all installation, configuration and testing via a SSH session.

The Example NLP Model Hierarchy

Installing Elasticsearch can be long-winded, but if you run Ubuntu, there is an install script; which makes it a straight forward process. I created a virtual environment, installed the dependencies (python 3.6) an eventually MindMeld itself. The installation can be verified with the command “mindmeld”. Elasticsearch needs to be running in a separate shell.

MindMeld provides advanced capabilities for dialogue state tracking, beginning with a flexible syntax for defining rules and patterns for mapping requests to dialogue states. And because MindMeld is fully extensible, you can supplement MindMeld’s built-in pattern matching capabilities with whatever custom logic you need.

Getting A Project Up And Running

To start a basic conversation via the command line, the easiest is to install and run a blueprint project. A few options are available covering different use-cases. The blueprint can be used as a baseline and changed and augmentation can be performed in a controlled and already working environment.

Organizing Your Data

Labeled query files are the primary source of training data for the MindMeld natural language processing classifiers.

Labeled Queries query files are text files containing example user queries and MindMeld uses this to train the domain and intent classification models. Labeled query files also support an inline markup syntax for annotating entities and entity roles within each query. These annotations are used to train both the entity and role classification models.

All labeled query files belong in the domains folder. Each domain and intent sub-folder should contain labeled query files that apply only to that intent. The hierarchical structure of the domains folder provides the classification labels used to train the domain and intent classification models.

Entity Mappings

Entity mappings are JSON files which associate white-listed alternate names, or synonyms, with individual entities. MindMeld uses entity mappings to train the models required for entity resolution. These files belong in the entities folder.

Entities are ordered as sub folders under a folder named “entities”. Each sub-folder forms an entity type, and the data for each entity is stored in a mapping.json file with a white list and canonical name.

Here is an Example of the Organization of Entities with White List and Canonical Name

Intents are listed as sub-folders under a folder called domains. Each intent has its training data file. The entities are defined contextually within the intents with the entity type defined after the pipe.

Intent Training Data

As the example shows, each inline entity is appended by the pipe character followed by its associated entity type, then the entire expression is enclosed in curly braces. Annotations for names of system entities, which are built into MindMeld, begin with sys_. In the example, time is a system entity. This simple annotation scheme provides a convenient way to label entities in order to derive the training data required to train the entity recognizer models.

Conclusion

MindMeld Focus Areas

  • MindMeld is the technology behind Webex Assistant, a voice assistant that enables collaboration across Webex Board and Room Kit devices. MindMeld supports language understanding components of Cisco.com search and its affiliated intranet search sites. Cisco partners and external developers use MindMeld to build successful deep-domain conversational AI agents.
  • Knowledge base creation and search with Elasticsearch integration. This is seen by Cisco as a big differentiator. After installing and running the solution, it reminds much of IBM Watson Assistant integration with Watson Discovery.

According to the MindMeld Documentation:

The MindMeld platform architecture contains four main components:

The natural language processor contains all the classifiers and resolvers to understand human language

A knowledge base containing all the domain-specific objects for a particular application

A dialogue manager that handles dialogue flows

The application manager, which interfaces input/output with various external services.

Positives

Installation and prototyping was straightforward and the blueprint applications serves as an excellent reference.

Setting up and compiling intents, entities and test data was a breeze…

Not So Positive

I get the feeling setting up more complex dialogs and customer journeys can get tricky. Personally I will still opt for Rasa if faced with a choice, merely due it its strong and active community, developer resources and logical configuration. Also the fact that Rasa components can be used as separate modules; Rasa Core and Rasa NLU.

Rasa installation seemed easier and less tricky, especially when Anaconda is used.

--

--

Cobus Greyling

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com