Skip to content

labdmitriy/llm-rag

Repository files navigation

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

YouTube Playlist
Repository

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 -

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

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published