# LongContextReorder

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_transformers/long_context_reorder/LongContextReorder)

Reorder long context.

Lost in the middle:
Performance degrades when models must access relevant information
in the middle of long contexts.
See: https://arxiv.org/abs//2307.03172

## Signature

```python
LongContextReorder()
```

## Extends

- `BaseDocumentTransformer`
- `BaseModel`

## Properties

- `model_config`

## Methods

- [`transform_documents()`](https://reference.langchain.com/python/langchain-community/document_transformers/long_context_reorder/LongContextReorder/transform_documents)
- [`atransform_documents()`](https://reference.langchain.com/python/langchain-community/document_transformers/long_context_reorder/LongContextReorder/atransform_documents)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/d5ea8358933260ad48dd31f7f8076555c7b4885a/libs/community/langchain_community/document_transformers/long_context_reorder.py#L24)