For small and medium-sized merchants whose product catalogs are small enough to fit inside a long-context large language model, prompting the model with the entire catalog can be a simpler alternative to the multi-stage retrieval pipelines built for marketplaces with millions of items. But a new research paper argues that fitting a catalog into the context window does not guarantee the model will use it well, since LLMs do not exploit long contexts uniformly.
The paper, titled RPTune: Learned Context Curation for LLM Catalog Search, frames in-context catalog search around two questions: how catalogs should be curated and presented to the model, and how the model should be adapted for product selection over those curated contexts.
To address both, the authors propose RPTune, an end-to-end framework that couples learned catalog curation with LLM post-training using automatically generated, catalog-grounded supervision. An encoder-reorganizer curator orders and prunes products based on downstream LLM feedback, while the resulting curated catalogs feed back into post-training through a context-relative reward.
The framework was evaluated on 7 real merchants across distinct retail verticals, using 100 complex conversational queries per merchant. According to the paper, RPTune consistently improved search accuracy across both proprietary and open-weight LLMs, with context curation delivering gains of up to 31.4 percentage points and post-training adding a further 10.3 points on average.