This repository includes a set of assets that are used in the above course, which dives deeper into the various problems and solutions when building a RAG system in enterprise environments.
The course is available on edX.

The problematic part of a RAG application is usually the retrieval part. The system might retrieve the wrong documents, or only part of them and lead to wrong replies. This is the classical problem in machine learning of the precision-recall-tradeoff.

The following list of complexity factors in real-life documents can lead to a decrease in overall retrieval accuracy, and the various techniques that can improve the retrieval performance.
Mismatch Between Questions and Document Formats
Domain-Specific Jargon
Complex Documents

To set up the project, you have two options: using uv or traditional pip.
Using uv
pip install uv # Install `uv`
uv venv --python cpython-3.12.3-macos-aarch64-none # Create a virtual environment for MacOS with Apple Silicon
source .venv/bin/activate # Activate the virtual environment.
uv pip compile requirements.in --output-file requirements.txt # Compile the project dependencies
uv pip install requirements.txt # Sync the dependencies

If the virtual environment doesn't find pip or other modules:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # get the pip package
python3 get-pip.py # Install the pip package
pip install ipykernel # Install ipykernel to add the support for Jupyter notebooks to VSC
To execute the notebooks in a Jupyter lab environment, you need to add the following commands
python3 -m pip install jupyterlab # Install Jupyter Lab and ipykernel to manager kernels for Jupyter
python3 -m ipykernel install --user --name=.venv --display-name="Python (.venv)" # Create kernel from the virtual environment
jupyter lab
And select the Python (.venv) from the kernel list.
Using traditional pip
python -m venv myenv).pip install -r requirements.txt.Note: The uv method is recommended for its speed, ease of use and management of project dependencies. However, the traditional pip method is also supported for those familiar with it.
Follow the link to the first hands-on lab:
Before the first cells add the following commands
!git clone https://github.com/guyernest/advanced-rag.git
%cd advanced-rag
!pip install -q -r requirements.txt
You might need to restart the Colab runtime at the end of the dependencies installation. Remember to change back to the course folder:
%cd advanced-rag
Follow the link to the first hands-on lab:
Clone the GitHub repository when prompted by the service.
Before the first cells add the following commands:
%cd advanced-rag
!pip install -q -r requirements.txt
56 commits
Jupyter Notebook
100.0%
This repository includes a set of assets that are used in the above course, which dives deeper into the various problems and solutions when building a RAG system in enterprise environments.
The course is available on edX.

The problematic part of a RAG application is usually the retrieval part. The system might retrieve the wrong documents, or only part of them and lead to wrong replies. This is the classical problem in machine learning of the precision-recall-tradeoff.

The following list of complexity factors in real-life documents can lead to a decrease in overall retrieval accuracy, and the various techniques that can improve the retrieval performance.
Mismatch Between Questions and Document Formats
Domain-Specific Jargon
Complex Documents

To set up the project, you have two options: using uv or traditional pip.
Using uv
pip install uv # Install `uv`
uv venv --python cpython-3.12.3-macos-aarch64-none # Create a virtual environment for MacOS with Apple Silicon
source .venv/bin/activate # Activate the virtual environment.
uv pip compile requirements.in --output-file requirements.txt # Compile the project dependencies
uv pip install requirements.txt # Sync the dependencies

If the virtual environment doesn't find pip or other modules:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py # get the pip package
python3 get-pip.py # Install the pip package
pip install ipykernel # Install ipykernel to add the support for Jupyter notebooks to VSC
To execute the notebooks in a Jupyter lab environment, you need to add the following commands
python3 -m pip install jupyterlab # Install Jupyter Lab and ipykernel to manager kernels for Jupyter
python3 -m ipykernel install --user --name=.venv --display-name="Python (.venv)" # Create kernel from the virtual environment
jupyter lab
And select the Python (.venv) from the kernel list.
Using traditional pip
python -m venv myenv).pip install -r requirements.txt.Note: The uv method is recommended for its speed, ease of use and management of project dependencies. However, the traditional pip method is also supported for those familiar with it.
Follow the link to the first hands-on lab:
Before the first cells add the following commands
!git clone https://github.com/guyernest/advanced-rag.git
%cd advanced-rag
!pip install -q -r requirements.txt
You might need to restart the Colab runtime at the end of the dependencies installation. Remember to change back to the course folder:
%cd advanced-rag
Follow the link to the first hands-on lab:
Clone the GitHub repository when prompted by the service.
Before the first cells add the following commands:
%cd advanced-rag
!pip install -q -r requirements.txt
56 commits
Jupyter Notebook
100.0%