Search⌘ K
AI Features

Hands-On Application: Movie Recommendation Service

Explore how to build a movie recommendation service using Redis as a vector database. Learn to create a search index, load movie data with Google AI embeddings, and execute semantic similarity searches using Go. This lesson guides you through integrating Redis and embedding models to provide relevant movie recommendations based on user queries.

Let's learn how to use vector search in Redis to build a simple yet practical application. We will walk through how to implement a service that provides movie recommendations based on user-provided search criteria. This will be split into three important steps, which will be executed in order:

  1. Create a search index.

  2. Load the data into the index.

  3. Use the movie recommendation service.

Key steps in the application
Key steps in the application

Below is the high-level architecture of the solution. In response to a user query for movie recommendations, the application executes a similarity search in Redis. The movie data is converted into vector embeddings and loaded into the database as a separate process.

High-level architecture
High-level architecture

Set up managed Redis service

  1. Create a Redis Cloud account and a free database.

  2. From the "Configuration" details for the new database, in the "General" section, copy the "Public endpoint" of the database.

  3. Note down the endpoint because it will be used in subsequent steps.

  4. From the "Configuration" details for the new database, get the password for the default user.

  5. Note down the password because it will be used in subsequent steps.

Create search index

The search index will be used to execute vector searches across movies. This is specifically for Redis JSON since that's the data structure that will be used to store each movie's information. ...