Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
You're shipping a RAG system and the off the shelf embedding model (text-embedding-3-large) underperforms expectations on your domain. Outline when fine-tuning the embedding model is the right next step vs alternatives.
Fine-tune the embedder only after off the shelf specialist, reranker, and hybrid retrieval have been tried, and only when 1k+ labeled in-domain pairs exist and the operational cost of a full re-embed is justified.
Picture a kitchen knife that has gone slightly dull on a hard ingredient. The right first move is to use a different knife: maybe the cleaver for bones or the bread knife for crusts. The next move is to sharpen the existing knife with a steel, a few minutes of work. Only if neither of those works do you send the knife out to be reground, which costs money and a week without it. Fine-tuning an embedder is the regrinding step. You only do it after you have tried the swaps and the cheap fixes, and only when you are certain the loss of the corpus during the migration is worth the eventual quality lift.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
9 minutes: the intervention ladder, data prerequisites, hard-negative mining, LoRA vs full fine-tune, and operational migration.
| Approach | Compute cost | Operational cost | Typical lift |
|---|---|---|---|
| Off-the-shelf specialist | zero (use existing) | low (re-embed only) | 10-30% on target domain |
| Cross-encoder reranker | low (inference only) | low (deploy second model) | 5-15% nDCG |
| Hybrid retrieval (BM25) | low (BM25 is cheap) | low (second index) | 5-20% on rare-term domains |
| LoRA fine-tune | medium (one GPU-day) | high (full re-embed) | 10-20% over base |
| Full fine-tune of open base | high (multi-GPU-day) | high (full re-embed) | 10-25% over base |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Jumping to fine-tuning because retrieval feels weak, without first trying a specialist embedder, a cross-encoder reranker, or hybrid retrieval, any of which is roughly 10x cheaper.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.