
PostgreSQL: First Approach to Vector Databases with pgvector and Python
If you're already familiar with relational databases like PostgreSQL, you're one step closer to start with vector databases and build AI applications. Through this tutorial you'll learn how to enable vector capabilities on your PostgreSQL instance using pgvector , transform raw text into the required format using Python, and perform searches. Set PostgreSQL as a Vector Database First of all, what is a vector database? In a vector database, information is stored as vectors—often referred to as embeddings. These contain numerical values that represent the meaning of the data, allowing LLMs to interpret and relate information. Query results are determined by the values within these vectors, returning the nearest vectors based on similarity. Imagine having a text like: 'Artificial Intelligence is transforming the way we process data in PostgreSQL.'. When converting this value using an embedding model, you'll get a high-dimensional vector that looks like this: [-0.015540238, 0.0014074693, 0
Continue reading on Dev.to Tutorial
Opens in a new tab


