A hands-on sandbox for experimenting with Retrieval-Augmented Generation (RAG) workflows using modern LLM, embeddings, and vector databases.
The repository covers essential components of a RAG pipeline:
- Load, preprocess and chunk documents.
- Powered by Chroma DB for fast similarity search and retrieval.
- Stores document embeddings with associated metadata.
- Uses
all-MiniLM-L6-v2sentence transformer for efficient embeddings. - Supports experimentation with bag-of-words text representation.
- TSNE visualization of embeddings for exploratory analysis.
- BM25 - keyword based ranking function is implemented
- Retrieval-augmented responses using
gpt-4o-mini. - Modular setup to experiment with different retrieval strategies.
- Keyword Overlap
- Cosine Distance [Semantics]
- Hybrid approach [Keyword + Semantics]
- Context Summarizer
- Serves as the entry point to the RAG Playground, handling user queries and coordinating the retrieval and generation workflow.
- Retrieves relevant document chunks (via embeddings) and generates answers using the LLM.
Before running the project, create a config.ini in the root directory:
[keys]
openrouter_api_key = [YOUR_OPENROUTER_KEY]