Skip to content
/ shopBot Public

AudioPhil, the shopbot for headphones 🎧

License

Notifications You must be signed in to change notification settings

eleow/shopBot

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

AudioPhil, the shopbot for headphones

Quickly get product recommendations and product information for headphones by just typing into a chat interface


Report Bug · Request Feature

About

This was the group project by Edmund, Meiying, Shashank, and Wenqi (listed in alphabetical order), for

The objective of the chatbot is to give users better "decision simplicity" in their shopping for headphones, utilising Google DialogFlow, rasa NLU, Kommunicate, and other NLP techniques and libraries. As a demo, the deployed chatbot would be embedded within a (fake) headphones website.

ShopBot

Getting Started

Installation

  • Clone this repo:
git clone https://github.com/eleow/shopBot.git

Usage

Refer to Product Guide for full details.

The following intents are available

  • Get product recommendations
  • Get answers to headphone-related stuff (FAQ)
  • Get pricing information for a specific headphone model

Get product recommendations

Based on user’s preferences, including whether he would like earphones or headphones, the connectivity type and desired brands, results are returned to the user. The sentiments for the aspects design, fit, price and sound are displayed, along with product name and price. The review rating from Amazon consumers is also provided.

Get answers to FAQ on headphone-related stuff

When the user has a query on a specific term, we will try the following in order

  • Exact word or synonym matching of query with terms in database,
  • Similarity matching of query with terms in database, based on word vectors using spacy model 'en_core_web_md' (English multi-task CNN trained on OntoNotes, with GloVe vectors trained on Common Crawl)

Get product pricing and information

When the user wants to find out about a specific model, we will check our preprocessed list of brands and models from Amazon and Treoo, and return the most suitable match. If the item exists in both Amazon and Treoo, the lower priced item would be shown.

Unit Testing

Intents and entities recognition can be tested via dialogflow_testing.py. Simply run it and pass in the path to the configuration file (eg config.ini), like so

python dialogflow_test.py --config "./config.ini"

The configuration file should contain the following:

  • CREDENTIALS - path to the DialogFlow JSON file, relative to script
  • TEST_FILE - path to file containing test cases, relative to script

For more details, including how to specify intent confidence threshold, etc, use the following:

python dialogflow_test.py --help

A sample configuration file is provided in the repository.

The script will loop through all test cases in TEST_FILE, verifying it against expected intent and expected entities by sending it to the DialogFlow backend specified in CREDENTIALS, to give a summary of the number of passed test cases.

License

Distributed under the MIT License

Acknowledgements

Shop assistant icon modified from graphic by Freepik from www.flaticon.com