@ragfoundry/adapter-vector-qdrant
v0.1.2
Published
Qdrant vector store adapter for RAGFoundry.
Maintainers
Readme
@ragfoundry/adapter-vector-qdrant
🗄️ Qdrant vector store adapter. Store and search embeddings in Qdrant, self-hosted or Qdrant Cloud.
A VectorStore adapter for RAGFoundry — typed retrieval-augmented generation for TypeScript.
💡 New to RAGFoundry? This page is for adding one specific provider to an app you're already building. Starting a project from scratch is faster with the scaffolder — it asks a few questions and wires everything (including this adapter, if you pick it) for you:
npm create @ragfoundry my-app
📦 Install
npm install @ragfoundry/core @ragfoundry/adapter-vector-qdrant🚀 Usage
Works with both import and require — this package ships both builds.
ESM:
import { createRAG } from "@ragfoundry/core"
import "@ragfoundry/adapter-vector-qdrant"
const rag = createRAG({
vectorStore: {
provider: "qdrant",
url: process.env.QDRANT_URL ?? "http://localhost:6333",
collectionName: "documents",
},
// ...the rest of your config
})CommonJS:
const { createRAG } = require("@ragfoundry/core")
require("@ragfoundry/adapter-vector-qdrant")
const rag = createRAG({
vectorStore: {
provider: "qdrant",
url: process.env.QDRANT_URL ?? "http://localhost:6333",
collectionName: "documents",
},
// ...the rest of your config
})⚠️ The import/require is what registers "qdrant" at runtime — remove
it and createRAG throws Unknown adapter "qdrant", even though the
provider name is still typed correctly. In TypeScript it's also what makes the
vectorStore block above autocomplete and type-check.
⚙️ Options
| Option | Type | Required | Default |
|---|---|---|---|
| url | string | yes | — |
| collectionName | string | yes | — |
| apiKey | string | no | — |
Collection
Create it first, sized to your embedding model:
curl -X PUT "$QDRANT_URL/collections/documents" \
-H 'content-type: application/json' \
-d '{"vectors":{"size":768,"distance":"Cosine"}}'Point ids
Qdrant accepts only unsigned integers or UUIDs as point ids, but chunk ids are
readable strings like guide.md-3. The adapter hashes the logical id into a
deterministic UUIDv5 and keeps the original in the payload, so re-ingesting a
document overwrites its points instead of duplicating them — and queries
still return the id you wrote. Ids Qdrant already accepts pass through
untouched.
🔗 See also
@ragfoundry/core— the pipelines, types, and every export explained@ragfoundry/create—npm create @ragfoundry, scaffold a whole project
📄 License
MIT
