LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicretrieversmulti_vector
    Module●Since v1.0

    multi_vector

    Functions

    function
    create_kv_docstore

    Create a store for langchain Document objects from a bytes store.

    This store does run time type checking to ensure that the values are Document objects.

    Classes

    class
    SearchType

    Enumerator of the types of search to perform.

    class
    MultiVectorRetriever

    Retriever that supports multiple embeddings per parent document.

    This retriever is designed for scenarios where documents are split into smaller chunks for embedding and vector search, but retrieval returns the original parent documents rather than individual chunks.

    It works by:

    • Performing similarity (or MMR) search over embedded child chunks
    • Collecting unique parent document IDs from chunk metadata
    • Fetching and returning the corresponding parent documents from the docstore

    This pattern is commonly used in RAG pipelines to improve answer grounding while preserving full document context.

    View source on GitHub