Skip to content

GARJE-01/RAG_ChatBot_Groq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG ChatBot (Groq + LangChain)


RAG ChatBot (Groq + LangChain)

Outline / Brief Description:
This project is a Retrieval-Augmented Generation (RAG)-based chatbot that enables interactive Q&A on uploaded PDF documents. It uses Streamlit for a stylish UI and LangChain for document chunking, vectorization with HuggingFace embeddings, and leveraging Groq’s ultra-fast LLaMA model for accurate responses. It’s deployed on Streamlit Cloud and is designed to make document analysis faster and more accessible.

📄 General Information


  • This project is a RAG-powered chatbot allowing queries on uploaded PDFs.
  • It solves the problem of manually searching long documents, boosting efficiency.
  • The goal is to streamline Q&A for students, professionals, and researchers.

🛠️ Technologies Used


Programming Language:

  • Python 3.11

Frameworks & Libraries:

  • Streamlit — for building the web interface
  • LangChain — for RAG pipeline and vectorstore management
  • HuggingFace Embeddings — for embedding the document contents
  • Groq API (LLaMA 3) — for super-fast LLM inference
  • PyPDFLoader — for reading and splitting PDFs
  • RecursiveCharacterTextSplitter — for efficient chunking of text content

Deployment & Version Control:

  • Git & GitHub — version control and source code hosting
  • Streamlit Cloud — one-click deployment & hosting

Configuration:

  • .env files — for safe environment variable handling

✨ Features


  • 📂 PDF Upload Support — Easily upload one or multiple PDFs.
  • 🧠 Context-Aware Answers — Answers derived directly from uploaded content.
  • 📝 Conversation History — Keep track of queries and responses.
  • ⚡ Groq LLaMA-powered Inference — Fast responses powered by Groq API.
  • 🎨 Stylish UI — Modern glassmorphism interface for a polished look.
  • 🔄 Reset Option — Quickly reset chat and upload new files.
  • 🆕 Source References — See excerpts of source text alongside answers.

⚙️ Setup


Requirements:

Check requirements.txt for dependencies:

streamlit
langchain
langchain-groq
langchain-huggingface
pypdf
sentence-transformers

Steps to Run Locally:

  1. Clone the repository:
    git clone https://github.com/YOUR_USERNAME/RAG_ChatBot_Groq.git
    cd RAG_ChatBot_Groq
  2. (Optional) Create & activate a virtual environment:
    python -m venv venv
    venv\Scripts\activate  # Windows
    source venv/bin/activate  # Linux/MacOS
  3. Install dependencies:
    pip install -r requirements.txt
  4. Create a .env file for your Groq API key:
    GROQ_API_KEY=your-groq-api-key-here
  5. Run the app:
    streamlit run Chatbot.py

💡 Usage


Once up and running, you can:

  • 📂 Upload a PDF file — via the upload section.
  • 🤖 Ask questions — and receive instant, accurate answers.
  • 🔄 Restart session — to clear data and upload new files.

📊 Project Status


✅ Completed and deployed on Streamlit Cloud — try the live app here 🎯

🚀 Improvements


  1. Multi-File Support — Query across multiple PDFs.
  2. Conversation Persistence — Save sessions for future use.
  3. Advanced Features — Voice-based querying and highlighted source excerpts.

🌟 Future Features


  1. Multi-File Chat Support
  2. Voice Input & Output
  3. Contextual Highlighting of Source Text

🙏 Acknowledgements


  1. This project was inspired by the need for smarter document Q&A tools.
  2. Based on tutorials and official docs from LangChain, Groq, HuggingFace, and Streamlit.
  3. Special thanks to the open-source community that made these tools accessible.

📬 Contact


LinkedIn     GitHub     Facebook

About

A Retrieval-Augmented Generation (RAG) ChatBot using LangChain, HuggingFace, and Groq’s LLaMA model — allowing interactive Q&A on uploaded PDFs via a sleek Streamlit interface.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages