Skip to content
DevDreamer26Public

About

This is a Retrieval-Augmented Generation (RAG) repository that ingests local documents such as PDFs and text files, stores them in a vector database, and retrieves the most relevant passages to answer questions based on the source content. It uses LangChain, embeddings, and a vector store to build a lightweight document-based Q&A workflow.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Retrieval-Augmented Generation (RAG) System

Python LangChain Vector DB

My Experiments & Learning

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.


What's Inside

  • 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.

Tech Used

  • Language: Python
  • Orchestration: LangChain
  • Document Processing: PyMuPDF
  • Vector Store: ChromaDB
  • LLM & Inference: Groq API
  • Embeddings: HuggingFace (sentence-transformers)

🏗️ System Architecture

               ┌──────────────────────────┐
               │    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

Setup & Try

1. Clone the repo

git clone [https://github.com/DevDreamer26/RAG.git](https://github.com/DevDreamer26/RAG.git)
cd RAG
---

About

This is a Retrieval-Augmented Generation (RAG) repository that ingests local documents such as PDFs and text files, stores them in a vector database, and retrieves the most relevant passages to answer questions based on the source content. It uses LangChain, embeddings, and a vector store to build a lightweight document-based Q&A workflow.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages