cross-encoder
A model that reads a query and a passage together and outputs one relevance score, instead of embedding each separately.
In more detail
Reading both at once lets it judge relevance much better than comparing two embeddings, at the cost of running the model once per pair. That is why it is used to rerank a shortlist rather than to search.
Related terms
- reranker — A model that reorders a shortlist of retrieved passages by reading each one together with the query.
- embedding model — A model that maps text to embedding vectors rather than generating text.
Taught in
- Keyword And Hybrid Search — AI Engineering: LLM Apps, RAG & Agents
- Measuring Retrieval — AI Engineering: LLM Apps, RAG & Agents
- Retrieval That Finds The Right Thing — AI Engineering: LLM Apps, RAG & Agents
References
- Sentence Transformers: Retrieve & Re-Rank
- Hugging Face: cross-encoder/ms-marco-MiniLM-L6-v2 model card