I have an interest in designing tools to model "conversational AI". There are many NLP tools to extract single intents and entities, the nodes on a graph. But there are few tools to model the connections between these nodes, the edges.
I'm especially interested in combining top-down authoring models with a bottom-up training data and machine-learning approach.
Ideally a system can be trained by people simply using it, blending the training and using activities into one. It should be helpful from task one. The system should deliver enough value that using it saves time, while the knowledge is transparently retained by the system to improve efficiency for future sessions.
Here are a couple of interactive code sketches that model different ways to build these conversational flows for a basic customer support system.
This model I call
GRAFR shows a chat view at left overlaid on the conversation graph on the right.
We would build a basic skeleton of the topic with basic answers to act as a starting point.
I provide a simple YAML format for defining nodes and possible answers.
Agents can then use a UI to choose the best answer to any customer question. By picking from the presented options we use reinforcement learning to train the system. The thickness of the lines indicates how often each choice was made.
As a conversation reaches the end of the known knowledge base, agents can also add their own answers to extend the system.
I also added some gamification to the conversations. The hearts indicate the number of turns the conversation took to reach this point. Shorter conversations = happier users! In future this can play into graph analysis and route planning to find the best paths to answers.
I also provide for a summary of the path taken, so that if the conversation has to be resolved by a human user they can quickly get a digested view of the questions that were asked up until this point.
Built with CytoScape and React.
The FLOWr sketch aims to provide a more linear visualizaiton of conversation flows using a sankey graph. Thickness of lines shows the percentage of users flowing through each route.
Different user questions are clustered together, and we provide a word-cloud as a cluster preview, to get a quick feeling for the node.
The system can be used for log review, but also for a "human-in-the-loop" to step in and add a realtime response. Icons show users who are waiting on that node of the conversation, and one-click buttons allow an agent to send a preset reply, or an empty box to add a new custom reply and extend the conversation graph. The animation is also intended to give a view of "velocity" through the system, to indicate paths that may have fewer steps but are taking a longer time to complete. This is the case when some topics have more available and relevant agents to route to.
This system can also be used as a meta-review tool for conversation designers to step through conversations with human agents responses, and check the quality of the human responses.
Built with D3 and React.