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

    Chat LangChain

    What can I help with?

    Enter to sendยทShift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicchainscombine_documentsmap_rerankMapRerankDocumentsChaincombine_docs
    Methodโ—Since v1.5

    combine_docs

    Copy
    combine_docs(
      self,
      docs: list[Document],
      callbacks: Callbacks = None,
      kwargs: 
    View source on GitHub
    Any
    =
    {
    }
    )
    ->
    tuple
    [
    str
    ,
    dict
    ]

    Parameters

    NameTypeDescription
    docs*list[Document]

    List of documents to combine

    callbacksCallbacks
    Default:None

    Callbacks to be passed through

    **kwargsAny
    Default:{}

    Combine documents in a map rerank manner.

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

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