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][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Examples using LongContextReorder