• About (chat)bots • How to code a chatbot • About user data • Rise of the machines • How to survive the robot uprising Fundamentals of 'Natural Language Processing'
many companies run chatbots as messaging apps or simply via SMS • Maybe you do not want to buy your new shoes by using a chatbot... • ... but maybe you want to contact your insurance with the help of a bot @hendrikEbbers About Chatbots Botti
Chatbots • Chatbots can bet very helpful when • you want to break down a complexe work fl ow to an enduser • the given functionality is not joyful for the user (like shopping would be for example)
Chatbots • The quality and functionality between chatbots differs a lot • Most simple chatbots are just based on work fl ow with multiple choice • In general we can differ between rule based and AI based bots
in Enterprise Let's start a conversation... Looks like the bot is busy doing important stuff It took around 20 sec for the first answer Let's start with an easy answer
Practices for Chat-Bots • Make sure your chatbot has (a voice and) a character • Use buttons that eases navigation and improve UX (when possible) • Provide users an easy exit
Practices for Chat-Bots • Make sure your chatbot has (a voice and) a character • Use buttons that eases navigation and improve UX (when possible) Great example for a dynamic selection list Much better than typing numbers https://research.aimultiple.com/chatbot-best-practices/
Practices for Chat-Bots • Use creative fallback responses • Always have a button that directs user to a human • Work with experts and test, test, test Is your friend java.util.Random
build a Chatbot • Several services / apps / tools provide interfaces for custom chatbots • Next to this chatbots can be created as stand alone software / custom integration in software
build a Chatbot • In general each chatbot is a simple observer • If you understand the observer / listener pattern you can create a chatbot • Let's have a look at a sample I can hear you
build a Chatbot final API api = API.create(CONNECTION_TOKEN); final Channel channel = api.getChannel("general"); channel.observe(EventType.NEW_MESSAGE, event -> { channel.sendMessage("Hi " + event.getAuthor()); }); Connection to service (like Discord) Listen & react to new messages
build a Chatbot final API api = API.create(CONNECTION_TOKEN); final Channel channel = api.getChannel("random"); Executors.newSingleThreadExecutor().execute(() -> { while(true) { sleepTillMorning(); var m = "Today I try to take over the world!"; channel.sendMessage(message); } }); Interact directly with Service
your Chatbot in Discord • Discord (and others) provides an easy way to register bots to servers (BUILD-A-BOT) https://discordpy.readthedocs.io/en/stable/discord.html
Data • Even with the given trivial examples a lot of data can be collected ... • ... and stored ... • ... and used to fi nd out more information about the users
Data • Now we can easily estimate / calculate when a user is normally online / at home • Now we can calculate relations between users • Now we can extract interests of users
the word • People that are much smarter than me can no extract individual & private information • ... and create an individual user pro fi le • ... and let the bot interact in a speci fi c way based on pro fi le More diabolic
ChatBots • More and more ChatBots after based on AI • AI allows more complexe work fl ows • Until now we looked at simple rule based chatbots • Let's imagine what a AI based bot can do...
Network Models "Generative Pre-trained Transformer (GPT) are a series of deep learning based language models built by the OpenAI team. These models are known for producing human-like text in numerous situations." https://research.aimultiple.com/gpt/
Network Models • Generative Pre-trained Transformer 3 (GPT-3) from OpenAI is the most complexe model that is known today Section shown on previous slides GPT-3 trained on 40GB of text
Model • 75 billions of parameters (T-NLG-Modell from Microsoft has 17 billions) • The model worked so well that the creators themselves became afraid of it.
"The latest GPT model, GPT-3, is closed source as Microsoft has licensed its exclusive use. This was widely criticized in the tech community as OpenAI with its mission to bene fi t all humanity, has chosen to work exclusively for the bene fi t of one of the largest tech companies." https://research.aimultiple.com/gpt/
Learning • Machine learning (ML) is the generic term for computer algorithms that can improve automatically through experience and by the use of data. Art Deep Learning Machine Learning Arti fi cial Intelligence
learning de fi nes machine learning methods that are based on arti fi cial neural networks • Uses multiple layers to progressively extract higher-level features from the raw input @hendrikEbbers Deep Learning
• TensorFlow is a free and open-source library for machine learning and arti fi cial intelligence. • TensorFlow provides APIs for Python, C, C++, Go, Java, JavaScript and Swift • Third-party packages are available for C#, Haskell, Julia, MATLAB, R, Scala, Rust, OCaml, and Crystal Developed by Google https://github.com/tensorflow/tensorflow
Language Processing • Natural language processing (NLP) is a sub fi eld of linguistics, computer science, and arti fi cial intelligence • Research on how natural language can be processed • Can be used for text & speech Now I can even shout at you !
Language Processing • Example use cases for NLP: • Google Translate • Siri / Alexa • Autocorrection in word processing tools • The Star Trek computer (voice)
Platform • Platform based on enterprise search, language analytics and arti fi cial intelligence • Rule-based, statistical and neural AI tools are available for the implementation of customer requirements
Test • Originally called the imitation game by Alan Turing in 1950 • Test a machine to exhibit intelligent behaviour equivalent to a human. • If a human does not notice that a chat partner is a machine the test is passed
Test • In 2014, chat-bot named Eugene Goostman passed the Turing test when it received votes from 33% of the judges who believed that the chat-bot was human. • The chat-bot mimicked the personality of a 13-year-old boy. • Thoughts regarding GPT-3: https://bit.ly/2XjRvY6
Robot Uprising • Arti fi cial intelligence becomes more mainstream every day • Already today we need to think about AI and ethics Racist robots - How do we eliminate AI bias?
Robot Uprising • We as developers should check what kind of data is stored by applications and services • Everyone of us needs to be aware of problems and issues that we will be confronted with in near future