AbsoluteJS

absolutejs-rag-vector-example

absolutejs-rag-vector-examplev0.0.1betaDev Tools

This demo is pinned to @absolutejs/absolute@0.19.0-beta.644 + @absolutejs/ai@0.0.2 + @absolutejs/rag@0.0.1.

#Installation

BASH
# Private workspace project: ~/abs/examples/rag-vector

#Capabilities

Overview

This demo is pinned to @absolutejs/absolute@0.19.0-beta.644 + @absolutejs/ai@0.0.2 + @absolutejs/rag@0.0.1.

This example now demonstrates four backend modes in one repo:

sqlite-native

Show 10 more

packaged SQLite vec0

mode shows as native_vec0

sqlite-fallback

owned JSON fallback path

mode shows as json_fallback

postgres

PostgreSQL + pgvector

mode shows as native_pgvector

pinecone

managed Pinecone vector index

Run It

SQLite only

This gives you:

sqlite-native

Show 6 more

sqlite-fallback

SQLite + PostgreSQL

Start the local pgvector container (safe to rerun):

Then run the example with PostgreSQL enabled:

Stop the local pgvector container when you are done:

If you want container logs:

Use a Hosted PostgreSQL Database

Docker is only the default local test path.

You can also point the example at a real PostgreSQL database:

Requirements:

Show 3 more

PostgreSQL

pgvector extension available

permission to create the extension, or it already enabled

Use Pinecone

The Pinecone backend is enabled when both PINECONE_API_KEY and PINECONE_INDEX_NAME are set. The package (@absolutejs/rag-pinecone) does not auto-provision indexes — create the index in the Pinecone console first.

Create the index

In the Pinecone console (https://app.pinecone.io):

Show 10 more

Name: anything (this becomes PINECONE_INDEX_NAME)

Dimensions: 1024 to match the demo's deterministic hash embedder default

(override with PINECONE_DIMENSIONS= if you create the index at a different dimension; the embedder generates whatever size you ask for)

Metric: cosine

Capacity mode: serverless is sufficient

Environment variables

Variable — Required — Notes

PINECONE_API_KEY — yes — Account API key from the Pinecone console.

PINECONE_INDEX_NAME — yes — Name of the index you created.

PINECONE_NAMESPACE — no — Logical partition inside the index (default: empty).

How To Test

Open any page:

http://localhost:3000/react

http://localhost:3000/svelte

Show 10 more

http://localhost:3000/vue

http://localhost:3000/angular

http://localhost:3000/html

http://localhost:3000/htmx

In the Diagnostics card:

Select SQLite Native

Confirm:

backend: sqlite

mode: native_vec0

Select SQLite Fallback

Direct API Checks

Default selected mode:

Force fallback:

Force PostgreSQL:

Show 1 more

Run a search:

Notes

sqlite-native uses @absolutejs/rag-sqlite

postgres uses @absolutejs/rag-postgres

PostgreSQL is optional; the example still works without it

Show 1 more

Windows arm64 support is still limited on the SQLite native line because upstream sqlite-vec does not currently ship that target

Outcomes

What you can build

Build on the supported package contract

Use absolutejs-rag-vector-example through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed absolutejs-rag-vector-example 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-vector-example example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#SQLite only

Partial snippet

This gives you:

BASH
cd ~/alex/absolutejs-rag-vector-example
bun dev

#SQLite + PostgreSQL

Partial snippet

Start the local pgvector container (safe to rerun):

BASH
cd ~/alex/absolutejs-rag-vector-example
bun run pg:start

#Package commands

Scripts declared by this package manifest.

bun run devabsolute workspace dev
bun run formatabsolute prettier --write
bun run lintabsolute eslint
bun run test:e2eplaywright test
bun run typecheckabsolute typecheck
Private workspace project
This project is maintained inside the workspace and is not published as a standalone npm package.