Interface for a retriever that uses a vector store to store and retrieve document embeddings. This retriever interface allows for adding documents to the underlying vector store and conducting retrieval operations.
VectorStoreRetrieverInterface extends BaseRetrieverInterface to provide
document retrieval capabilities based on vector similarity.
VectorStoreRetrieverInterface
interface VectorStoreRetrieverInterfaceThe instance of VectorStore used for storing and retrieving document embeddings.
This vector store must implement the VectorStoreInterface to be compatible
with the retriever’s operations.
Method to add documents to the memory vector store. It extracts the text from each document, generates embeddings for them, and adds the resulting vectors to the store.
Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently.
Method to invoke the document transformation. This method calls the transformDocuments method with the provided input.
Stream output in chunks.
Default implementation of transform, which buffers input and then calls stream. Subclasses should override this method if they can start producing output while input is still being generated.
Default implementation of batch, which calls invoke N times.
Method to invoke the document transformation. This method calls the
Stream output in chunks.
Default implementation of transform, which buffers input and then calls stream.
Default implementation of batch, which calls invoke N times.
Method to invoke the document transformation. This method calls the
Stream output in chunks.
Default implementation of transform, which buffers input and then calls stream.