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-classicretrieversdocument_compressorsbaseDocumentCompressorPipeline
    Class●Since v1.0

    DocumentCompressorPipeline

    Copy
    DocumentCompressorPipeline()

    Bases

    BaseDocumentCompressor

    Used in Docs

    • Lotr (merger retriever) integration

    Attributes

    Methods

    View source on GitHub
    attribute
    transformers: list[BaseDocumentTransformer | BaseDocumentCompressor]

    List of document filters that are chained together and run in sequence.

    attribute
    model_config
    method
    compress_documents

    Transform a list of documents.

    method
    acompress_documents

    Compress retrieved documents given the query context.

    Document compressor that uses a pipeline of Transformers.