Goldfish
Sample · sql · Runs on Northflank

pgvector basics

Create the extension, a table with an embedding column, and an HNSW index.

Matt Yonkovit

Requires: pgvector >= 0.7

Deploy on Northflank →
create extension if not exists vector;

create table documents (
  id bigserial primary key,
  body text,
  embedding vector(1536)
);

create index on documents using hnsw (embedding vector_cosine_ops);