I've bin asked to create a chatbot to provide an answer to the FAQ.
I started writting my own that takes the question and searches for a combination of keywords, based on thoose keywords it provides the user with an answer.
All the keywords and answers are hardcoded. The projectmanager dosn't like that to mutch, for someone reasson he believes that when you implement an ai and the information changes, like the procedure for when you sick, the ai automaticly will know, which offcourse is bs, if you don't tell the ai the information has changed, how would he know.
I think he's looking more for something that uses a knoweledge base, so that question and answer can easily be adjusted.
He would like me to use an excisting service like
Q&A maker,
fobi.io or
botnation.
Although most of thoose service apear to be free at first glans, they're really arent, for Q&A you even need a creditcard.
I was also looking at IBM Watson, but I'm suposed to give a poc, I only had 2d total to create the app, tommorow afternoon and that might take to mutch time.
I have litle to no experience with javascript, yet I managed to right everything in html, css and js, lukely js and
java are verry mutch a like when it comes to syntax.
Comming to my question: if I wanted to seperate my knoweledge base from my program, how would I do that?
I know how to read a file, issolating a single line, I can manage, but I don't wan't to search for full questions, but a combination of keywords, for example now if you use a sentence with the words sallary and bankaccount, it assumes you wan't to ask when you'll be payed and will provide you with that answer, I have several keywords, like sallary could be money and bankaccount could be deposit, so wheater you ask when is my sallary in my bankaccount or when do you deposit my money, it will provide you with the same answer, since in this context both are essentially the same question just phrased differently.
Any tips? Links to easy to implement software are also verry welcome.
Since I have no experience with js, feel free to comment on ways to improve my code.
HTML:
JS:
for now only a limited nr of questions can be asked, it's not ment to be a fully program but a poc.
I didn't include the css, since for this question it has no part and would only take up space, but if you want to download the full project you can find it
on my gitHub