# LLMChainExtractor

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/retrievers/document_compressors/chain_extract/LLMChainExtractor)

LLM Chain Extractor.

Document compressor that uses an LLM chain to extract
the relevant parts of documents.

## Signature

```python
LLMChainExtractor()
```

## Extends

- `BaseDocumentCompressor`

## Properties

- `llm_chain`
- `get_input`
- `model_config`

## Methods

- [`compress_documents()`](https://reference.langchain.com/python/langchain-classic/retrievers/document_compressors/chain_extract/LLMChainExtractor/compress_documents)
- [`acompress_documents()`](https://reference.langchain.com/python/langchain-classic/retrievers/document_compressors/chain_extract/LLMChainExtractor/acompress_documents)
- [`from_llm()`](https://reference.langchain.com/python/langchain-classic/retrievers/document_compressors/chain_extract/LLMChainExtractor/from_llm)

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/6fb37dba71da807af60aa7b909f71f0625a666bf/libs/langchain/langchain_classic/retrievers/document_compressors/chain_extract.py#L51)