A
A
Alexey2020-04-08 01:38:14
Neural networks
Alexey, 2020-04-08 01:38:14

What is the easiest way to teach a bot to respond?

I have a database in MySQL in which there are 4 million rows with messages from telegram chats. All messages from Russian-speaking chats
5e8cfeb938e8d795328042.jpeg

Now the bot rolls a die for each message that he "read" and if there is a chance -
1) takes the original message on which he "stripped"
2) separates it by spaces
3) takes all words longer than 3 characters
4) Goes in sphinx (which indexed the very database with messages) and gets all the messages in which any of the words of the original message occurs
5) "trains" the Markov chain model.
6) If the Markov chain gave a result, it answers with the result. Otherwise, take a random message from the selection of item 4

As a result, we have an almost 90% chance that he will respond with just someone else's message, and not the result from the Markov chain.

5e8d00d2644be122721607.jpeg

Actually a question. What is the easiest way to improve the algorithm? The bot is purely entertaining. I want the bot to answer at least somehow interesting (even if it’s not quite right, let it confuse declensions, spelling, grammar, but keep the topic or just amuse the people with their crooked speech). I am not familiar with modern ML, NN technologies. But the task does not look VERY difficult. How would you implement a conversation bot?

Bot on NodeJs. ready to rent a wheelbarrow for training any model. Everything that was googled is either outdated or does not fit my data.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question