Powering next gen AI apps with Postgres 🚀 Learn More
AI & embeddings

AI & embeddings

Build AI applications with Neon serverless Postgres as your vector database

Vector databases enable efficient storage and retrieval of vector data, which is an essential component in building AI applications that leverage Large Language Models (LLMs) such as OpenAI.

Neon supports the pgvector and pg_embedding open-source extensions, either of which allow you to enable Postgres as a vector database for storing and querying vector embeddings.

By enabling Postgres as a vector database, you can keep your data in the open source database that you know and trust. There's no need for data migration or a proprietary vector storage solution.

Vector extensions

Neon supports the following extensions for enabling Postgres as your vector database.

pgvector

pgvector is an open-source extension that enables storing vector embeddings and vector similarity search in Postgres. It supports both ivfflat and HNSW indexes. To get started, see The pgvector extension.

pg_embedding

pg_embedding is an open-source extension that enables storing vector embeddings and graph-based vector similarity search in Postgres using the Hierarchical Navigable Small World (HNSW) algorithm. It supports HNSW indexes. To get started, see The pg_embedding extension.

Example applications

Check out the following AI application examples built with Neon.

Edit this page
Was this page helpful?