the journey to conversational interfaces
TRANSCRIPT
The Journey to Conversational Interfaces
Romin Irani | Xoriant | @iRomin
Agenda
Chatbot Ecosystem
Our Story
Help Desk Bots
Initial Target Platform - Slack
NLP + ML + API.AI
Go Language
Chatbots! Chatbots! Chatbots!
It is usually another way to interact with your Web Application, API or Mobile Application
Multiple Messaging Platforms
“Chatbots” are expected to be “The Thing” to do in 2017 ;-)
Rule-based v/s AI
● /find * contains=`xyz`● /find pdf since=2d
● I’d like all documents that contain “xyz”
● Get me all PDF documents created in the last 2 days
Why Slack ?
Popular Messaging Platform
Integrates with Popular Applications
APIs for Custom Integration
Good Documentation
App Store
Starting point to learn more
Respond to Questions
Notifications
Customized Bot
Analyze
Slack API - Go Language packages
You can do everything with standard Go packages
Alternately, here are a couple of packages to consider:
https://github.com/nlopes/slack
https://github.com/bluele/slack
Skills needed
Basic Go Syntax (Struct, Dealing with JSON)
HTTP Basics + Go Language http packages
Respond
Notify
Analyze
Respond/ticket list
Reporting Issue - Slash Command
Slash Command → Messages that start with a slash (/)
For e.g. /ticket or /report or /search
/ticket listlist
Handling a Request from Slack
http.HandleFunc("/ticket", MyTicketHandler)
func MyTicketHandler(w http.ResponseWriter, r *http.Request) {
//Extract out multiple params from Request
//Validate if the request is coming from Slack and your team
//Perform business logic
//Compose the Response Struct
json.NewEncoder(w).Encode(/* Slack Response Struct */)
}
Slack Incoming POST parameters
token=oyIQ0AjzcBNgxGMcIsEumUpQteam_id=T0001team_domain=examplechannel_id=C2147483705channel_name=generaluser_id=U2147483697user_name=romincommand=/tickettext=listresponse_url=https://hooks.slack.com/commands/1234/5678
Slack Message Formats - 1
{ "username": "Server Monitor" "text": "Cloud Storage Service is facing intermittent issues.\nhttp://status.cloud.google.com",}
Slack Message Formats - 2{ "attachments": [ { "title": "New Ticket: Printer is not working", "title_link": "https://api.slack.com/", "text": "The Printer is not functioning….", "fields": [ { "title": "Priority", "value": "High" }, { "title": "Reported by", "value": "romin", } ], "footer": "My Help Desk system", "ts": 1395676789 } ]}
Notify
Sending Notifications - Incoming Webhook
A mechanism to post a message to a Channel or a specific user
New Tickets are routed as Notifications to respective Channels (Teams)
Updates to Tickets are routed to the specific Users
v := url.Values{"payload": {string(b)}}http.PostForm(WebhookURL, v)
Analyze
Analytics - Outgoing Webhook
Calls your Webhook based on messages sent in a Channel
Any message or specific Trigger Words
Track Command Usage , Sentiment Analysis and more
Explosion of Commands…
/ticket list/ticket create <title> <details> <priority> <department>/ticket update <status> <comment>/ticket close <id>/ticket view <id>/ticket help
….
Can we do better?
General AI Agents
Messaging Platforms
NLP , AI as a Service Platforms
Frameworks & DeploymentPlatforms
Source: https://www.oreilly.com/ideas/infographic-the-bot-platform-ecosystem
Our current architecture
Messaging Platforms
NLP
Integrations
Machine LearningDomains
Bot Endpoint + Logic
Diagram inspired from : https://rasa.ai/
Which tickets are assigned to me?
User input in Natural Language
1
NLP Tool
2
intent : tickets_search,entities: status : open, user : romin, Max_count : 5,
Structured Data3
Here are your tickets:1….2…3….
Bot output in Natural Language
5
How it works?
TicketsAPI / Database
4
Lessons Learnt
Go + Slack is a powerful combination to get going with your Bots.
Need to target most popular Chat platforms.
Build v/s Buying a Machine Learning Engine. Good Alternatives out there but choose carefully.
Voice Interfaces.
It is a journey.
Thank You