use case · multi-model
Every serious search stack is two stages. Stage one: GTE-ModernBERT embeds the query and every passage independently and ranks by cosine — cheap and instant, but it can't see the query and passage together. Stage two: a BGE cross-encoder reads each top passage with the query and emits a sharper relevance score. Watch the shortlist reorder. Two models, one on-device pipeline.
Bi-encoders (embeddings) scale — you embed a million documents once and compare vectors in milliseconds — but each vector is computed without knowing the query, so subtle relevance gets lost. Cross-encoders are the opposite: they read query and passage jointly for a precise score, but you can't pre-compute them, so running one over a million documents is hopeless. The fix is the retrieve-then-rerank cascade you see here: embeddings narrow a million to a handful, the cross-encoder perfects the order of that handful.