To Data & Beyond

To Data & Beyond

Building RAG Application using Gemma 7B LLM & Upstash Vector Database

Youssef Hosni's avatar
Youssef Hosni
Mar 08, 2024
∙ Paid

To Data & Beyond is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

Retrieval-Augmented Generation (RAG) is the concept of providing large language models (LLMs) with additional information from an external knowledge source. This allows them to generate more accurate and contextual answers while reducing hallucinations. In this article, we will provide a step-by-step guide to building a complete RAG application using the latest open-source LLM by Google Gemma 7B and Upstash serverless vector database. 

Table of Contents:

  1. Getting Started & Setting Up Working Environment 

  2. Download & Split the Cosmopedia Dataset

  3. Generating Embedding with Sentence Transformers Model

  4. Store the Embeddings in the Upstash Vector Database

  5. Introduce & Use Gemma 7B LLM 

  6. Querying the RAG Application

User's avatar

Continue reading this post for free, courtesy of Youssef Hosni.

Or purchase a paid subscription.
© 2026 Youssef Hosni · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture