This project implements a Retrieval-Augmented Generation (RAG) pipeline for building a customer support chatbot.
- Preprocessing and Understanding:
- Includes data understanding, parsing and processing strategies for feature creation and initializing vector databases.
- Retrieval-Augmented Generation (RAG):
- Combines document retrieval with LLM-based response generation.
- Customizable Prompts:
- Uses system, retriever, and user prompts for better control over the chatbot's behavior.
- Evaluation Tools:
- Includes scripts for dataset validation, evaluation metrics, and pipeline testing.
- Streamlit UI:
- A user-friendly interface for interacting with the chatbot.
- FastAPI Backend:
- Provides an API for generating responses programmatically.
- Python Version:
- Ensure you have Python 3.12 installed.
- Install Dependencies:
- Use
pipto install the required dependencies fromrequirements.txt.
- Use
- Set Python Path:
- Setting the Python path is crucial for importing packages correctly.
git clone https://github.com/your-repo/CustomerSupportAssistant_RAG_Challenge.git
cd CustomerSupportAssistant_RAG_Challengepython3 -m venv venv
source venv/bin/activate pip install --upgrade pip
pip install -r [requirements.txt]To ensure that all modules are imported correctly, set the PYTHONPATH environment variable:
For mac and linux
export PYTHONPATH=$(pwd)For Windows:
set PYTHONPATH=%cd%Run the FastAPI backend to expose the chatbot API:
# python src/backend/api/app.py
uvicorn src.backend.api.app:app --host 0.0.0.0 --port 8085The API will be available at http://localhost:8085.
Run the Streamlit application for a user-friendly interface:
streamlit run src/ui/streamlit_app.py The UI will be available at http://localhost:8501.
- Setting Python Path:
Always set the PYTHONPATH environment variable before running the application to avoid import errors.
- Docker Support:
A Dockerfile is included for containerizing the application. Future work includes adding docker-compose for connecting the UI and backend.
- Add Docker Compose for seamless integration of UI and backend.
- Implement evaluation metrics for generation and retrieval using RAGAS.
- Enhance the chatbot with Chain-of-Thought reasoning for better explanations.
- Expand support for multilingual queries.
- Add test cases for each functionalities.
- Currently supports only English queries.
- Requires a pre-configured vectorstore for document retrieval.
some interesting repositories