AnswerOrbitDocs
Glossary
Glossary

Bi-encoder

A bi-encoder is a retrieval model that turns a question and each passage into numbers separately, so it can search millions of passages fast.

A bi-encoder is a model that search and AI systems use to find passages that match a question. It turns the question into a list of numbers, called an embedding, and turns each passage into one too, separately. Passages whose numbers sit close to the question's are treated as good matches.

You'll never deal with one directly. It's worth knowing about because it's often the first filter your content passes through before an AI platform writes an answer.

How it works

The trick is that each passage is handled on its own. The system can turn every passage it knows into numbers ahead of time and store them. When a question comes in, it only has to work out the numbers for the question, then look for the closest passages it already has.

That makes it fast enough to search millions of passages in a moment. The cost is precision. Because the question and the passage are never read together, the match is a rough one. Many systems take the best few hundred matches and then run a slower, more careful model over just those to pick the final few.

Why it matters for your content

A bi-encoder judges each passage on its own. If a paragraph only makes sense once you've read the one above it, its numbers won't say much, and it may not be picked.

For example, a paragraph on Fernhill Coffee's site that starts "It also ships to Ireland" doesn't say what "it" is. A paragraph that starts "Fernhill Coffee's subscription ships to Ireland" carries its own meaning, so it has a better chance of matching a question about coffee subscriptions in Ireland.

Write paragraphs that name their subject and stand on their own. The same habit helps people who skim.

On this page