Telecom_chat_bot streamlit-app-Telecom-RAG-System-Qwen3-27B on Groq.webm
A Retrieval-Augmented Generation (RAG) customer care chatbot for telecom support. It answers questions about mobile connectivity, billing, SIM issues, and roaming by retrieving relevant context from three knowledge sources and generating responses with Qwen3-27B via Groq.
User question
│
▼
Merged Retriever (top-k from each store)
├── ChromaDB · faq (FAQ entries from CSV)
├── ChromaDB · tickets (resolved support tickets from SQLite)
└── ChromaDB · guides (PDF guide chunks)
│
▼
ChatPromptTemplate → Qwen3-27B (Groq) → Answer
Embedding model: sentence-transformers/all-MiniLM-L6-v2 (runs locally via HuggingFace)
LLM: qwen/qwen3-27b served by Groq
rag-telecom-chatbot/
├── app.py # Streamlit web UI
├── main.py # CLI entry point
├── rag_chain.py # Builds the LangChain RAG chain
├── retriever.py # Merges the three Chroma retrievers
├── ingest_faq.py # Loads data/faq.csv → Chroma 'faq' collection
├── ingest_tickets.py # Loads data/tickets.db → Chroma 'tickets' collection
├── ingest_pdf.py # Loads data/telecom_guide.pdf → Chroma 'guides' collection
├── data/
│ ├── faq.csv # FAQ question/answer pairs
│ ├── tickets.db # SQLite database of resolved support tickets
│ ├── telecom_guide.pdf # Telecom user guide (chunked at ingest)
├── chroma_store/ # Persisted Chroma vector database (created at ingest)
├── evaluate_retrieval.py # Evaluate retrieval quality
├── pyproject.toml
├── uv.lock
└── .env.example
- Python 3.11+
- uv (recommended) or pip
- A Groq API key
- A HuggingFace token (for downloading the embedding model)
1. Clone and install dependencies
git clone <repo-url>
cd rag-telecom-chatbot
uv sync # or: pip install -e .2. Configure environment variables
cp .env.example .envEdit .env and fill in your keys:
GROQ_API_KEY=your_groq_api_key_here
HF_TOKEN=your_huggingface_token_here
3. Ingest data into Chroma
Run the three ingestion scripts once to build the vector store:
python ingest_faq.py
python ingest_tickets.py
python ingest_pdf.pyEach script embeds the source data and persists it to chroma_store/. Re-run a script only when its source data changes.
Streamlit web UI
streamlit run app.pyOpens at http://localhost:8501. The sidebar has one-click sample questions and a button to clear the conversation history.
CLI
python main.pyInteractive prompt — type a question and press Enter. Type quit to exit.
| Collection | Source file | Granularity |
|---|---|---|
faq |
data/faq.csv |
1 document per FAQ row |
tickets |
data/tickets.db |
1 document per resolved ticket |
guides |
data/telecom_guide.pdf |
Chunks of 600 chars with 100-char overlap |
The retriever fetches the top 3 results from each collection (9 context documents total) for every query.