- Introduction
# 🔍 ChatGroq RAG Chatbot
A **Retrieval-Augmented Generation (RAG)** web application powered by **Streamlit**, **LangChain**, **Groq's LLMs**, and **FAISS**,
designed to allow real-time question answering from custom document sources or live websites.
Built by **Ankit Porwal**.
---
## 🚀 Features
- 🔗 Loads content directly from a live web page
- 📚 Splits and embeds content using open-source **Ollama embeddings**
- 🧠 Stores vectorized content using **FAISS**
- ⚡ Uses **Groq's ultra-fast LLMs (like LLaMA 3)** for answering queries
- 🖥️ Simple and interactive **Streamlit UI**
- 🔍 Shows document chunks used in answering the question (document similarity search)
---
## 🛠️ Tech Stack
| Tool | Purpose |
|----------------|------------------------------------|
| Streamlit | Frontend Web App UI |
| LangChain | RAG chaining and document handling |
| Groq API | LLM inference |
| Ollama | Open-source embeddings |
| FAISS | Vector store for similarity search |
| WebBaseLoader | Loads data from websites |
| Python | Core language |
---
## 📦 Installation
1. **Clone the repository:**
```bash
git clone https://github.com/your-username/chatgroq-rag.git
cd chatgroq-rag
- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a .env file and add your API key:
GROQ_API_KEY=your_groq_api_key- Run the Streamlit app:
streamlit run app.pychatgroq-rag/
│
├── app.py # Main Streamlit app
├── requirements.txt # Python dependencies
├── .env # API key storage
└── README.md # Project documentation
- Loads content from a provided web page (e.g., a LangChain or ML article).
- Splits the text into chunks and creates embeddings using
OllamaEmbeddings. - Stores those embeddings in a local FAISS vector store.
- User submits a question through the Streamlit interface.
- LangChain’s retrieval chain fetches the most relevant chunks.
- The selected LLM (via Groq API) answers based on the retrieved context.
Feel free to connect:
This project is open-source and available under the MIT License.
---
Let me know if you'd like to customize this further for:
- GitHub topics and tags
- PDF document ingestion (if you're using it later)
- Deployment (e.g., Streamlit Cloud or Hugging Face Spaces)
Just drop me a note!