Index
A VectorStoreIndex is the basic container for organizing your data. It retrieves the top-k Nodes that can be sent to an LLM for generating a response. The default top-k is 2.
import { Document, VectorStoreIndex } from "@vectorstores/core";
const document = new Document({ text: "test" });
const index = await VectorStoreIndex.fromDocuments([document]);