LLMs suffer from the 'lost in the middle' phenomenon, where they recall information placed at the beginning or end of the context window better than information in the middle.
Sorting context documents places the most critical references first and last to ensure recall, while placing general or less important references in the middle.