This is a simple FAQ chatbot built using Python, SpaCy, and Streamlit. The chatbot helps users find answers to frequently asked questions (FAQs) by using natural language processing (NLP) to compare the user's question with predefined FAQs and return the most relevant answer.
- Uses SpaCy for natural language processing (NLP) to detect similarity between user input and predefined FAQ questions.
- Simple and interactive interface created with Streamlit for real-time question and answer interaction.
- Supports handling common FAQs related to business operations like return policies, order tracking, shipping, and payment methods.
Before you start, ensure you have the following installed:
- Clone the repository:
git clone https://github.com/yourusername/faq-chatbot.git
cd faq-chatbot- Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`- Install the required packages:
pip install -r requirements.txt- Download the SpaCy English model:
python -m spacy download en_core_web_smTo run the FAQ chatbot locally:
streamlit run app.pyOnce Streamlit runs the app, it will open in your browser. Type your question in the provided text area, and click "ASK" to see the chatbot’s response.
📂 faq-chatbot
├── 📄 app.py # Main script to run the FAQ chatbot
├── 📄 README.md # Project documentation
├── 📄 requirements.txt # Python package dependencies
The main application script that:
- Loads the SpaCy language model
- Defines a dictionary of FAQs
- Compares the user's input with the predefined FAQs using similarity scores
- Returns the best matching FAQ answer
List of Python libraries required to run the project:
spacy
streamlit- Run the chatbot with the command:
streamlit run app.py- Type your question into the text area.
- Click the ASK button, and the chatbot will respond with the most relevant FAQ answer.
Here are the questions the chatbot currently understands:
- What is your return policy?
- How do I track my order?
- Do you ship internationally?
- What payment methods do you accept?
- Add more FAQs to cover additional topics.
- Improve the similarity detection algorithm for better accuracy.
- Implement multi-lingual support.
- Add integration with a backend FAQ management system to dynamically update FAQs.