Skip to content

Latest commit

 

History

History
103 lines (81 loc) · 19 KB

README.md

File metadata and controls

103 lines (81 loc) · 19 KB

LLM RAG

Configuration

Environment

  • Copy .env.example file to .env
  • Fill in the required values

Installation

Using pip

  • Create and activate new Python virtual environment
  • pip install -r requirements.txt
  • pip install -e . (basic packages)
    or
    pip install -e .[ragatouille] (with ragatouille for ColBERT)

Using uv

  • uv sync --group dev (basic packages)
    or
    uv sync --group dev --extra ragatouille (with ragatouille for ColBERT)
  • uv pip install -e .

RAG From Scratch

Author of original series - Lance Martin

Original Sources

Video

YouTube Playlist

Code

Main Repository
Corrective RAG (CRAG)
Self-RAG

Table of Contents

Part Name Video Slides Jupyter Notebook Python Script LangGraph Studio
1 Overview Watch View 01-overview.ipynb - -
2 Indexing Watch View 02-indexing.ipynb - -
3 Retrieval Watch View 03-retrieval.ipynb - -
4 Generation Watch View 04-generation.ipynb - -
5 Query Translation - Multi-Query Watch View 05-multi-query.ipynb multi_query.py Query Translation - Multi-Query
6 Query Translation - RAG-Fusion Watch View 06-rag-fusion.ipynb rag_fusion.py Query Translation - RAG-Fusion
7 Query Translation - Decomposition Watch View 07-01-decomposition-recursive.ipynb
07-02-decomposition-parallel.ipynb
recursive.py
parallel.py
Query Translation - Decomposition (Recursive)
Query Translation - Decomposition (Parallel)
8 Query Translation - Step-Back Prompting Watch View 08-step-back.ipynb step_back.py Query Translation - Step-Back Prompting
9 Query Translation - HyDE Watch View 09-hyde.ipynb hyde.py Query Translation - HyDE
10 Routing Watch View 10-01-logical-routing.ipynb logical.py
semantic.py
Routing - Logical Routing
Routing - Semantic Routing
11 Query Construction Watch View 11-query-construction.ipynb self_query.py Query Construction - Self-Query
12 Indexing - Multi-Representation Indexing Watch View 12-01-multi-vector-summary.ipynb
12-02-multi-vector-chunks.ipynb
12-03-multi-vector-hypothetical-questions.ipynb
summary.py
chunks.py
hypothetical_questions.py
Indexing - Multi-Vector - Summary
Indexing - Multi-Vector - Chunks
Indexing - Multi-Vector - Hypothetical Questions
13 Indexing - RAPTOR Watch View 13-raptor.ipynb raptor.py -
14 Indexing - ColBERT Watch View 14-colbert.ipynb colbert_model.py -
15 Retrieval - CRAG Watch - 15-crag.ipynb crag.py Retrieval - CRAG
16 Generation - Self-RAG Watch - 16-self-rag.ipynb self_rag.py Generation - Self-RAG

Query Translation

RAG Fusion

Forget RAG, the Future is RAG-Fusion
RAG-Fusion: The Next Frontier of Search Technology
Reciprocal Rank Fusion outperforms Condorcet and individual Rank Learning Methods
Implementing Reciprocal Rank Fusion (RRF) in Python

Decomposition (Recursive)

Least-to-Most Prompting Enables Complex Reasoning in Large Language Models
Interleaving Retrieval with Chain-of-Thought Reasoning for Knowledge-Intensive Multi-Step Questions

Step-Back Prompting

Take a Step Back: Evoking Reasoning via Abstraction in Large Language Models

HyDE

Precise Zero-Shot Dense Retrieval without Relevance Labels

Routing

Semantic Router

Query Construction

Langchain Self Query With Dates

Indexing

Multi-Representation Indexing

Dense X Retrieval: What Retrieval Granularity Should We Use?

RAPTOR

RAPTOR: Recursive Abstractive Processing for Tre-Organized Retrieval Building long context RAG with RAPTOR from scratch

ColBERT

ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT
ColBERTv2: Effective and Efficient Retrieval via Lightweight Late Interaction
RAGatouille
[Paper review] ColBERT, ColBERTv2
Overcoming the Limits of RAG with ColBERT
ColBERT Inference in the Browser

Agentic RAG

Self-Reflective RAG with LangGraph

CRAG

Corrective Retrieval Augmented Generation

Self-RAG

Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection