@absolutejs/rag-pinecone
v0.0.7
Published
Pinecone vector-store adapter for @absolutejs/rag
Downloads
1,025
Maintainers
Readme
@absolutejs/rag-pinecone
Pinecone vector-store adapter for @absolutejs/rag.
Treats Pinecone as the backend boundary: server-side filtering, native vector search,
and explicit opt-in index provisioning helpers.
Install
bun add @absolutejs/rag @absolutejs/rag-pinecone @pinecone-database/pineconeUsage
import { createPineconeRAG } from '@absolutejs/rag-pinecone';
const rag = createPineconeRAG({
apiKey: process.env.PINECONE_API_KEY,
indexName: 'absolute-rag-demo',
namespace: 'production',
vector: {
provider: 'pinecone',
dimensions: 1536,
distanceMetric: 'cosine'
}
});
await rag.store.upsert({
chunks: [
{
chunkId: 'doc-1#0',
text: 'Pinecone stores vectors with attached metadata.',
title: 'Pinecone overview',
source: 'https://docs.pinecone.io',
metadata: { tags: ['vector', 'managed'] }
}
]
});
const hits = await rag.collection.search({ query: 'vector database', topK: 4 });Index provisioning
The Pinecone index is not auto-provisioned at runtime. For explicit, opt-in provisioning use the exported helpers:
import {
describePineconeIndex,
ensurePineconeIndex
} from '@absolutejs/rag-pinecone';
await ensurePineconeIndex({
apiKey: process.env.PINECONE_API_KEY,
indexName: 'absolute-rag-demo',
dimensions: 1536,
metric: 'cosine',
waitUntilReady: true
});License
CC BY-NC 4.0
