langchain_community.document_transformers.long_context_reorder
.LongContextReorder¶
- class langchain_community.document_transformers.long_context_reorder.LongContextReorder[source]¶
Bases:
BaseDocumentTransformer
,BaseModel
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
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.