rag-telegram-bot
Описание
This is an intelligent Telegram bot powered by Retrieval-Augmented Generation (RAG), combining ChromaDB, FAISS, and OpenAI's GPT to provide instant support answers based on your document collection.
Языки
- Python91,3%
- Shell8,7%
🤖 RAG-Based Telegram Support Bot
This is an intelligent Telegram bot powered by Retrieval-Augmented Generation (RAG), combining ChromaDB, FAISS, and OpenAI's GPT to provide instant support answers based on your document collection.
📦 Features
- ✅ Supports natural language questions via Telegram
- 🔎 Retrieves relevant documents using ChromaDB & FAISS
- 🧠 Uses GPT-3.5 to generate contextual answers
- 📊 Embedding-based semantic search
- ⚖️ LLM-based document reranking for high relevance
- 🗂 Supports multiple embedding providers (OpenAI, Sentence Transformers)
🚀 Setup Instructions
1. Clone the repository
2. Install dependencies
Create a virtual environment and install required packages:
3. Configure environment
Create a file with the following structure:
💡 Make sure your ChromaDB collection exists and contains embedded documents.
▶️ Run the bot
Your bot will start polling Telegram for new messages and respond with smart answers.
🧪 Example Use Case
Send a message to the bot like:
"Как оформить больничный лист?"
It will search your knowledge base, rerank documents using GPT, and reply with a generated answer based on top relevant documents.
🛠 Tech Stack
🧠 Future Improvements
- Streamlit dashboard integration
- Admin feedback loop
- Document upload pipeline
- Prompt templating
📄 License
MIT License