Eve

A virtual dating assistant

assistant
DSa
NK
DSc
SN
LE
DHBWUniversity
3 months2018
Go, PythonTech

What is eve?

"Eve" is our chatbot that uses a mix of artificial intelligence and static responses to mimic realistic conversations between students. The Project was part of the three-month university course "software engineering II" and was built by Niklas Korz, Daniel Scholz, Simon Niedermayr, Daniel Salomon and Me. The user can ask questions and receive, either pre-defined or procedurally generated, answers, which are influenced by his previous messages.

Corpus

The corpus of the model consists of our own exported chat histories from WhatsApp & Co. This helped us to recreate a more realistic conversation, which for example also led to our model using emojis correctly. The chat exports were then processed by our parser, where the chats were normalized and tokenized and finally exported into two files: a vocabulary and a set of questions & answers. For the parser, we used a mix of JavaScript and Python.

Chatbot

For our chatbot, we used a unidirectional LSTM encoder-decoder model, which is also used by OpenNMT. In addition to the chatbot model, we trained two other models. One model to recognize predefined patterns (PatternAnalyser) and one model to determine the mood of the conversation (MoodAnalyser). The pattern analyser allowed us to give predefined answers to certain questions depending on the mood. For example, what the chatbot's name is or how old it is. Mood dependent questions would be "How are you?" or "Do you like me?". A full list of our predefined answers can be found here.

Architecture

We chose a modular system architecture so that the team could easily work on individual components. For our backend, we used Go and Python, not only because it is the standard in AI chatbot development, but also because some of the team had prior knowledge of these programming languages. The WebApp can communicate with the WebServer over WebSockets or REST. The WebServer authenticates the user, saves the message and relays it to a running bot instance. The WebServer can manage multiple instances of chatbots to improve the performance of the application.
WhatsAppWebAppParserModelexporthttp/websocketuser datapre-definedanswersmessage &historyanswermood &affectionif no patternmatchesif patternmatchestrainTrainingArchitectureGolangPythonWebserverMessageHandlerBotRouterStatic AnswerHandlerPatternRecognizerRequestHandlerMood AnalyzerModelDScDScNKNKSNLELELEDSa
We are using state of the art artificial intelligence to generate the best answers for your conversation.Generative Model Recognizing the mood, the topic and the context is essential for a good conversation.Context RecognitionSelective ModelTo simulate a human conversation, certain random character traits are defined.