LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
UniversalHubNodeLoadSerializableEncoder BackedFile SystemIn Memory
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/corevectorstoresVectorStoreRetrieverInterface
Interface●Since v1.0

VectorStoreRetrieverInterface

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

Copy
interface VectorStoreRetrieverInterface

Bases

BaseRetrieverInterface

Properties

property
lc_serializable: boolean
property
vectorStore: V

The 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.

property
lc_id: string[]

Methods

method
addDocuments→ Promise<void>

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.

method
batch→ Promise<RunOutput[]>

Default implementation of batch, which calls invoke N times. Subclasses should override this method if they can batch more efficiently.

method
getName→ string
method
invoke→ Promise<RunOutput>

Method to invoke the document transformation. This method calls the transformDocuments method with the provided input.

method
stream→ Promise<IterableReadableStream<RunOutput>>

Stream output in chunks.

method
transform→ AsyncGenerator<RunOutput>

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.

Inherited fromBaseRetrieverInterface

Properties

Plc_serializable: booleanPlc_id: string[]

Methods

Mbatch→ Promise<RunOutput[]>
—

Default implementation of batch, which calls invoke N times.

MgetName→ stringMinvoke→ Promise<RunOutput>
—

Method to invoke the document transformation. This method calls the

Mstream→ Promise<IterableReadableStream<RunOutput>>
—

Stream output in chunks.

Mtransform→ AsyncGenerator<RunOutput>
—

Default implementation of transform, which buffers input and then calls stream.

Inherited fromRunnableInterface

Properties

Plc_serializable: booleanPlc_id: string[]

Methods

Mbatch→ Promise<RunOutput[]>
—

Default implementation of batch, which calls invoke N times.

MgetName→ stringMinvoke→ Promise<RunOutput>
—

Method to invoke the document transformation. This method calls the

Mstream→ Promise<IterableReadableStream<RunOutput>>
—

Stream output in chunks.

Mtransform→ AsyncGenerator<RunOutput>
—

Default implementation of transform, which buffers input and then calls stream.

Inherited fromSerializableInterface

Properties

Plc_id: string[]
View source on GitHub