PostgreSQL as a Vector Database: Part 2, Using HNSW Index

preview_player
Показать описание
In this episode, we continue to build a generative AI application that helps select Airbnb vacation homes for travelers heading to San Francisco. The application already utilizes PostgreSQL as a vector database for storing and querying embeddings of Airbnb listings. Our next step is to optimize the performance of the similarity search with the HNSW index.

The HNSW (Hierarchical Navigable Small Worlds) index is among the top-performing vector indexing algorithms used in vector databases worldwide. In this video, you'll learn how to effectively implement it in PostgreSQL.

0:00 Introduction
0:28 Airbnb Recommendations Service, Quick Recap
1:43 Similarity Search and Full Table Scan
3:11 Creating an HNSW Index for Airbnb Listings
5:07 Index Build Time vs. Accuracy Trade-off
5:45 Testing the Index
6:07 Adjusting the Source Code to Enable the Index Scan
7:10 Comparing the Accuracy of Full Table and Index Scans
8:02 What's Next in the PostgreSQL as a Vector Database Series

Resources:
* Airbnb recommendations service:

Curious to learn even more about databases? Follow me here:
Рекомендации по теме
Комментарии
Автор

What is your recommendation for very large vector column/table?

The value of ‘m’ and ef_construction

debarghyadasgupta
Автор

I've received this message: ERROR: access method "hnsw" does not exist.
Do you know what is happening?

ricardo.barcellos
visit shbcf.ru