Aman's AI Journal • NLP • Retrieval Augmented Generation
A potential solution could be to combine the strengths of both databases: indexing parsed entity relationships with vector representations in a graph database for more flexible information retrieval. It remains to be seen if such a hybrid model exists. The image below (source), gives a visual overview of the three different steps of RAG: Ingestion, Retrieval, and Synthesis/Response Generation. In the sections below, we will go over these key areas. Building a RAG system involves determining the ideal chunk sizes for the documents that the retriever component will process. The ideal chunk size depends on several factors: Data Characteristics: The nature of your data is crucial. For text documents, consider the average length of paragraphs or sections. If the documents are well-structured with distinct sections, these natural divisions might serve as a good basis for chunking. Retriever Constraints: The retriever model you choose (like BM25, TF-IDF, or a neural retriever like DPR) might
Overview Motivation The Retrieval Augmented Generation (RAG) Pipeline Advantages of RAG RAG vs. Fine-tuning Ensemble of RAG Choosing a Vector DB using a Feature Matrix Building a RAG pipeline Ingestion Chunking Figuring out the ideal chunk size Retriever Ensembling and Re-ranking Embeddings Naive Chunking vs. Late Chunking vs. Late Interaction (ColBERT and ColPali) Overview Naive/Vanilla Chunking What is Naive/Vanilla Chunking? Example Advantages and Limitations Late Chunking What is Late Chunking? How Late Chunking Works Example Advantages and Trade-offs Late Interaction What is Late Interact
related reading
- Vinija's Notes • NLP • Retrieval Augmented Generationvinija.ai
- Code a simple RAG from scratchhuggingface.co
- Advanced Retriever Techniques to Improve Your RAGs | Towards Data Sciencetowardsdatascience.com
- Retrieval Augmented Generation: Streamlining the creation of intelligent natural language processing modelsai.facebook.com
- Rerankers and Two-Stage Retrieval | Pineconepinecone.io
- Advanced RAG Techniques: What They Are & How to Use Themfalkordb.com
- [2005.11401] Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasksarxiv.org
- Optimizing RAG: A Guide to Choosing the Right Vector Database | by Mutahar Ali | Mediummedium.com
- RAG Architecture Deep Divelinkedin.com
- Retrieval-Augmented Generation for Large Language Models: A Surveyarxiv.org
- Building Enterprise AI: Hard-Won Lessons from 1200+ Hours of RAG Developmentbytevagabond.com
- Patterns for Building LLM-based Systems & Productseugeneyan.com