💪
3 Week Bootcamp: Building Realtime LLM Application
  • Introduction
    • Timelines and Structure
    • Course Syllabus
    • Meet your Instructors
    • Action Items
  • Basics of LLM
    • What is Generative AI?
    • What is a Large Language Model?
    • Advantages and Applications of Large Language Models
    • 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
      • Neural Networks and Transformers (Bonus Module)
      • Attention and Transformers (Bonus Module)
      • Multi-Head Attention, Transformers Architecture, and Further Reads (Bonus Module)
    • Graded Quiz 1
  • Prompt Engineering
    • What is Prompt Engineering
    • Prompt Engineering and In-context Learning
    • Best Practices to Follow in Prompt Engineering
    • Token Limits in Prompts
    • Ungraded Prompt Engineering Excercise
      • Story for the Excercise: The eSports Enigma
      • Your Task
  • Retrieval Augmented Generation 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
    • LLM Architecture Diagram and Various Steps
    • RAG versus Fine-Tuning and Prompt Engineering
    • Versatility and Efficiency in Retrieval-Augmented Generation (RAG)
    • Key Benefits of RAG for Enterprise-Grade LLM Applications
    • Similarity Search in Vectors (Bonus Module)
    • Using kNN and LSH to Enhance Similarity Search in Vector Embeddings (Bonus Module)
    • Graded Quiz 2
  • Hands-on Development
    • Prerequisites
    • Dropbox Retrieval App in 15 Minutes
      • Building the app without Dockerization
      • Understanding Docker
      • Building the Dockerized App
    • Amazon Discounts App
      • How the Project Works
      • Repository Walkthrough
    • How to Run 'Examples'
  • Bonus Resource: Recorded Interactions from the Archives
  • Bootcamp Keynote Session on Vision Transformers
  • Final Project + Giveaways
    • Prizes and Giveaways
    • Tracks for Submission
    • Final Submission
Powered by GitBook
On this page
  1. Hands-on Development
  2. Amazon Discounts App

How the Project Works

PreviousAmazon Discounts AppNextRepository Walkthrough

Last updated 1 year ago

The project accomplishes its tasks through a series of steps shared below. Make sure you give it a quick read before proceeding to the next step where we explore the repository.

1 - Realtime Indexing:

  • Sourcing data: A script called mimics real-time data from external sources. It creates or updates a file named discounts.csv with random data. Alongside this, a scheduled task (cron job) using runs every minute to fetch the latest data from Rainforest API. Crontab is a time-based job scheduler.

  • Giving the option to choose particular data source(s): With the Streamlit UI provided, either select Rainforest API as a data source or upload a CSV through the UI file-uploader. It then maps each row into a JSONline schema for better managing large data sets. This format helps in managing large datasets by representing each row as a separate JSON object

  • Chunking: The documents are divided into shorter sections for them to be converted into vector embeddings.

  • Embedding of data source: These shorter sections are processed through the OpenAI API to generate embeddings.

  • Real-time Vector Indexing: An index is created based on these embeddings to facilitate quick searching later on.

2 - Query (Prompt) Embedding and Retrieval

  • Query Embeddinging: For any question asked by the user, an embedding is generated using the OpenAI API for embeddings, i.e. text-embedding-ada-002.

  • Retrieving: The system compares the vector embedding of the query/prompt and the vector embedding of the data source to find the most relevant information.

3 - Prompt Augmentation and Answer Generation

  1. The query/prompt and the most relevant sections of data are packaged into a message within the token limit.

  2. Get Answer from GPT: This message is sent to gpt-3.5-turbo, which then provides an answer.

discounts-data-generator.py
Python Crontab