AbsoluteJS

@absolutejs/rag-postgres

@absolutejs/rag-postgresv0.0.12betaAI

PostgreSQL (pgvector) vector-store adapter for @absolutejs/rag

#Installation

BASH
bun add @absolutejs/rag-postgres

#Capabilities

Overview

PostgreSQL vector-store adapter for @absolutejs/rag, with pgvector as the first vector implementation. Native vector search, server-side filtering, and inspectable schema/migration plans.

Usage

Schema and migrations

Inspect the generated SQL or apply migrations explicitly:

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/rag-postgres through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/rag-postgres version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/rag-postgres example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Usage

Partial snippet

Working example for Usage.

TS
import { createPostgresRAG } from '@absolutejs/rag-postgres';
import { ragPlugin } from '@absolutejs/rag';

const rag = createPostgresRAG({
	connectionString: process.env.DATABASE_URL,
	vector: {
		provider: 'pgvector',
		dimensions: 1536,
		distanceMetric: 'cosine',
		autoCreateExtension: true,
		autoCreateSchema: true,
		autoCreateTables: true,
		autoCreateIndex: true,
		index: { type: 'hnsw', efSearch: 100, efConstruction: 64, m: 16 }
	},
	schema: { schemaName: 'absolute_rag', chunkTableName: 'chunks' }
});

app.use(ragPlugin({ path: '/rag', collection: rag.collection }));

#Schema and migrations

Partial snippet

Inspect the generated SQL or apply migrations explicitly:

TS
const schemaPlan = rag.getSchemaPlan();
const migrationPlan = rag.getMigrationPlan();
await rag.applyMigrations();

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/rag-postgres@absolutejs/rag-postgres/manifest@absolutejs/rag-postgres/manifest.json

#Package commands

Scripts declared by this package manifest.

bun run buildrm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/rag --external @absolutejs/rag/adapter-kit --external @absolutejs/ai && tsc --project tsconfig.build.json && absolute-manifest emit
bun run formatprettier --write "./**/*.{ts,json,md}"
bun run testbun test
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

15 symbols
ABSOLUTE_POSTGRESQL_RAG_PACKAGE_NAMEvaluePermalinkSource
TS
const ABSOLUTE_POSTGRESQL_RAG_PACKAGE_NAME = "@absolutejs/rag-postgres";
Exported from @absolutejs/rag-postgres