AI engineering glossary · NLP embeddings
What is bi-encoder?
Bi-encoder (also called Dual encoder, Two-tower model): A model that encodes two texts, such as a query and a document, independently into vectors and compares them afterwards. Document vectors can be pre-computed and indexed, so search is fast, though accuracy is often lower than a cross-encoder.
Bi-encoder: an example
A support bot encodes 1 lakh help articles ahead of time and only encodes each new question at query time.
Related terms
More NLP embeddings terms
- Bidirectional LSTM-CRF
- Bigram
- BILOU tagging
- BIO tagging
- BM25
- Byte-level BPE
- Byte-pair encoding
- Case folding
Where you learn it
Bi-encoder is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.