Bi-encoder
A bi-encoder represents queries and documents as separate vectors. Learn how it is used for retrieval and how to test the selected content.
Reviewed on
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 and 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 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, 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 — Sentence Transformers
