Skip to content

About

πŸ€– AI Chatbot with RAG (Retrieval-Augmented Generation) using Groq API. Upload PDFs (300+ pages), ask questions, get accurate answers with semantic search. Features: document chunking, embeddings, FAISS vector search, and Groq's ultra-fast LLM inference.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Groq RAG Chatbot

Smart Document Q&A with Retrieval-Augmented Generation (RAG)


Project Demo


πŸ“Œ Overview

This project allows you to upload large PDF documents (300+ pages) and ask questions in plain English.
It uses Retrieval-Augmented Generation (RAG) to provide accurate, context-aware answers.

🎯 Use Cases

  • πŸ“š Students – Query textbooks, syllabi, research papers
  • πŸ‘¨β€πŸ’Ό Professionals – Analyze contracts and reports
  • πŸ”¬ Researchers – Search academic documents
  • πŸ“– Teachers – Build interactive Q&A systems

⭐ Features

  • πŸ“š Supports large PDFs (300+ pages)
  • πŸ” Semantic search using embeddings
  • 🧠 Efficient RAG pipeline
  • ⚑ Ultra-fast inference with Groq
  • πŸ’¬ Clean and responsive UI
  • πŸ”’ API key stays local (secure)

πŸ—οΈ Architecture

PDF β†’ Chunking β†’ Embeddings β†’ FAISS Index
                             ↓
User Query β†’ Embedding β†’ Top-K Retrieval β†’ Groq LLM β†’ Answer

πŸ› οΈ Tech Stack

TechnologyPurpose
FlaskBackend framework
Groq APILLM inference
Sentence TransformersText embeddings
FAISSVector search
PyPDF2 / pdfplumberPDF extraction

πŸ“‹ Prerequisites

  • Python 3.8+
  • Git
  • Groq API Key

πŸš€ Installation

git clone https://github.com/ysujith728/groq-chatbot-rag.git
cd groq-chatbot-rag
# Create virtual environment
python -m venv venv

# Activate (Windows)
venv\Scripts\activate

# Activate (Mac/Linux)
source venv/bin/activate
pip install -r requirements.txt
# Create .env file
GROQ_API_KEY=your_api_key_here
python app.py

Open: http://localhost:5000


πŸ’¬ Example Questions

  • What are the course outcomes?
  • List all programming languages taught
  • What is the credit distribution?
  • Summarize the objectives
  • What AI electives are available?

πŸ“Š Performance

MetricValue
Max PDF Size100MB
Pages~500
Chunk Size1500 chars
Response Time2–5 sec
Embedding Modelall-MiniLM-L6-v2

πŸ“ Project Structure

groq-chatbot-rag/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .env.example
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
β”‚
β”œβ”€β”€ templates/
β”‚   └── index.html
β”‚
β”œβ”€β”€ uploads/        (ignored)
β”œβ”€β”€ chunks/         (ignored)
└── screenshots/
    └── demo.png

πŸ› Troubleshooting

RAG not working

pip install sentence-transformers faiss-cpu numpy

API Key issue

GROQ_API_KEY=your_key

PDF issue

  • Ensure PDF has selectable text (not scanned)

🀝 Contributing

  1. Fork the repo
  2. Create branch: feature/your-feature
  3. Commit changes
  4. Push and open PR

πŸ“„ License

MIT License


⭐ Support

  • ⭐ Star the repo
  • πŸ” Share it
  • 🀝 Contribute

❀️ Built With

Groq’s ultra-fast inference engine

About

πŸ€– AI Chatbot with RAG (Retrieval-Augmented Generation) using Groq API. Upload PDFs (300+ pages), ask questions, get accurate answers with semantic search. Features: document chunking, embeddings, FAISS vector search, and Groq's ultra-fast LLM inference.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages