💻
RAG and LLM Bootcamp
  • Welcome to the Bootcamp
    • Course Structure
    • Course Syllabus and Timelines
    • Know your Educators
    • Action Items and Prerequisites
    • Kick-Off Session for the Bootcamp
  • Basics of LLMs
    • What is Generative AI?
    • What is a Large Language Model?
    • Advantages and Applications of LLMs
    • Bonus Resource: Multimodal LLMs and Google Gemini
  • Word Vectors, Simplified
    • What is a Word Vector?
    • Word Vector Relationships
    • Role of Context in LLMs
    • Transforming Vectors into LLM Responses
    • Bonus: Overview of the Transformer Architecture
      • Attention Mechanism
      • Multi-Head Attention and Transformer Architecture
      • Vision Transformers (ViTs)
    • Bonus: Future of LLMs? | By Transformer Co-inventor
    • Graded Quiz 1
  • Prompt Engineering and Token Limits
    • What is Prompt Engineering
    • Prompt Engineering and In-context Learning
    • For Starters: Best Practices
    • Navigating Token Limits
    • Hallucinations in LLMs
    • Prompt Engineering Excercise (Ungraded)
      • Story for the Excercise: The eSports Enigma
      • Your Task fror the Module
  • RAG and LLM Architecture
    • What is Retrieval Augmented Generation (RAG)?
    • Primer to RAG: Pre-trained and Fine-Tuned LLMs
    • In-context Learning
    • High-level LLM Architecture Components for In-context Learning
    • Diving Deeper: LLM Architecture Components
    • Basic RAG Architecture with Key Components
    • RAG versus Fine-Tuning and Prompt Engineering
    • Versatility and Efficiency in RAG
    • Key Benefits of using RAG in an Enterprise/Production Setup
    • Hands-on Demo: Performing Similarity Search in Vectors (Bonus Module)
    • Using kNN and LSH to Enhance Similarity Search (Bonus Module)
    • Bonus Video: Implementing End-to-End RAG | 1-Hour Session
    • Graded Quiz 2
  • Hands-on Development
    • Prerequisites (Must)
    • Docker Basics
    • Your Hands-on RAG Journey
    • 1 – First RAG Pipeline
      • Building with Open AI
      • How it Works
      • Using Open AI Alternatives
      • RAG with Open Source and Running "Examples"
    • 2 – Amazon Discounts App
      • How the Project Works
      • Building the App
    • 3 – Private RAG with Mistral, Ollama and Pathway
      • Building a Private RAG project
      • (Bonus) Adaptive RAG Overview
    • 4 – Realtime RAG with LlamaIndex/Langchain and Pathway
      • Understand the Basics
      • Implementation with LlamaIndex and Langchain
  • Final Project + Giveaways
    • Prizes and Giveaways
    • Suggested Tracks for Ideation
    • Sample Projects and Additional Resources
    • Submit Project for Review
Powered by GitBook
On this page
  1. Hands-on Development

1 – First RAG Pipeline

PreviousYour Hands-on RAG JourneyNextBuilding with Open AI

Last updated 10 months ago

Welcome! In this guide, we’ll walk you through setting up a RAG project using the GPT-3.5 model (by Open AI) and Pathway. With this module, you will create a basic RAG pipeline that uses a set of external files stored in the data folder, extracts relevant information, and updates results as documents change or new ones arrive.

  • You'll use the in-memory vector store by Pathway that is persistent, scalable and production-ready. While using the same, you won't have to worry about using an external vector database (e.g. Pinecone, Weaviate, etc.).

  • For retrieval: By default, your app uses a local data source to read documents from the data folder. Retrieval is taken care by the Pathway framework hence you don't need to use additional librarires (e.g. FAISS, etc.) for retrievers.

  • Choice of LLM: In your first RAG pipeline you can go for GPT-3.5 as shown ahead. It's a powerful LLM and is one of the cost-effective options provided by the makers of ChatGPT. Alternatively should you wish to use multimodal LLMs such as GPT-4o, Claude-3.5 Sonnet, Gemini Pro, etc. – that's doable. But we'll look at them later so it's easy for you to follow a gradual process of hands-on learning.

Key Feature: Your application will stand out as it

  • Uses an in-memory vector store that is easily scalable in enterprise applications.

  • Automatically reacts to the latest changes in your external data store. For example, any change in your Google Drive or Data folder will be reflected in your RAG application right away.

  • Using this approach, you can make your AI application run in permanent connection and sync with your drive, in sync with your documents which include visually formatted elements: tables, charts, etc.

Prerequisites

Before we begin, ensure you have the following prerequisites:

  1. Docker Desktop: This tool allows you to run applications in isolated containers (quick introduction of containerization is below). It ensures consistency across different environments. . (Note: Your antivirus software might block the installation, so temporarily disable it if needed.)

  2. OpenAI API Key: Sign up on the OpenAI website and generate an API key from the . (Remember, don’t share your OpenAI API key with anyone.)

Optional

  • VS Code Docker Extension: If you’re using VS Code, consider installing the Docker extension to manage containers directly from the editor.

Download Docker Desktop
API Key Management page