Revisiting What Makes a Good Context Subset: A Sparse Latent Basis Perspective
Abstract
Selecting context subsets is increasingly important in modern LLM inference, yet what makes a subset effective remains unclear. We study this question in the controlled setting of few-shot demonstration selection. We examine a hypothesis that demonstrations should collectively provide task-relevant information needed by a target query. Assuming that the query representation provides a useful proxy for these requirements, we formulate selection as sparse reconstruction and instantiate it with Residual Explanation Search (RES), a Matching-Pursuit-style diagnostic procedure. Across seven benchmarks and eight open-weight LLMs, no retrieval objective is universally best. RES outperforms MMR in 34 of 56 model--dataset pairs, with its clearest advantage on sentiment tasks, suggesting that query-conditioned collective reconstruction may capture useful complementarity that pairwise dissimilarity misses. Relevance-based retrieval remains strong on template-heavy reasoning benchmarks, while all retrieval methods underperform zero-shot prediction on average on StrategyQA, where a solution-reconstruction analysis is consistent with the query not exposing the required external knowledge. Target-model hidden states further show that retrieval objectives interact differently with representation spaces: middle-layer representations generally favor similarity retrieval, whereas last-layer representations are often stronger for residual- and diversity-based selection. These findings support a conditional, representation-dependent account of context subset quality rather than a universally superior selector.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI, cs.IR
- Comments
- 17 pages, 2 figures. The format of ACL rolling review
Related papers
What Makes Good Data for Training Coding Agents? A Systematic Study on SWE-Gym
Shared title terminologycs.CLYikai Zhang, Mai Xu, Yunbei Zhang et al.
LimeTree: Linear-Memory Graph Neural Networks over Tree-Graphs for Resource-Efficient Language Modeling and Context Extrapolation
Shared title terminologycs.CLElisabeth Fink
The Temporal Residual: Fast and Effective Retrofitting of Latent Feedback into Pretrained Language Models
Shared title terminologycs.CLZiyang Cai, Xingyu Zhu, Sanjeev Arora
Position-Skipped Distillation of Sparse-Attention Indexers: Train Short, Serve Long
Shared title terminologycs.CLFu Dai, Haodi Quan, Kamal Taha
ContextFact: Remembering Facts in Context for Long-Term Conversational Agents
Shared title terminologycs.CLJiayu Huang, Yichao Cai, Xinyu Li et al.
Definition-Guided In-Context Learning for Zero-Shot Spoken Language Understanding
Shared title terminologycs.CLNeeraj Agrawala, Sriram Ganapathy