RAG-Driven Generative AI

by Denis Rothman

Artificial Intelligence

Book Details

Book Title

RAG-Driven Generative AI

Author

Denis Rothman

Publisher

Packt

Publication Date

2024

ISBN

9781836200918

Number of Pages

493

Language

English

Format

PDF

File Size

4.1MB

Subject

Generative AI

Table of Contents

  • Preface
  • Why Retrieval Augmented Generation?
  • What is RAG?
  • Naïve, advanced, and modular RAG configurations
  • RAG versus fine-tuning
  • The RAG ecosystem
  • Naïve, advanced, and modular RAG in code
  • Summary
  • Questions
  • References
  • Further reading
  • 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
  • Evaluating the output with cosine similarity
  • Summary
  • Questions
  • References
  • Further reading
  • Building Index-Based RAG with LlamaIndex, Deep Lake, and OpenAI
  • Why use index-based RAG?
  • Building a semantic search engine and generative agent for drone technology
  • Vector store index query engine
  • Tree index query engine
  • List index query engine
  • Keyword index query engine
  • Summary
  • Questions
  • References
  • Further reading
  • Multimodal Modular RAG for Drone Technology
  • What is multimodal modular RAG?
  • Building a multimodal modular RAG program for drone technology
  • Summary
  • Questions
  • References
  • Further reading
  • Boosting RAG Performance with Expert Human Feedback
  • Adaptive RAG
  • Building hybrid adaptive RAG in Python
  • Summary
  • Questions
  • References
  • Further reading
  • Scaling RAG Bank Customer Data with Pinecone
  • Scaling with Pinecone
  • Pipeline 1: Collecting and preparing the dataset
  • Pipeline 2: Scaling a Pinecone index (vector store)
  • Pipeline 3: RAG generative AI
  • Summary
  • Questions
  • References
  • Further reading
  • Building Scalable Knowledge-Graph-Based RAG with Wikipedia API and LlamaIndex
  • The architecture of RAG for knowledge-graph-based semantic search
  • Pipeline 1: Collecting and preparing the documents
  • Pipeline 2: Creating and populating the Deep Lake vector store
  • Pipeline 3: Knowledge graph index-based RAG
  • Summary
  • Questions
  • References
  • Further reading
  • Dynamic RAG with Chroma and Hugging Face Llama
  • The architecture of dynamic RAG
  • Installing the environment
  • Activating session time
  • Downloading and preparing the dataset
  • Embedding and upserting the data in a Chroma collection
  • Querying the collection
  • Prompt and retrieval
  • RAG with Llama
  • Total session time
  • Summary
  • Questions
  • References
  • Further reading
  • Empowering AI Models: Fine-Tuning RAG Data and Human Feedback
  • The architecture of fine-tuning static RAG data
  • Installing the environment
  • 1. Preparing the dataset for fine-tuning
  • 2. Fine-tuning the model
  • 3. Using the fine-tuned OpenAI model
  • Metrics
  • Summary
  • Questions
  • References
  • Further reading
  • RAG for Video Stock Production with Pinecone and OpenAI
  • The architecture of RAG for video production
  • The environment of the video production ecosystem
  • Pipeline 1: Generator and Commentator
  • Pipeline 2: The Vector Store Administrator
  • Pipeline 3: The Video Expert
  • Summary
  • Questions
  • References
  • Further reading
  • Appendix
  • Other Books You May Enjoy
  • Index