RAG-Driven Generative AI : Build Custom Retrieval Augmented Generation Pipelines with LlamaIndex, Deep Lake, and Pinecone /

Bibliographic Details
Main Author: Rothman, Denis (Author)
Corporate Author: EBSCOhost
Format: eBook
Language:English
Published: Birmingham : Packt Publishing, 2024.
Series:Expert insight.
Subjects:
Online Access:Connect to the full text of this electronic book
Table of Contents:
  • Cover
  • Copyright Page
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: Why Retrieval Augmented Generation?
  • What is RAG?
  • Naïve, advanced, and modular RAG configurations
  • RAG versus fine-tuning
  • The RAG ecosystem
  • The retriever (D)
  • Collect (D1)
  • Process (D2)
  • Storage (D3)
  • Retrieval query (D4)
  • The generator (G)
  • Input (G1)
  • Augmented input with HF (G2)
  • Prompt engineering (G3)
  • Generation and output (G4)
  • The evaluator (E)
  • Metrics (E1)
  • Human feedback (E2)
  • The trainer (T)
  • Naïve, advanced, and modular RAG in code
  • Part 1: Foundations and basic implementation
  • 1. Environment
  • 2. The generator
  • 3. The Data
  • 4.The query
  • Part 2: Advanced techniques and evaluation
  • 1. Retrieval metrics
  • 2. Naïve RAG
  • 3. Advanced RAG
  • 4. Modular RAG
  • Summary
  • Questions
  • References
  • Further reading
  • Chapter 2: RAG Embedding Vector Stores with Deep Lake and OpenAI
  • From raw data to embeddings in vector stores
  • Organizing RAG in a pipeline
  • A RAG-driven generative AI pipeline
  • Building a RAG pipeline
  • Setting up the environment
  • The installation packages and libraries
  • The components involved in the installation process
  • 1. Data collection and preparation
  • Collecting the data
  • Preparing the data
  • 2. Data embedding and storage
  • Retrieving a batch of prepared documents
  • Verifying if the vector store exists and creating it if not
  • The embedding function
  • Adding data to the vector store
  • Vector store information
  • 3. Augmented input generation
  • Input and query retrieval
  • Augmented input
  • Evaluating the output with cosine similarity
  • Summary
  • Questions
  • References
  • Further reading
  • Chapter 3: Building Index-Based RAG with LlamaIndex, Deep Lake, and OpenAI
  • Why use index-based RAG?
  • Architecture
  • Building a semantic search engine and generative agent for drone technology
  • Installing the environment
  • Pipeline 1: Collecting and preparing the documents
  • Pipeline 2: Creating and populating a Deep Lake vector store
  • Pipeline 3: Index-based RAG
  • User input and query parameters
  • Cosine similarity metric
  • Vector store index query engine
  • Query response and source
  • Optimized chunking
  • Performance metric
  • Tree index query engine
  • Performance metric
  • List index query engine
  • Performance metric
  • Keyword index query engine
  • Performance metric
  • Summary
  • Questions
  • References
  • Further reading
  • Chapter 4: Multimodal Modular RAG for Drone Technology
  • What is multimodal modular RAG?
  • Building a multimodal modular RAG program for drone technology
  • Loading the LLM dataset
  • Initializing the LLM query engine
  • Loading and visualizing the multimodal dataset
  • Navigating the multimodal dataset structure
  • Selecting and displaying an image
  • Adding bounding boxes and saving the image
  • Building a multimodal query engine