Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Document Optimization for Black-Box Retrieval via Reinforcement Learning

About

Document expansion is a classical technique for improving retrieval quality, and is attractive since it shifts computation offline, avoiding additional query-time processing. However, when applied to modern retrievers, it has been shown to degrade performance, often introducing noise that obfuscates the discriminative signal. We recast document expansion as a document optimization problem: a language model or a vision language model is fine-tuned to transform documents into representations that better align with the expected query distribution under a target retriever, using GRPO with the retriever's ranking improvements as rewards. This approach requires only black-box access to retrieval ranks, and is applicable across single-vector, multi-vector and lexical retrievers. We evaluate our approach on code retrieval and visual document retrieval (VDR) tasks. We find that learned document transformations yield retrieval gains and in many settings enable smaller, more efficient retrievers to outperform larger ones. For example, applying document optimization to OpenAI text-embedding-3-small model improves nDCG5 on code (58.7 to 66.8) and VDR (53.3 to 57.6), even slightly surpassing the 6.5X more expensive OpenAI text-embedding-3-large model (66.3 on code; 57.0 on VDR). When retriever weights are accessible, document optimization is often competitive with fine-tuning, and in most settings their combination performs best, improving Jina-ColBERT-V2 from 55.8 to 63.3 on VDR and from 48.6 to 61.8 on code retrieval.

Omri Uzan, Ron Polonsky, Douwe Kiela, Christopher Potts• 2026

Related benchmarks

TaskDatasetResultRank
Code RetrievalHumanEval (val)
nDCG@598.5
24
Code RetrievalDS10K (val)
nDCG@563.8
24
Code RetrievalMBPP (val)
nDCG@591.6
24
Code RetrievalMTEB Code Retrieval Average (val)
nDCG@573.5
24
Code RetrievalFreshStack (val)
nDCG@540.3
24
Visual document retrievalViDoRe Biomed 2 (val)
nDCG@561.2
18
Visual document retrievalViDoRe2 Econ (val)
nDCG@561
18
Visual document retrievalViDoRe2 ESG Human (val)
nDCG@572.6
18
Visual document retrievalViDoRe ESG Full 2 (val)
nDCG@563.1
18
Visual document retrievalViDoRe2 Average (val)
nDCG@563.3
18
Showing 10 of 10 rows

Other info

Follow for update