A multi-platform chatbot that provides intelligent customer and tech support using OpenAI, Dialogflow, and a Retrieval-Augmented Generation (RAG) system.
- Multi-platform Support: Messenger, Telegram, LINE, Instagram, or custom web page.
- Retrieval-Augmented Generation (RAG): Intelligent, document-based responses using semantic search.
- Dynamic Intent Handling: Dialogflow for intent matching and tagging documents for improved efficiency.
- Context-aware Responses: Combines RAG and OpenAI models for enhanced conversational AI.
- Document Processing: Upload, chunk, and store documents with embeddings for semantic search.
- Presentation slides: Support chatbot with RAG
- Live Demo: Chatbot demo with custom frontend
- Intent Handling:
- Dialogflow matches user inputs with known intents and tags uploaded documents.
- Only documents matching specific tags are searched to improve efficiency.
- RAG Process:
- Uploaded documents are chunked with overlapping sections.
- Embeddings are generated and stored for semantic search.
- Relevant chunks are retrieved using a weighted combination of cosine similarity and fuzzy matching scores.
- Retrieved context is added to prompts for response generation using GPT models.
- Cross-platform Integration:
- APIs for Messenger, LINE, Telegram, and Instagram.
- Custom web frontend built with React.
- Frontend: React
- Backend: Go (Gin framework)
- Database: PostgreSQL
- APIs: OpenAI, Dialogflow, Telegram, LINE, META
- Cloud Deployment: Heroku (backend), GitHub Pages (frontend)
- Tools: PDF processing libraries for text extraction
-
Clone the Repository:
git clone https://github.com/petersun1937/cross-platform-chatbot-rag.git cd cross-platform-chatbot-rag
-
Backend Setup:
-
Prerequisites:
- Install Go (v1.16 or higher) and Python (v3.6 or higher).
- Verify installation:
go version python --version
-
Install Python Packages:
- The backend requires several Python packages for processing PDFs. To install them, run:
pip install pdfplumber pytesseract pdf2image PyPDF2
- These packages handle PDF text extraction and Optical Character Recognition (OCR) for images within PDFs.
-
Set Up Environment Variables:
- Create a
.env
file in theconfigs/
directory to store variables such as API keys and database configurations (refer tosample.env
).
- Create a
-
Run the Backend Server:
- Navigate to the project directory and start the server:
go run main.go
- Navigate to the project directory and start the server:
- Refer to my custom frontend repo
- Streamlining FAQs and troubleshooting for customer support.
- Automating knowledge retrieval for internal teams.
- Enhancing collaborative workflows with intelligent document processing.
- Acting as a meeting assistant for document organization and context provision.
- Extending to incorporate custom-trained language models.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or suggestions, feel free to reach out to cxs1937@psu.edu.