---
language: en
title: "Bi-encoder"
description: "A bi-encoder represents queries and documents as separate vectors. Learn how it is used for retrieval and how to test the selected content."
canonical: "https://tropk.ai/en/resources/glossary/bi-encoder"
last_modified: "2026-10-12T16:13:06.604Z"
---

# Bi-encoder

Reviewed on 2026-10-06.

## What it means

A bi-encoder is an architecture that encodes a query and a document separately as vectors. Comparing these representations makes it possible to select documents that are close to the question. Because the document representation does not require processing each query alongside the text, it can be calculated in advance and reused. Sentence Transformers offers this type of model for [retrieval](/en/resources/glossary/information-retrieval) and [semantic search](/en/resources/glossary/semantic-search) tasks.

## Why it matters for marketing

For marketing, the concept explains an infrastructure choice that affects access to content in a catalog or help center. Reusable document representations support searches across large collections, but their usefulness depends on the model and the available texts. Those procuring the solution should assess whether it retrieves distinctions that matter to the business in real queries.

## Example in practice

In a hypothetical project, a furniture retailer creates [embeddings](/en/resources/glossary/embeddings) for the listings of one hundred thousand products before receiving any searches. The query about a folding table for a balcony is encoded separately and compared with the existing index. The test returns fixed garden tables among the top results. The team collects these errors to evaluate another bi-encoder, keeping the test catalog unchanged.

## How to apply or verify

Ask for the model’s identity, its suitability for the language, and how the vectors are compared. Check that the query and document embeddings are compatible and that the index is updated when the collection changes. Use queries with expected passages to test retrieval, including product names, synonyms, and constraints that may be lost in an unsuitable vector representation.

## Important distinctions

The term bi-encoder describes the separate processing of inputs; it does not guarantee approximate search or require two different models. Vector search can use exact or approximate methods. A [cross-encoder](/en/resources/glossary/cross-encoder), in turn, evaluates the query and document together. Speed, quality, and cost need to be measured in the application, without turning the architecture into a universal performance promise.

## Sources and references

- [Retrieve & Re-Rank — Sentence Transformers documentation](<https://www.sbert.net/examples/sentence_transformer/applications/retrieve_rerank/README.html>) — Sentence Transformers

## Continue a leitura

- [Cross-encoder](</en/resources/glossary/cross-encoder>)
- [Embeddings](</en/resources/glossary/embeddings>)
- [Cosine similarity](</en/resources/glossary/cosine-similarity>)

## About the author

[Vinicius Pacheco](</en/team/vinicius-pacheco>)

Responsible for Tropk’s technical content, focusing on crawling, indexing, structured data, and agent access to content.

---

[All pages in Markdown](<https://tropk.ai/sitemap.md>)
