Bi-Encoder
An encoder that embeds queries and documents separately, so documents can be precomputed and searched fast.
A bi-encoder encodes the query and each document independently into vectors, then compares them by similarity (such as cosine). Because documents are embedded ahead of time, search is a fast nearest-neighbor lookup — the basis of vector search.
Worked example: embed the whole corpus once into a vector index; at query time embed only the query and retrieve the nearest vectors in milliseconds, even over millions of documents. Gotcha: independent encoding is less accurate than a cross-encoder’s joint read (the query never sees the document during encoding), which is why strong pipelines pair a bi-encoder for recall with a cross-encoder for precision on the shortlist.