Don't Retrieve, Generate: Prompting LLMs for Synthetic Training Data in Dense Retrieval

Sinha, Aarush

–arXiv.org Artificial Intelligence 

These models typically require fine-tuning on task-specific data using contrastive objectives like triplet loss, which pulls relevant pairs closer while pushing away irrelevant (negative) passages Henderson et al. (2017). A key factor in effective fine-tuning is the quality of negative examples (Xiong et al. (2020)). While random negatives are easy to generate, hard negatives semantically related but irrelevant passages provide stronger learning signals (Zhan et al. (2021)). Traditionally, these are mined from the corpus using methods like BM25 or neural cross-encoders (CEs) for re-ranking (Nogueira & Cho (2020); Qu et al. (2021)). Large Language Models (Brown et al. (2020); Grattafiori et al. (2024); Kavukcuoglu (2025)) have become exceedingly good at understanding and generating text by following user instructions. We propose an alternative, corpus-free pipeline that utilizes the generative abilities of LLMs. Our approach includes: 1. Hard Negative Generation: The LLMs are prompted to produce five semantically challenging but irrelevant passages using 4 LLMs Qwen3-4B & Qwen3-30B(Yang et al. (2025)), LLama3-8B (AI@Meta (2024)) and Phi4-14B (Abdin et al. (2024)). We evaluate an end-to-end LLM-HN approach against two corpus-based baselines, BM25-HN and CE-HN, by fine-tuning a vanilla DistilBERT(Sanh et al. (2020)) and measuring retrieval performance on 10 BEIR tasks(Thakur et al. (2021)). We analyze the impact of LLM-generated hard negatives and additionally consider a naive combination of BM25-, cross-encoder, and LLM-based hard negatives for training, with all models evaluated on BEIR. 1