Less Finetuning, Better Retrieval: Rethinking LLM Adaptation for Biomedical Retrievers via Synthetic Data and Model Merging
Sameh Khattab, Jean-Philippe Corbeil, Osman Alperen Koraş, Amin Dada, Julian Friedrich, François Beaulieu, Paul Vozila, Jens Kleesiek
TL;DR
This work introduces Synthesize-Train-Merge (STM), a modular framework to convert decoder-only LLMs into domain-specific dense retrievers by combining synthetic hard negatives, retrieval prompt optimization, and model merging. Through systematic experiments on biomedical and general-domain tasks from MTEB, STM achieves up to 23.5% task-specific gains and produces merged retrievers that outperform individual experts and strong baselines without large-scale pretraining. Key insights include the dominance of prompt optimization over hard-negative mining in many settings, and the efficacy of Linear merging (MergeKit) to fuse expert representations into a single, robust retriever. The approach demonstrates a scalable, data-efficient path for adapting general LLMs to specialized biomedical retrieval while preserving broad-domain capabilities, with practical implications for RAG systems in specialized fields.
Abstract
Retrieval-augmented generation (RAG) has become the backbone of grounding Large Language Models (LLMs), improving knowledge updates and reducing hallucinations. Recently, LLM-based retriever models have shown state-of-the-art performance for RAG applications. However, several technical aspects remain underexplored on how to adapt general-purpose LLMs into effective domain-specific retrievers, especially in specialized domains such as biomedicine. We present Synthesize-Train-Merge (STM), a modular framework that enhances decoder-only LLMs with synthetic hard negatives, retrieval prompt optimization, and model merging. Experiments on a subset of 12 medical and general tasks from the MTEB benchmark show STM boosts task-specific experts by up to 23.5\% (average 7.5\%) and produces merged models that outperform both single experts and strong baselines without extensive pretraining. Our results demonstrate a scalable, efficient path for turning general LLMs into high-performing, domain-specialized retrievers, preserving general-domain capabilities while excelling on specialized tasks.
