Skip to content

vector_chem

Tanimoto distance for binary-valued pgvector vectors.

pgvector_chem · Tanimoto distance for binary-valued pgvector vectors.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102071vector_chempgvector_chem0.1.0RAGPostgreSQLC
Relationships
Requiresvector

Usage

Sources:

vector_chem adds Tanimoto/Jaccard distance to the pgvector type for dichotomous values. It exposes the <^> operator and tanimoto_distance function.

Core Workflow

CREATE EXTENSION vector;
CREATE EXTENSION vector_chem;
SELECT tanimoto_distance('[1,0,1]'::vector, '[1,0,0]'::vector);

Operational Boundaries

Install the matching pgvector library and enable vector first; the SQL uses its type even though the control omits the dependency. Installation requires superuser privileges. No preload is documented. Continuous-valued vectors and approximate-nearest-neighbor indexing are not supported by this extension; it is a scalar distance implementation.

Table reader