# Scalable In-context Ranking with Generative Models

- **ID:** 958
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2510.05396
- **Authors:** Gupta, Nilesh, You, Chong, Bhojanapalli, Srinadh, Kumar, Sanjiv, Dhillon, Inderjit, Yu, Felix
- **Venue:** arXiv 2510.05396
- **Publisher:** arXiv 2510.05396
- **Published:** 2025
- **Source:** arxiv
- **Access:** open arXiv PDF/abs
- **Tags:** arxiv, 2510-05396, ocr-vision-language, long-context, linkedin-thread
- **Topics:** OCR / vision-language; long context
- **Added:** 2026-09-15
- **Verified:** 2026-09-15
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/958

## Summary

In-context Ranking (ICR) is an emerging paradigm for Information Retrieval (IR), which leverages contextual understanding of LLMs by directly incorporating the task description, candidate documents, and the query into the model's input prompt and tasking the LLM to identify relevant document(s). While it is effective, …

## Attributes

- **Purpose:** Scalable In-context Ranking with Generative Models
- **Domain:** OCR / vision-language; long context
- **Used for:** LLM research reference
- **Time period:** arXiv 2025/10/06; Discord LinkedIn mid harvested 2026-09-15
- **Author type:** academic/industry (see abs)

## From the source (fetched 2026-10-03)

- **Published:** Oct 6, 2025 (arXiv)
- **Last revised:** Oct 8, 2025 (arXiv)
- **arXiv categories:** cs.IR, cs.LG (arXiv)
- **Journal reference:** Neurips 2025 (arXiv)
- **Citations:** 10 (1 influential) (Semantic Scholar)
- **References:** 33 (Semantic Scholar)
- **Published in:** Neural Information Processing Systems (Semantic Scholar)

## Abstract

In-context Ranking (ICR) is an emerging paradigm for Information Retrieval (IR), which leverages contextual understanding of LLMs by directly incorporating the task description, candidate documents, and the query into the model's input prompt and tasking the LLM to identify relevant document(s). While it is effective, efficiency is a significant challenge in this paradigm, especially as the candidate list grows due to quadratic/super-linear scaling of attention operation with context length. To this end, this paper first identifies inherent and exploitable structures in the attention of LLMs finetuned for ICR: (1) inter-document block sparsity: attention is dense within each document block but sparse across different documents in the context; and (2) query-document block relevance: the attention scores from certain query tokens to a document block in middle layers strongly correlate with that document's actual relevance. Motivated by these observations, we introduce BlockRank (Blockwise In-context Ranking), a novel method that adapts the attention operation in an LLM by (a) architecturally enforcing the observed inter-document block sparsity, reducing attention complexity from quadratic to linear without loss in performance, and (b) optimizing query-document block relevance for true relevant documents during fine-tuning using an auxiliary contrastive training objective, improving retrieval in attention. Experiments on BEIR, MSMarco and NQ with Mistral-7B demonstrate that BlockRank Mistral matches or outperforms existing SOTA listwise rankers and controlled fine-tuned baseline while being significantly more efficient at inference (4.7x for 100 MSMarco documents in context) and scaling gracefully to long-context shortlists, around 500 documents in-context (approximately 100K context length) within a second, presenting a scalable and effective solution for ICR.

## Research notes

- From LinkedIn thread (Discord mid 1327534772267913267). Primary: https://www.linkedin.com/posts/philipp-schmid-a6a2bb196_current-steps-to-build-reasoning-models-like-activity-7283422780459479041-sDra?utm_source=share&utm_medium=member_desktop.

## Similar entries

- [LoongRL: Reinforcement Learning for Advanced Reasoning over Long Contexts](https://papers.projxon.ai/entries/930) (paper, #930)
- [DeepSeek-OCR: Contexts Optical Compression](https://papers.projxon.ai/entries/940) (paper, #940)
- [Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models](https://papers.projxon.ai/entries/947) (paper, #947)
- [Pretraining Large Language Models with NVFP4](https://papers.projxon.ai/entries/946) (paper, #946)
- [AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration](https://papers.projxon.ai/entries/963) (paper, #963)
- [MEDIC: Comprehensive Evaluation of Leading Indicators for LLM Safety and Utility in Clinical Applications](https://papers.projxon.ai/entries/965) (paper, #965)
