The best-performing SearchLM checkpoint. Trained via GRPO with a shaped reward that
eliminated the specification gaming found in GRPO v1 while simultaneously
improving retrieval quality. Achieves NDCG@10 = 0.577 on NFCorpus and 0.657 on SciFact.
The model reasons step-by-step about key concepts, synonym expansion, and boolean structure,
then emits a Tantivy-compatible boolean search query:
Input:Do Cholesterol Statin Drugs Cause Breast Cancer?
Output:
<reasoning>
Key concepts:
1. Statin drugs — synonyms: statin, "HMG-CoA reductase inhibitor", simvastatin,
atorvastatin, lovastatin, pravastatin
2. Causal relationship — cause, risk, association, induce, "increase risk"
3. Breast cancer — "breast cancer", "breast carcinoma", "breast neoplasm"
Strategy: AND the three concept groups; use OR to expand synonyms within each.
Phrase-quote multi-word terms; keep AND chains short to avoid zero-result queries.
</reasoning>
<query>(statin OR "HMG-CoA reductase inhibitor" OR simvastatin OR atorvastatin OR lovastatin)
AND (cause OR risk OR association OR induce)
AND ("breast cancer" OR "breast carcinoma" OR "breast neoplasm")</query>
<reasoning>
</reasoning>
<query>Cholesterol Statin Breast Cancer</query>
GRPO v2 generates 147-token completions with substantive reasoning; GRPO v1 generated 5-token
keyword bags with empty reasoning blocks.
How v2 eliminated reward hacking
The v1 reward (0.6 × NDCG@10 + 0.4 × MRR) was gameable with keyword bags on small corpora
because BM25 recall on 3–5K doc indexes is high for distinctive nouns. Three mechanisms
closed this gap in v2:
python
1# v2 reward function2base =0.6*max(0, ndcg_at_10 - keyword_baseline_ndcg)# must beat noun-extraction3+0.4* mrr
4shaped = complexity_mult * base # 1.0 with boolean ops, 0.5 without5+0.15*min(reasoning_tokens /100,1.0)# up to +0.15 reasoning bonus6reward =0.0iflen(query.split())<3else shaped # hard gate: ≥3 tokens required
Mechanism
Effect
Keyword baseline delta
Model earns zero NDCG credit for matching naive noun-extraction
num_generations=8: v1 used 2, leading to 90-96% of groups having zero within-group
reward variance (no gradient signal). With 8 completions, variance emerged from step 1.
vllm_gpu_memory_utilization=0.30: On H100 80GB, Adam fp32 optimizer states for a 3B
model require ~24 GB. At 0.45 utilisation, vLLM reserved 36 GB and Adam states OOM'd. 0.30
leaves 56 GB for the training stack.
1@misc{searchlm2026,
2 title = {SearchLM: Training Small Language Models for Boolean Query Generation via RLVR},
3 author = {Rao, Supreeth},
4 year = {2026},
5 url = {https://github.com/SupreethRao99/searchLM},
6}