Ok, I'm developing a chat bot for a client. But I'm having a hard time figuring out the best way to do this.

Because the bot isn't that big, I thought use a table with the phrase and the response. Then use LIKE. Not as easy as I thought though.

Lets say I had the phrase "server down" and the response was "please contact db@site.com". If the user typed in "Help, my server has gone down today for about 5 hours what can I do".

.... The issue is how should that be fed into the database to get that response?

Someone recommended creating a blacklist of words, like 'help', 'my', 'has', 'gone', 'today', 'for', 'about', 'five' .... Or a white list of common words.

Sort of lost. What would you recommened. I cant find anything on Google about it.

Whether you use a blacklist or a whitelist... I think you must create the one which is smallest and/or with the least impact. I think a blacklist would be smaller, if you allow no words smaller than 4 characters to be used anyway.

You could add tagging to a response. So for example in your example the response is tagged with 'server' and 'down'. It would be possible to create a search on the tags.

I created a simple chat bot a year or so ago now. The way i went about it was to store keywords in the database that relate to a specific question, or desired output. (This is compiled with a very simple form)

To search the database I break the input down into an array of single words and use a group of functions to search for the entries whos keywords are all in the input array. I can if i want have a selection of different outputs for any set of keywords.

-- I did say it was simple! --

This is a very basic method but it does work. and allows an automated response from a "question".

A lack of spare time has prevented me from developing my chat bot much, but I would love to have a system that not just replies but can ask related questions back and be a little more interactive than just a dead end response, I have some ideas for that but its a huge task, and somewhat complex! If anyone has any ideas on how to structure this I would like to hear from you.

i also developing chat bot application as same above mentioned that means our chat application generate the autoresponse to the question of visitor ....i am very confused in database design and searching techniques plz tell me how i do this

Perhaps you should rephrase your question, so it is clear what you want. Please post it in a new thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.