Create knowledge bases
Choose storage, chunking, and a fixed embedding space.
Use a key with knowledge:create and an existing enabled embedding model with working provider credentials. Managed vector storage must be available in your deployment. Model discovery requires model/provider read permissions.
Choose dimensions supported by the selected model; replace the illustrative model and dimension values below with your configuration. Model, dimensions and distance metric stay fixed after creation.
const base = await nirmos.knowledge.create({
name: "Support policy",
slug: "support-policy",
vectorStore: { mode: "nirmos_managed" },
embeddingModel: "configured/embedding-model",
embeddingDimensions: 1536,
chunkSize: 800,
chunkOverlap: 100,
});
console.log(base.id);Chunk size and overlap control splitting supplied content. Choose them before indexing and evaluate retrieval on representative questions.
Bring your own storage
vectorStores exposes list/get/create/update/delete/test. Only Qdrant executes. Configure private BYO credentials in trusted administrative code, then pass vectorStoreConnectionId at KB creation. Managed usage needs no physical connection ID or browser Qdrant access.
Creating or testing a vector-store connection requires the relevant vectorStore:create or vectorStore:test permission. Store connection secrets in trusted administrative code. Index documents after creating the base. Knowledge methods · Vector-store methods