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
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.
Neon supports the following extensions for enabling Postgres as your vector database.
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 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.
Check out the following AI application examples built with Neon.
Semantic search app
Build an AI-powered semantic search application
Build an AI-powered chatbot with pgvector
Vercel Postgres pgvector Starter
Enable vector similarity search with Vercel Postgres
Web-based AI SQL Playground
Build an AI-enabled SQL playground for natural language queries
Jupyter Notebook for vector search with Neon
Jupyter Notebook for vector search with Neon, pgvector, and OpenAI