Git Product home page Git Product logo

faqchatbot's Introduction

FAQs ChatBot

Getting answer automatically is magic!! its real AI (remember, the Turing Test?)

This project is a Simple Question-Answer (atomic query) based chatbot framework. Uses similarity based on different vectorizers, to find the matching question then responds with its corresponding answer.

Application Scope:

  • Huge demand to take care of mundane queries
  • Scales (leverage, automation, passive)
  • Not much work in vernacular chatbot (serve humanity)

Notes:

  • This chatbot is based on category classification first and then to similarity within the selected category.
  • Different than the popular open source chatbot framework, Rasa, where NLU is based on intent and entities, whereas dialog management is based on sequence/LSTM prediction.
  • Conceptually it is similar to Microsoft's QnA Maker. But the big difference is that, if you get whole this whole github code-base, your models would be local. Nothing on Server. So better security especially for sensitive data chatbots like HR or Finance.

Copyright (C) 2019 Yogesh H Kulkarni

To Dos

  • Implement sentence embedding via HuggingFace or Spacy
  • Build full FAQ chatbot platform using switchable embediddings
  • [New] LangChain + Vector Db like GPT-Index or Pinecone (cloud) can be used to perform FAQs

The way it works:

  • You supply FAQs in the form of csv (comma separated file) having Question-Answer-Class in each row (e.g. "What is GST rate for Toothpaste?,12,rate")
  • Questions are vectorized and kept ready for matching, along with the classifier model [X=vector(question), y=class]
  • Once user query comes, its 'class' is predicted using the classifier model and within the class, vectorized query is matched against existing vectorized questions.
  • Whichever is most similar, it's answer is presented to the user.

Scripts:

  • app.py: Chatbot UI built using Flask, using templates/*.html
  • bankfaqs.py: Chatbot core logic as well as knowledge-base.

Other Data:

  • faqs: csv files containing questions and answers
  • static and templates: Flask UI related files

To run:

chatwindow

Dependencies:

  • Needs Python 3.6, numpy, scipy, sklearn

References

  • Bhavani Ravi’s event-bot code, Youtube Video
  • Banking FAQ Bot code

Disclaimer:

  • Author ([email protected]) gives no guarantee of the results of the program. It is just a fun script. Lot of improvements are still to be made. So, don’t depend on it at all.

faqchatbot's People

Contributors

dependabot[bot] avatar piyushbhavsar12 avatar pritam1984314 avatar yogeshhk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

faqchatbot's Issues

Which sentence embedding worked best in similarity task?

I see that you're using bunch of sentence vectorizers. In your experience, which one worked best for you. In my experience building a question answering system, OOTB BERT embeddings did not produce good results. But if you fine-tune BERT on STS datasets, then it performs much better for Semantic Similarity task. In general, USE still worked best for me.

New added question/answer would not work

I add the new question/answer to Greetings.cvs file as followed:
Matrix,is great company,greetings

Then run chatbot. Open browser, and open the chatbot, and enter "Matrix" as question, but the reply is always "Hi".
Not work as expected.
Or I miss something that is required to make new added question work. Looking forward to reply! Thanks.

Please provide Requirements.txt

Can you please provide requirements.txt for all the modules to be installed. I'm getting module conflicts while installing.

other language

I would like to ask, if you want to change to Chinese FAQ, is it possible to replace the csv data?
Thank you

Dependencies / requirements

The app need a lot of libraries as requirements, and there is no hint on the readme file o requirement/setup file.
It would be great if you add them.

I had the pip3 install the following libraries manullay:

  • flask
  • numpy
  • scipy
  • sklearn
  • pandas
  • nltk
    and much more

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.