A hands-on sandbox repository to explore and understand the fundamentals of Retrieval-Augmented Generation (RAG).
The goal of this repo is to experiment with document chunking, embeddings, vector search, and prompting LLMs with custom retrieved context.
- Document Ingestion & Chunking: Testing different chunk sizes and overlaps on sample text/PDFs.
- Embeddings & Vector Search: Generating embeddings and running similarity searches using a local vector store.
- Prompt Augmentation: Injecting retrieved context chunks into LLM prompts to see how response accuracy improves.
- Language: Python
- Orchestration: LangChain
- Document Processing: PyMuPDF
- Vector Store: ChromaDB
- LLM & Inference: Groq API
- Embeddings: HuggingFace (
sentence-transformers)
┌──────────────────────────┐
│ Document Ingestion │
│ (PDF, Markdown, TXT, ...)│
└────────────┬─────────────┘
│
[Text Splitter]
│
┌────────────▼─────────────┐
│ Embedding Model │
└────────────┬─────────────┘
│
[Vector Embeddings]
│
┌────────────▼─────────────┐
│ Vector Database │
└────────────┬─────────────┘
│
User Query ──► [Embed Query]│ (Top-K Similar Chunks)
▼
┌───────────────────────────┐
│ Prompt Construction │
│ (Query + Context Chunks) │
└─────────────┬─────────────┘
│
┌─────────────▼─────────────┐
│ LLM Engine │
└─────────────┬─────────────┘
│
▼
Grounded Response
git clone [https://github.com/DevDreamer26/RAG.git](https://github.com/DevDreamer26/RAG.git)
cd RAG
---