A Retrieval-Augmented Generation (RAG) chatbot that enhances customer support by retrieving relevant documentation and generating accurate responses using Groq's LLaMA-3.1-8B model. The chatbot features an intuitive Streamlit UI and responds strictly based on the provided context.
💡 For queries outside the provided documentation, it replies: "I don't know."
- 
🔍 Smart Document Retrieval
Uses Pinecone to fetch the top 3 relevant documents. - 
🤖 Context-Aware Answer Generation
Powered by Groq's LLaMA-3.1-8B for precise responses. - 
❓ Out-of-Scope Detection
Answers "I don't know" if information isn't available in the documents. - 
🖥️ Interactive UI
Built with Streamlit, includes expandable context sections. - 
🧱 Modular Codebase
Clean separation between UI (interface.py) and backend logic (rag_chain.py). 
CUSTOMER-SUPPORT-RAG/
├── app/
│   ├── __pycache__/
│   ├── documents.json              # Indexed document data
│   ├── ingest.ipynb                # Notebook for data ingestion
│   ├── interface.py                # Streamlit app
│   └── rag_chain.py                # Core RAG logic
├── 01_data_gathering_logic/
│   ├── angelone_quick_10_links_support_data.json
│   ├── angelone_support_full_data.json
│   ├── insurance_pdfs_flat.json
│   └── Insurance PDFs/
│       └── PDFs/
├── .env                            # Environment variables (GROQ_API_KEY & PINECONE_API_KEY)
├── README.md
├── requirements.txt
Install all dependencies:
pip install -r requirements.txtlangchain==0.1.10
openai==1.19.0
pinecone
sentence-transformers==2.2.2
PyPDF2==3.0.1
pdfplumber==0.10.2
beautifulsoup4==4.12.3
requests==2.31.0
streamlit==1.33.0
tqdm==4.66.2
numpy==1.26.4
pandas==2.2.2
python-dotenv==1.0.1Create a .env file in the project root:
GROQ_API_KEY=your_groq_api_key_here
PINECONE_API_KEY=your_pinecone_api_key_here
Run the ingestion notebook to generate the document index:
open app/ingest.ipynb- Output: 
documents.json 
streamlit run app/interface.py- Open: http://localhost:8501
 - Ask questions based on the uploaded support documents.
 - View supporting documents by expanding the UI panels.
 
- When the answer is found in the documents:
 
- When the query is not covered:
 
- Responses are limited to the content in 
documents.json. - Ensure 
documents.jsonremains in the/appdirectory. 
- 
Missing Document Index
→ Re-runingest.ipynb. - 
API Key Not Found
→ Verify.envfile exists and contains valid keys. - 
Package Errors
→ Confirm all packages are installed with the correct versions. 

