Skip to main content
Vector Database

A key component of many AI and machine learning (ML) systems is the ability to handle and manipulate vectors and embeddings, which represent complex, high-dimensional data in a way that machines can efficiently understand and process.

What are Embeddings?

Embeddings involve converting data or intricate objects such as text, images, or audio into numerical lists within a high-dimensional space.

This technique is essential in all machine learning (ML) and deep learning (DL) algorithms, enabling the capture and understanding of data meaning and context (semantic relationships) as well as complex relationships and patterns within the data (syntactic relationships).

What is pgvector?

Pgvector is an open-source extension for PostgreSQL that enhances vector similarity. PostgreSQL is a renowned and robust database that includes all the standard features expected from SQL databases, such as joins, subqueries, window functions, stored procedures, and triggers. It also supports ACID compliance, role-based and row-level security, backups, partitioning, sharding, auditing, and more.

This makes pgvector immediately suitable for enterprise use. It enables the integration of existing solutions while extending them to store embeddings without the need to migrate data between SQL and vector databases. They can coexist seamlessly, simplifying and enhancing integration efficiency.

Pgvector introduces new column types and operations within the PostgreSQL engine, allowing for the storage of vectors with up to 2000 dimensions. Users can perform various vector calculations, including element-wise addition, subtraction, and multiplication. It also facilitates searching for both exact and approximate nearest neighbors, as well as calculating L2 distance, inner product distance, and cosine distance. Almost all essential vector operations can be executed using pgvector.

With these valuable features, pgvector is increasingly utilized in generative AI solutions. Click here to learn more about our generative AI services for enterprise applications.