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.

Level: intermediateTopic: NLP embeddings

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.