Cross-encoder
A cross-encoder is a neural model that jointly processes paired inputs so they can interact during encoding and produce a score or prediction about their relationship.
AI-Powered Search
A cross-encoder is a neural ranking model that jointly encodes two inputs, such as a query and document, to score their relevance using shared representations.
- How it is used
- Reranks a small candidate set after lexical or dense retrieval by scoring query-document relevance jointly.
- How deep it goes
- Explains joint Transformer encoding, contextual scoring, bi-encoder contrast, and query-time computation without detailing model training internals.
- Examples
- Uses the mountain hike query, beginner snow-hiking comparison, and a Python reranking pipeline over retrieved titles.
- What you can do after
- Apply it via sentence-transformers to score query-document pairs and rerank a limited search-result set.
Building Reliable AI Systems
A cross-encoder is a model architecture that jointly processes a pair of inputs to produce a relevance or similarity score.
- How it is used
- Reranks top-k documents in a multistage employee-policy retrieval pipeline before answers are generated.
- How deep it goes
- Explains joint transformer scoring and its speed trade-off, then shows model initialization and a hybrid retrieval test; does not detail training.
- Examples
- Uses employee-policy questions about resignation notice, adoption leave, and termination for cause, with sample ranked documents and scores.
- What you can do after
- Apply it via `sentence-transformers` CrossEncoder to rerank candidates retrieved by BM25 and E5.
Read how Building Reliable AI Systems explains cross-encoder →
Related concepts
- transformer architectureuses · A transformer architecture is a neural-network architecture that processes sequences or other structured inputs using attention mechanisms and related transformations.
- ranking modelkind of · A ranking model is a predictive model that scores or orders candidate items according to their estimated relevance, preference, or utility.
- rerankingused by · Reranking is the process of rescoring or reordering an initially retrieved or ranked set of candidates using an additional assessment of relevance or priority.
- embedding-based retrievalcontrasts with · Embedding-based retrieval retrieves or ranks candidate items by comparing vector representations of a query and the candidates.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

