Giter VIP home page Giter VIP 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 embeddings via HuggingFace or Spacy
  • Build full FAQ chatbot platform using switchable embediddings
  • Deploy it on Heroku and give link from Yati.io with documentation and disclaimer
  • Research: SIG IR: entity extraction, Answer selection is part of Information retrieval

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

yogeshhk avatar

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.