Skip to content

About

Creating a local scale RAG bot for understanding flow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG_project_v2

Creating a local scale RAG bot for understanding flow

RAG Document Q&A Pipeline

A local Retrieval-Augmented Generation (RAG) system that lets you ask natural language questions about a PDF document and get answers grounded in its actual content.

How it works

  1. Extracts text from a PDF using pypdf
  2. Splits the text into overlapping chunks
  3. Converts each chunk into an embedding using sentence-transformers (all-MiniLM-L6-v2)
  4. Stores the embeddings in a local ChromaDB vector database
  5. On a query: embeds the question, retrieves the most relevant chunks via similarity search, and sends them as context to Groq's LLM API to generate an answer

Tech stack

  • Python
  • pypdf — PDF text extraction
  • sentence-transformers — local embeddings (CPU-friendly, no GPU required)
  • ChromaDB — local vector storage
  • Groq API — free-tier LLM for answer generation

Setup

  1. Clone the repo
  2. Create a virtual environment: python -m venv venv
  3. Activate it and install dependencies: pip install -r requirements.txt
  4. Add a .env file with GROQ_API_KEY=your_key_here
  5. Drop a PDF into the data/ folder
  6. Run: python main.py

What I learned

This project gave me a hands-on understanding of how RAG pipelines actually work end to end — from document parsing and chunking to embeddings, vector search, and grounded LLM responses. Building it manually (instead of relying on a framework) helped me understand why each step exists, not just how to call it.

Next steps: improving chunking strategy, testing retrieval across multiple documents, and exploring reranking to handle cases where relevant information is split across chunks.

About

Creating a local scale RAG bot for understanding flow

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages