Skip to content

harshitv804/RAG-without-Vector-DB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG without Vector-DB? - Yes

About:

This project introduces a novel approach to Cosmos data analysis, diverging from conventional techniques reliant on embeddings and vector databases. The methodology employed involves a TFID retriever, complemented by a meticulous long context reordering and a flash reranker. This innovative approach results in a substantial improvement in retrieval speed, particularly noteworthy with a parameter setting of k=8, while concurrently achieving accuracy levels closely aligned with those obtained through vector databases.

Check out the live demo on Hugging Face

Comparison: VectorDB vs. No VectorDB:

S.No RAG with VectorDB RAG without VectorDB
1. Methodology Vector Embeddings TFID Retriever + LC Reorder + FlashReRanker
2. Storage Requirements Higher storage demand with additional computation Minimal storage needed solely for the data
3. Retrieval Speed Rapid retrieval with VectorDB Moderately fast retrieval without VectorDB
4. Retrieval Accuracy Achieves k <= 5 Attains k <= 8

Architecture Diagram:

Special thanks to Prithiviraj Damodaran for developing a light-weight and powerful re-ranker.