Building a RAG System With Google Gemma, Hugging Face and MongoDB

preview_player
Показать описание
In this video, we will walk you through the process of building a RAG system using the Google's Gemma open model, GTE embedding models and MongoDB as the vector database.
We will be using Hugging Face as the model provider for this stack.

By the end of this video, you will have a clear understanding of how to build a RAG system using the latest Gemma model and MongoDB

⏱️ Timestamps
00:00 Introduction to the video topic and resources
01:06 Overview of Google's new open model - Gemma
01:35 Accessing Gemma models via Hugging Face
01:49 Setting up the development environment with necessary libraries
03:28 Loading and preparing the dataset for the recommender system
04:45 Exploring and selecting embedding models from Hugging Face
06:03 Encoding text to numerical representation with sentence transformers
07:00 Setting up and connecting to MongoDB database and collection
08:50 Creating a vector search index in MongoDB
10:50 Ingesting data into MongoDB and
13:05 Executing a vector search
14:55 Formatting and obtaining search results from the vector search
15:45 Crafting a user query for the recommender system
16:42 Utilizing Gemma for generating responses to user queries
19:00 Conclusion and invitation to subscribe to the channel

🧾 Article:

💻 Code:

📈 Hugging Face Dataset:

Thanks for Watching.

#artificialintelligence #machinelearning #aiengineer #openai #llamaindex
Рекомендации по теме
Комментарии
Автор

I think the demo needs to be updated to handle "granted access" to the Google gemma models. You also need an HF token in your colab secrets to access the models: change the checkpoint you've been granted access to in the calls to create the tokenizer and the model and add the token=your_hf_token to each of the calls.

StephenBacso
Автор

Great video! So if I understood this correctly, RAG basically uses an external vector database to retrieve first the most relevant information performing a similarity search, then grabs this information and it "appends" it to the user prompt resulting in a larger prompt with better contextualization, am I right ?

Evildark
Автор

Thank you so much for this brother <3

deathdefier
Автор

🧾 Article:

💻 Code:

📈 Hugging Face Dataset:

Thanks for Watching.

richmond_a
Автор

Hello, thanks for the video! I get an error ServerSelectionTimeoutError when I execute collection.delete_many({}) in spite of having a successful connection to MongoDB in the previous step, do you know what could be the reason? Thanks!

djlarrydjlarry
Автор

Please I how no one from the stackup bounty challenge is here, because we are going to have a big problem😂😂

emeriechristian