A retriever that retrieves documents from a vector store and a document store. It uses the vector store to find relevant documents based on a query, and then retrieves the full documents from the document store.
const retriever = new MultiVectorRetriever({ vectorstore: new FaissStore(), byteStore: new InMemoryStore<Unit8Array>(), idKey: "doc_id", childK: 20, parentK: 5,});const retrieverResult = await retriever.getRelevantDocuments("justice breyer");console.log(retrieverResult[0].pageContent.length); Copy
const retriever = new MultiVectorRetriever({ vectorstore: new FaissStore(), byteStore: new InMemoryStore<Unit8Array>(), idKey: "doc_id", childK: 20, parentK: 5,});const retrieverResult = await retriever.getRelevantDocuments("justice breyer");console.log(retrieverResult[0].pageContent.length);
Protected
Optional
A retriever that retrieves documents from a vector store and a document store. It uses the vector store to find relevant documents based on a query, and then retrieves the full documents from the document store.
Example