Being-Creative-with-AI/C4/Setting-up-the-RAG-environment-in-Linux/English
Title of the Script: Setting up the RAG environment in Linux.
Author: EduPyramids
Keywords: RAG, Python, Linux, Ubuntu, LangChain, ChromaDB, Embeddings, Vectors, Retrieval, AI, Terminal, pip, Search, Environment, EduPyramids, video tutorial.
| Visual Cue | Narration |
| Slide 1
Title Slide |
Welcome to this Spoken Tutorial on Setting up the RAG environment in Linux. |
| Slide 2
Learning Objective |
In this tutorial, we will learn how to:
|
| Slide 3
Disclaimer Slide As AI tools constantly evolve, if you are unable to locate any icon or encounter difficulty at any step, you may use any conversational AI Chatbot for guidance. |
As AI tools constantly evolve, if you are unable to locate any icon or encounter difficulty at any step, you may use any conversational AI Chatbot for guidance. |
| Slide 4
System Requirements |
To record this tutorial, I am using:
Learners will also need a working internet connection |
| Slide 5
Prerequisites |
To follow this tutorial, * Basic understanding of Python will be helpful, but not mandatory
For the Prerequisites of this tutorial, visit the website shown on your screen |
| Slide 6
Code files The following code file is required to practice this tutorial
This file is provided in the Code Files link of this tutorial page Please download and extract the file. |
The following code file is required to practice this tutorial.
This file is provided in the Code Files link of this tutorial page. Please download and extract the file. |
| Let us begin. | |
| Press Ctrl + Alt + T keys simultaneously. | Press Ctrl, Alt, and T keys simultaneously to open the terminal. |
| Type: python3 --version and press Enter | In the terminal window, type this command and press Enter.
The Python version is displayed. |
| Highlight Python version. | Ubuntu usually comes with Python pre-installed by default.
In this tutorial, my system is using Python 3.12.3 If your system does not have Python installed, please follow the given steps below. |
| Type:
sudo apt update and press Enter. |
Now in the terminal, type this command and press Enter. |
| Enter the administrative password if prompted. | Enter the administrative password if prompted. |
| Highlight:
sudo apt update |
This command refreshes the list of available packages from Ubuntu’s repositories |
| Type:
sudo apt install python3 python3-venv python3-pip |
Now type this command carefully |
| Highlight:
sudo apt install python3 python3-venv python3-pip Now press Enter |
This installs Python, pip, and packages needed for virtual environments.
Now press Enter |
| Press Y to continue and press Enter | Terminal asks Do you want to continue? Press Y to continue and press Enter
This may take some time. The installation is now completed. |
| Now let us create a new project folder. | |
| Type : mkdir rag_project and press enter | Type this command and press Enter |
| Highlight the folder in the home directory. | A new folder is created in the home directory |
| Type: cd rag_project and press Enter | Switch back to the terminal.
Type: cd rag_project and press Enter to go inside the folder. |
| Highlight the prompt. | Notice that the prompt changes to the project directory. |
| Let us now create a virtual environment. | |
| Type: python3 -m venv venv and press Enter. | Type this command and press Enter. |
| A virtual environment isolates project dependencies.
It prevents conflicts with system-wide packages. | |
| Type: source venv/bin/activate and press Enter. | Now let us activate the virtual environment.
Type this command and press Enter. |
| Cursor on the Prompt change | The environment name appears in the terminal, indicating its activation. |
| Terminal | Now we need to install the required libraries. |
| Type: pip install pandas chromadb langchain langchain-community sentence-transformers and press Enter
Highlight LangChain Highlight Sentence-transformers Highlight ChromaDB |
Pause the tutorial and type this command carefully and press Enter.
This command installs all libraries required for the RAG environment setup. LangChain manages the retrieval workflow in the RAG pipeline. Sentence-transformers convert text into embeddings. Embeddings represent the meaning of text as vectors for retrieval. ChromaDB stores embeddings for similarity search and retrieval. |
| Installation progress | This may take some time.
Python is installed, and the required libraries are configured Now the setup is complete. |
| The system is now ready for building a RAG application. | |
| With this, we come to the end of this tutorial. | |
| Slide 7
Summary In this tutorial, we learnt how to:* Create a working environment to build a RAG system. |
In this tutorial, we learnt how to:* Create a working environment to build a RAG system. |
| Slide 8
Acknowledgement Domain Inputs: Bhavani Shankar R and Saisudha Sugavanam Script Writer: Ketki Naina Admin Reviewer: Arthi Varadarajan Quality Reviewer: Sakina Sidhwa Novice Reviewer: Misbah Samir AI Narration: Debosmita Mukherjee Screen Recording: Ketki Naina Video Editor: Arvind Pillai Web Developer: Ankita Singhal |
Thank you for joining. |
| Slide 9
Acknowledgement This Spoken Tutorial is brought to you by EduPyramids Educational Services Private Limited at SINE, IIT Bombay. |