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:
Enable the
pgvector
extension.Load the movie data into the table.
Use the movie recommendation service.
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.
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.
Sign up for a free Aiven account and log in to Aiven Console.
Create a PostgreSQL service.
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".
Note down the Service URI because it will be used in subsequent steps. ...