Cross-domain retrieval: what survives when you move domains
Cross-domain retrieval loss cannot be summarised by an average. It has to be split into lexical, semantic and annotation components measured separately, because without that split you cannot tell whether to change the model, change the data, or rewrite your relevance criteria.
On this page
You validated a retrieval model on support tickets. On your internal set, seven or eight of the top ten results answered the question, the team signed off, and rollout began. The first new scenario is a regulations corpus. Same model, same endpoint, and now two or three of the top ten are usable. You suspect the index, then the chunk size, and only later the more fundamental possibility: this model learned what relevant means in the language of support tickets.
Call it a cliff, not a fluctuation
The scene above is invented and the numbers only indicate a magnitude, not any measurement. What matters is the shape: cross-domain failure is not an even loss of a few points. It collapses on one class of query while barely touching another. Read the average and you conclude the drop is tolerable. Split by query type and you see that half your traffic is fine and the other half is essentially unusable.
That unevenness is normal, and the reason is not mysterious. A model's similarity is a geometry inside a vector space, and that geometry grew out of the vocabulary, sentence length and relevance conventions of the training domain. Move domains and all three change at once, in different proportions. Some domains only change words: refund in a ticket system is restitution of price in a regulation. Other domains change what counts as relevant: a clause that merely mentions the keyword but establishes no basis should not rank in the top ten.
So before asking how much survives, rewrite the question into something measurable: on which class of query, under which relevance criterion, against which baseline. Drop any of those three clauses and the answer means nothing.
BEIR turned domain transfer into a standard move
BEIR assembled eighteen datasets spanning nine retrieval task types, including fact checking, citation prediction, duplicate question retrieval, argument retrieval, news retrieval, question answering, tweet retrieval, biomedical retrieval and entity retrieval, then ran a set of models on them with no in-domain fine-tuning, that is, zero-shot.[1] The headline metric is ranking quality at ten results, nDCG@10.
Two findings carry the weight. First, out-of-domain performance does not track in-domain performance: a model trained to do well in one domain can land far down the table in another, and the ordering across datasets is not stable.[1] Second, a purely lexical method such as BM25 remains a strong zero-shot baseline and beats a number of dense retrieval models.[1]
That second finding is often misread as dense retrieval does not work. It says something narrower: when a model has never seen the target domain, lexical matching is more stable precisely because it has no learned prior to mismatch. That property gives BM25 a second job. It is not only a baseline, it is a ruler.
Splitting one drop into three
The table below is my own decomposition, not a BEIR result. The idea is to run BM25 and your model on the same target-domain evaluation set and use the difference between them to separate the sources of loss.
| Source of loss | How it looks in domain A | How it changes in domain B | How to measure it alone |
|---|---|---|---|
| Lexical | Query terms overlap heavily with document terms | Synonymy rises and keywords miss | Read BM25's own absolute score in B; how far it falls is how much lexical signal weakened |
| Semantic | The model has learned this domain's phrasing | Phrasing is unfamiliar and the space does not cover it | Check whether the model's gain over BM25 survives in B or turns negative |
| Length | Short queries, medium documents | Queries become paragraphs, or documents become thousands of words | Report metrics per query-length bucket with chunk size held fixed |
| Annotation | Loose relevance: mention is enough | Strict relevance: must establish a basis | Relabel 100 items by hand and measure agreement between old and new criteria |
| Candidate pool | Hundreds of candidates, recall is easy | Tens of thousands, ranking beyond the first hit matters | Grow the pool from one thousand to ten thousand and watch the metric |
Row three is the most useful. A great deal of reported cross-domain loss is really a change in chunking: documents in domain A were short, one chunk per item, while domain B documents are long and now split into eight-hundred-word pieces with the answer buried mid-chunk. That is a preprocessing bug, not a model failure. Fix chunking, length and candidate count before you measure transfer, or you are measuring your pipeline and calling it a model.
Row five is also skipped. In a small pool, recall is mostly a matter of finding the passage at all. In a large pool, the top ten has to be ordered correctly. Those are different abilities, and a model can look solid in a small pool and fall apart at ten thousand candidates.
Four steps you can finish before you buy
- Build a small two-domain evaluation set: 150 queries from domain A and 150 from the target domain B, each annotated with which passages answer it. Do not substitute a public dataset, because public query distributions are not yours and the thing you are measuring is precisely your own queries.
- On the same B set, run three systems: BM25, your current model, and the vendor's model. Record nDCG@10 per query-type bucket, meaning short queries, long queries, and queries containing specialised terms, rather than one average.
- Compute two differences: current model minus BM25, and vendor model minus current model. If the first is negative, semantics are not helping in this domain. If the second is positive but small, changing vendors will not fix this, because the problem lives in the domain.
- Write the conclusion as one signable sentence: on 150 queries in domain B, the vendor model gains N points over BM25 and M points over our current model, with a negative gain in the short-query bucket. That sentence goes into a contract annex, and it can also kill a purchase outright.
Step one is the expensive one, roughly one to two weeks including double annotation and cross-checking. Steps two through four take under a day. The trade is worth it, because it converts it feels worse than before into a sentence that can be recomputed, and that is the hardest kind of statement for a vendor to answer.
There is an optional fifth step for an upper bound: take a cross-encoder reranker, rerank the top fifty for those 150 queries, and see what the metric reaches. If reranking restores most of the domain-A level, recall was sufficient and the problem is ordering. If reranking cannot recover it, the right documents are not in the candidate set at all, which means no model swap will help and you need a different retrieval strategy or more data.
Where this measurement is blind
The second blind spot is that BEIR's domains are not your domains. Its eighteen datasets are English, public, academically curated, with clean task boundaries and documented relevance judgements. Your domain may mix three languages, carry tables inside documents, and receive product model numbers as queries. Those differences make borrowing a specific cross-domain curve from BEIR unreliable. Borrow the direction, never the number.
The third blind spot is time. Domains drift: products launch, regulations get amended, support scripts change. A gap measured today may widen or narrow in six months. So the 150-query set needs periodic fresh samples while keeping the old ones, otherwise you are only measuring this month's version of the domain.
One thing to do right now: pull last year's retrieval bad cases and count them into four piles, namely unknown terminology, query too long, document cut apart, and inconsistent relevance standard. Whichever pile is largest is the one to fix first, because the four fixes have nothing in common, and most teams start comparing models before they reach this step.
