Promptriever: Instruction-Trained Retrievers Can Be Prompted Like Language Models
TL;DR. Promptriever is a RepLLaMA-style bi-encoder (Llama-2-7B, LoRA, EOS pooling) trained on MS MARCO queries with a long, query-specific instruction added to each one. The key ingredient is instruction negatives: generated passages that match the query but violate the instruction. With them, the instruction changes the ranking (FollowIR p-MRR +11.2 vs −3.1 for RepLLaMA), and the model becomes less sensitive to the wording of prompts.
Why it matters now. Deep-research agents send retrievers long sub-queries with constraints attached (“not the 2019 report”, “primary sources only”). A standard dense retriever trained on short MS MARCO queries tends to ignore that text. Promptriever shows a data recipe that forces a bi-encoder to read it, at bi-encoder cost. Its test, p-MRR on FollowIR, also gives you a way to measure whether a retriever responds to constraints at all.
Key idea
Section titled “Key idea”Take the RepLLaMA training data (tevatron-msmarco-aug: about 491k queries, each with 1 positive and 30 hard negatives). For each (query, positive) pair, Llama-3-70B-Instruct writes an instruction that keeps the positive relevant but narrows the need. Instructions vary in length (short to very long) and style (none, negation, background, persona); there are about 122k per subset, roughly 490k in total, with a mean of 103 words (Table 1). FollowIR-7B, a cross-encoder that judges (query, instruction, passage) relevance, flagged about 15% of instructions as making the original positive irrelevant; in those cases a generated positive replaced it.
Adding instructions alone changes no relevance label, so the model can ignore them. Instruction negatives fix this. gpt-4o-2024-05-13 generates one instruction-positive and three instruction-negative passages per pair; only about two of three are correct, so FollowIR-7B filters them (human–model agreement 84%, N = 64; human–human 75%, N = 32). Training then uses the usual contrastive loss with the instruction concatenated to the query:
Here is the dot product of EOS-pooled embeddings and . A passage in matches , so the loss can only push it below through the tokens of .
Key results
Section titled “Key results”- Instruction following (Table 2). Promptriever reaches FollowIR score 26.1 and p-MRR +11.2 vs RepLLaMA’s 23.0 and −3.1. On InstructIR it gets nDCG 92.1 and Robustness@10 63.1 (RepLLaMA 85.7 / 50.2). The FollowIR-7B cross-encoder is close (24.8, +12.2) but costs a full forward pass per document. E5-Mistral’s p-MRR is −3.5.
- Standard retrieval is kept. BEIR nDCG@10 without a prompt is 55.0 vs 54.9 (Table 4). In-domain MS MARCO numbers are close to RepLLaMA. Note that Table 3 and Table 7 report the Promptriever and RepLLaMA MS MARCO numbers in swapped positions; treat the in-domain comparison as “roughly equal”.
- Backbones (Table 7). Mistral v1 reaches p-MRR +11.8, Llama 3.1 +11.3 and Llama 3.1 Instruct +9.8. Llama 3.1’s Robustness@10 drops to 41.6.
- Cost. Training takes about 4 days on 8×40GB A100s (Appendix B).
Limitations & open questions
Section titled “Limitations & open questions”- The paper does not test in-context examples, and it cannot say why some prompts help (Appendix E: per-query gains are not predictable from the query; best AUC about 54%).
- Instructions and negatives are LLM-generated on MS MARCO. The instructions describe relevance in a general way; they are not the operational constraints an agent writes.
- FollowIR-7B (from the FollowIR paper, also first-authored by Weller) filters the training data, and FollowIR is also the main evaluation. Shared assumptions between the filter and the benchmark are possible; an independent instruction-following test would be stronger evidence.
- Bi-encoder scoring still compresses query and instruction into one vector. The LIMIT analysis applies: some combinations of instruction-defined relevance sets may not be representable at a given dimension.
Connections
Section titled “Connections”- ReasonIR: another synthetic-data recipe for long, reasoning-heavy queries.
- On the Theoretical Limitations of Embedding-Based Retrieval: uses Promptriever as one of the models on LIMIT.
- E5-Mistral and GritLM: instruction-prefixed embedders that use task-level instructions rather than per-query ones.
- ITER: conditions the query on agent context instead of a written instruction.
- Agentic retrieval looks like…: what real agent sub-queries look like.
- Rank1: a reasoning reranker from the same first author (Weller et al.).
Questions to think through
These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.
- Derive / compute
Use Promptriever's Table 6. The ablation rows are trained on half MS MARCO and half instruction data, which matches RepLLaMA's number of training instances; the final Joint model trains on all MS MARCO plus all instruction data, about twice as much. p-MRR: RepLLaMA −3.1, repeated query −3.1, generic instruction −3.0, swapped instruction −0.9, +instructions +5.7, +instruction negatives +8.8, Joint +11.2. (a) Split the total gain from −3.1 to +11.2 into its three cumulative steps. Which steps are data-matched? (b) Why are the repeated-query and generic-instruction rows the right controls for "it is not just longer queries"? (c) Joint's FollowIR score (26.1) is slightly below the instruction-negatives row (26.2) although its p-MRR is higher. What does that say about what the two metrics measure?
What a strong answer covers
- (a) Adding per-query instructions: −3.1 → +5.7 = +8.8. Adding instruction negatives: +5.7 → +8.8 = +3.1. Training jointly on all the data: +8.8 → +11.2 = +2.4. Total +14.3, the headline gain over RepLLaMA.
- The first two steps are data-matched with RepLLaMA; the last is not (about 2× the instances), so its +2.4 mixes "more data" with "more instructions". The steps are cumulative, so this is a reading of the table, not an additive attribution.
- (b) Repeating the query or prepending a generic instruction lengthens the input without adding query-specific constraints. Both leave p-MRR at about −3, so length or format alone does not create instruction sensitivity. Swapped instructions (from other queries) move it only to −0.9.
- (c) p-MRR measures how the ranking moves when the instruction changes; the standard score (MAP/nDCG) measures ranking quality under the original instruction. They can move independently: a model can become more instruction-sensitive without ranking the original task better. Report both.
- Mechanism
Write the contrastive loss for one Promptriever training group and explain, at the level of gradients, why adding instructions to the query but keeping the RepLLaMA positives and negatives would teach the model to ignore the instruction. Then explain what an instruction negative changes in that gradient, and why the authors had to generate these passages with GPT-4o instead of mining them from MS MARCO.
What a strong answer covers
- Loss: −log of exp(s(q⊕I, d+)/τ) over the sum including mined hard negatives and instruction negatives, with s the dot product of EOS-pooled embeddings and τ = 0.01.
- If every negative is already irrelevant to the query alone, the loss can be minimised from the query tokens; the gradient through the instruction tokens is near zero, so the encoder learns to ignore them (the paper confirms this in its ablation).
- An instruction negative is relevant to the query but violates the instruction. It scores high on query match, so the only way to push it below d+ is to use the instruction tokens; the gradient now flows through them.
- MS MARCO has too few relevant passages per query to find query-positive/instruction-negative pairs, so the authors generated 1 instruction-positive and 3 instruction-negative passages per pair with gpt-4o-2024-05-13. Only about 2 of 3 were correct, so FollowIR-7B filtered them.
- The filter's quality matters: human–model agreement was 84% (N = 64) versus 75% human–human (N = 32). Label noise in the negatives would otherwise teach the wrong constraint.
- Critique
Promptriever reports that a single generic prompt, chosen with 10 dev queries per dataset, raises BEIR nDCG@10 from 55.0 to 56.4, while the same prompts change RepLLaMA by −0.1 and BM25 by −5.0. Critique the claim that the retriever "can be prompted like a language model". Which confounds would you rule out, and what experiment would falsify the claim?
What a strong answer covers
- The gain is small (+1.4 average) and is selected on dev queries from each dataset. Selection from 10 candidate prompts on 10 queries can overfit; check the gain on held-out queries and report the prompt-selection variance.
- The paper's own error analysis finds that per-query gains are not predictable from the query (best AUC about 54%). So the effect may be closer to a dataset-level shift in score calibration than to understanding the prompt.
- The "Think carefully … I will give you a tip" style prompts look like LM prompting, but the training instructions were relevance definitions. Test semantic control: paraphrased prompts, nonsense prompts of equal length, and prompts with contradictory content. If the nonsense prompt helps as much, the claim fails.
- The stronger evidence is robustness: the standard deviation across prompts is 2.8 for Promptriever vs 5.0 for RepLLaMA and 10.6 for BM25. That supports "less prompt-fragile" more clearly than "promptable".
- What if…
Table 7 swaps the backbone: Llama 2 gives p-MRR +11.2, Mistral v1 +11.8, Llama 3.1 +11.3 and Llama 3.1 Instruct +9.8, but Llama 3.1's InstructIR Robustness@10 is only 41.6 against 63.1 for Llama 2. What does this ablation say about where instruction following comes from (data vs backbone), and how would you use it when choosing a backbone for an instructable retriever on a fixed budget?
What a strong answer covers
- Similar p-MRR across four backbones means most of the instruction sensitivity comes from the training data (instructions plus instruction negatives), not from a particular pretrained model.
- Instruction-tuning the backbone does not help here (Llama 3.1 Instruct is lower), so a chat-tuned base is not a substitute for retrieval-specific instruction data.
- p-MRR and Robustness@10 measure different things: the worst case over 10 prompts can collapse even when the average sensitivity is fine. Choose on the worst-case metric if users will write their own instructions.
- On a budget: pick the cheapest backbone that matches p-MRR and robustness on a held-out instruction set, and spend effort on the instruction-negative filter rather than on the backbone.
- Design
You want a retriever for a BrowseComp-Plus-style deep-research agent that issues sub-queries together with a natural-language constraint (for example, "only primary sources published after 2020", "not about the film"). Design a Promptriever-style training set for this setting. Say where the instructions, the instruction negatives and the filter come from, how you would avoid leakage into the evaluation corpus, and which metrics you would report.
What a strong answer covers
- Instructions: collect constraint phrases from real agent trajectories (pre-search reasoning, the reasons agents give for discarding a document), rather than generating generic relevance definitions.
- Instruction negatives: documents that match the sub-query but violate the constraint. Agent trajectories supply some of them (visited then rejected); generate the rest and filter them with a strong judge whose agreement with humans you measure first, as the paper did.
- Leakage: generate passages only from a training corpus disjoint from the evaluation corpus, and deduplicate generated text against the BrowseComp-Plus documents.
- Metrics: a p-MRR-style sensitivity score (does the ranking move when the constraint flips), standard nDCG/recall on the original sub-queries, worst-case robustness over paraphrased constraints, and end-to-end agent accuracy with the retriever swapped in.
- Research idea
Promptriever leaves open why some prompts help and others do not, and it does not test in-context examples. Propose a study that explains prompt effects in a bi-encoder at the level of the representation, and state a prediction that would distinguish "the prompt shifts all scores uniformly" from "the prompt changes which documents are near the query".
What a strong answer covers
- Measure the query-embedding shift Δq = e(q⊕p) − e(q) for many prompts, and project it onto document embeddings. A uniform shift moves all scores by a similar amount and should not change the ranking much; a selective shift reorders the top documents.
- Prediction: if prompts act as calibration, Kendall τ between the prompted and unprompted top-100 stays high while nDCG changes little. If they act semantically, τ drops and the changes concentrate on documents that match the prompt's content.
- Control with length-matched nonsense prompts and with paraphrases, and compare Promptriever with RepLLaMA on the same probes (the paper shows RepLLaMA is barely affected).
- Extend to in-context examples: prepend (query, relevant document) pairs and test whether the embedding moves toward the example documents, a retrieval analogue of few-shot prompting.