Customer Support Chatbot to answer FAQs and place orders
This chatbot application is intended to support customers by placing orders for them as well as to answer questions posted by the user in natural language. The chatbot can answer the questions based on natural language as well as place orders using a pre-defined syntax.
Creae a chatbot for customer support to answer frequently ask question and order any product example laptop, mobile etc
-
Angular: For building the frontend of the application
-
Node.js: For building the backend of the application
-
MongoDB: Database for storing application data
-
Python: For writing the classifier to answer questions placed in natural language
Clone the repo to your system and use npm install in the chatbot-frontend folder to install the node_modules folder
- After cloning the repo, head to chatbot-backend -> src -> classifier.
- In the same folder, a file (clf.pkl) has been saved which contains the trained model on faq_new.txt file.
- If the file should be deleted to train on a new model, then comment lines 31 and 98 and uncomment lines 32 and 99 in script (python file).
- Run the program once, this will train the model and create file clf.pkl.
- Undo the changes made in step 3, the program will then be able to run with the node application.
- Start the backend application and the database (see steps 4, 5 and 6 in section 'Starting up the application')
- Open Postman application
- Send multiple POST requests to the URL: localhost:3000/products
- The Body for each request should be of the following JSON format (example below):
{
"name": "Sony 08XX Earphones",
"img": "https://www.sony.co.in/image/0db517b7884d87c665c1ca403bc22ce2?fmt=pjpeg&wid=660&hei=660&bgcolor=F1F5F9&bgc=F1F5F9",
"desc": "Noice cancelling earphones with neckband by Sony, designed to eliminate external noise. Black in color.",
"manufacturer": "Sony",
"price": 3999,
"code": "sony_ep_2"
}
All fields are compulsory. - The 'code' field will be used while placing orders.
- You can add these details as you like.
- 'price' should be a number and 'img' should be an image URL.
- Close the database and backend applications when all entries have been added.
- Open 3 terminal windows
- In first window, navigate to the chatbot-frontend folder which is present inside the Chatbot folder.
- Type ng serve --open and press Enter.
- In second window, navigate to the chatbot-backend folder which is present in Chatbot folder.
- Type npm run dev and press Enter.
- In third terminal window, start your mongodb application (mongod.exe) by navigating to mogodb folder in your system, and setting dbpath parameter as your mongodb data folder. Something like this- mongodb/bin/mongod.exe --dbpath=mongodb-data
- Once all the programs are active, you will be directed to the web appliaction.
- Use the commands mentioned in the chatbot screen to place orders.
- The 'code' can be found in the page to view products.
- See Home and About Us pages to more about website and the dealer.
- Try greeting the chatbot by saying 'Hello' or ask customer care questions like 'Can I take the shipment after checking the contents inside?' or 'What items are eligible for free replacement?' by rephrasing them a bit.