...

/

Hands-On Application: Movie Recommendation Service

Hands-On Application: Movie Recommendation Service

Walk through a movie recommendation service that uses PostgreSQL as a vector database.

Let's learn how to build a simple yet practical application 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. Enable the pgvector extension.

  2. Load the movie data into the table.

  3. Use the movie recommendation service.

Press + to interact
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 the PostgreSQL database. The movie data is converted into vector embeddings and loaded into the database as a separate process.

Press + to interact
High-level architecture
High-level architecture

Set up managed PostgreSQL service

Aiven is a fully managed cloud database platform that provides various open-source database services, including PostgreSQL. It offers an easy way to set up and manage a PostgreSQL database with vector search capabilities, allowing us to focus on building our application rather than managing database infrastructure.

  1. Sign up for a free Aiven account and log in to Aiven Console.

  2. Create a PostgreSQL service.

  3. In the Aiven console, go to the organization > project > Aiven for PostgreSQL service. On the "Overview" page of the service, under "Connection information", copy the "Service URI".

  4. Note down the Service URI because it will be used in subsequent steps. ...

Enable pgvector extension and create table