An AI-powered FAQ chatbot built using a RAG (Retrieval-Augmented Generation) approach. The bot scrapes/loads FAQ content, retrieves the most relevant context for a user's question, and generates a grounded answer using the Gemini API.
- Scrapes or loads FAQ data as a knowledge base
- Retrieval-Augmented Generation (RAG) for context-grounded answers
- Streamlit-based chat interface
- Powered by Google's Gemini API
FAQ_CHATBOT/
├── app.py # Main application logic
├── rag.py # RAG pipeline (retrieval + generation)
├── scrape.py # Scrapes/prepares FAQ data
├── streamlit_app.py # Streamlit UI entry point
├── requirements.txt
└── README.md
-
Clone the repo
git clone https://github.com/hazmaali9708/FAQ_CHATBOT.git cd FAQ_CHATBOT -
Create a virtual environment (recommended)
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
Create a
.envfile in the project root and add your Gemini API key and scrape URLs. Use.env.exampleas a template if you want.GEMINI_API_KEY=your_gemini_api_key_here SCRAPE_URLS=https://example.com,https://another-example.com
Run the Streamlit app:
streamlit run streamlit_app.pyOr run the console version:
python app.py- Python
- Streamlit
- Google Generative AI (Gemini API)
- BeautifulSoup (for scraping FAQ content)
This project was built as part of an AI/ML internship prototype exploring a lightweight RAG pattern for grounded question answering.