beyond the hype
agent able to imitate and have human-like conversations that may result in the execution of actions
productivity tools, automate tasks, book flights, get recommendations, find restaurants, personal assistant, customer service, etc
ex. "ber mifatura"
extract intent + entities
robot.respond /switch off the (.*)/i, (res) ->
device = res.match[1]
if device is "television"
// do something with intent “switch off” and
// entity “television”
else
// do something else
<aiml>
<category>
<pattern>WHAT ARE YOU</pattern>
<template>
<think><set name="topic">Me</set></think>
I am the latest result in artificial intelligence.
</template>
</category>
</aiml>
"Ey bot, switch off the television"
intent: turn_off_device
entities: [device = television]
model trained
with a "large" data set
"A Neural Conversational Model", Google 2015
- Who is the president of the US?
- Donald Trump
- How old is he?
Multichannel support
SDK available in node.js / .net
Support from microsoft
Cognitive Services suite
Additional network element
Always doing catch up
const restify = require('restify');
const builder = require('botbuilder');
// Setup HTTP Server
let server = restify.createServer();
server.listen(8080, () => {
console.log('server listening');
});
// Create chat bot
let connector = new builder.ChatConnector({
appId: process.env.MICROSOFT_APP_ID,
appPassword: process.env.MICROSOFT_APP_PASSWORD
});
let bot = new builder.UniversalBot(connector);
server.post('/api/messages', connector.listen());
// Add dialogs
bot.dialog('/', (session) => {
session.send("Hello World");
});
http server + dialogs
git clone git@github.com/Telefonica/seed-bot.git
cd seed-bot
npm login # request access to tdaf@tid.es
npm install
npm run dev
import { Bot, BotConsoleRunner } from '@telefonica/bot-core';
const bot = new Bot({
plugins: [ 'bot-plugin-helloworld' ],
modelMapSet: [{
'en-us': 'your-luis-app-url'
}];
});
new BotConsoleRunner({ bot }).start();
import { BotBuilder } from '@telefonica/bot-core';
let plugin = new BotBuilder.Library('notes');
plugin.dialog('builtin.intent.note.create', create);
function create(session: BotBuilder.Session) {
session.endDialog('Note created');
}
export default plugin;
Rufus - es_un - perro
perro - numero_patas - 4
SELECT *
WHERE {
Rufus es_un ?animal .
?animal numero_patas ?patas .
}
- Cuántas patas tiene Rufus?
- 4
Sentiment Analysis, Language Classification