# What is Bi-Encoder? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Information Retrieval  
> **Canonical Citation:** [https://spidits.com/ai-glossary/bi-encoder](https://spidits.com/ai-glossary/bi-encoder)

## Definition
A Bi-Encoder is a neural network architecture that embeds the query and the candidate document separately into a shared vector space, allowing fast similarity comparisons using mathematical operations like cosine similarity or dot product.

## Architectural Mechanics & Deep Dive
A bi-encoder is a neural architecture used in information retrieval and semantic search. It processes the query and the candidate documents independently using two separate encoder models to generate vector embeddings. The similarity score is then calculated using a fast dot product or cosine similarity. This separation allows document embeddings to be computed and indexed in advance, enabling extremely fast search execution over millions of documents.

## Industry Applications & Real-World Use Cases
Initial vector database search, sentence similarity embeddings, and high-speed semantic retrieval.

## Frequently Asked Questions

### Why are Bi-Encoders fast?
Because document embeddings can be pre-calculated and indexed in a vector database; at query time, the system only needs to embed the query and calculate simple vector distances.

### How do Bi-Encoders compare in accuracy with Cross-Encoders?
Bi-encoders are less accurate because they do not calculate joint attention between the query tokens and document tokens.

## Related Terminology
- [cross-encoder](https://spidits.com/ai-glossary/cross-encoder)
- [vector-database](https://spidits.com/ai-glossary/vector-database)
- [embedding](https://spidits.com/ai-glossary/embedding)

---
*From the SPIDITS AI Knowledge Base (336+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
