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-classicchainscombine_documentsmap_rerankMapRerankDocumentsChainacombine_docs
    Method●Since v1.0

    acombine_docs

    Combine documents in a map rerank manner.

    Combine by mapping first chain over all documents, then reranking the results.

    Copy
    acombine_docs(
      self,
      docs: list[Document],
      callbacks: Callbacks = None,
      **kwargs: Any = {}
    ) -> tuple[str, dict]

    Parameters

    NameTypeDescription
    docs*list[Document]

    List of documents to combine

    callbacksCallbacks
    Default:None

    Callbacks to be passed through

    **kwargsAny
    Default:{}

    additional parameters to be passed to LLM calls (like other input variables besides the documents)

    View source on GitHub