Image created by author using Dalle-3 via Bing Chat

Advance RAG- Improve RAG performance

Luv Bansal
10 min readFeb 26, 2024

--

Image source: Seven Failure Points When Engineering a Retrieval Augmented Generation System

Breakdown of RAG workflow

Pre-Retrieval

Pre-Retrieval in RAG

Retrieval

Post-Retrieval

Retrieval and Post-Retrieval in RAG

Goal

Pre-Retrieval Optimisation

Enhancing data granularity

Chunking Optimisation

Chunking Techniques

Small2big or Parent Ducument Retrieval chunking technique

Sentence Window Retrieval

Explains how Sentence Window Retrieval works
Sentence Window Retrieval chunking technique in RAG

Retrieval Optimisation

Query Rewriting

MultiQuery Retriever
Fig, show difference between Standard and Hyde approach
Image Source: Precise Zero-Shot Dense Retrieval without Relevance Labels
Image Source: TAKE A STEP BACK: EVOKING REASONING VIA ABSTRACTION IN LARGE LANGUAGE MODELS

Fine-tuning Embedding

Fine-tune embedding model by synthetic generated dataset using GPT

Hybrid Search Exploration

Hybrid Search Retrieval

Post-Retrieval Optimisation

Re-Ranking

Re-Ranking the retrieved document using Cohere Reranker

Prompt Compression

Contextual compression

Modular RAG

RAG Fusion

Image source: RAG-FUSION: A NEW TAKE ON RETRIEVAL-AUGMENTED GENERATION

Final thoughts

Medium’s Boost / AI Life Hacks /FREE GPTs alternative/ Video2Wolds

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Luv Bansal
Luv Bansal

Written by Luv Bansal

ML Ops @Clarifai. All about Machine Learning, GenerativeAI and LLMs