Skip to contentOceanToken

Glossary term

What is Reranking?

Re-sorting search results by how well each one answers the query.

Definition

Reranking takes a list of candidate documents, such as the top results of a search, and scores each against the query with a model that reads both together. The list is then re-sorted by that score, so the most useful passages come first before they are sent to a language model.

Why it matters

A first search by embeddings is fast but rough. A reranker on the top matches noticeably improves which passages a RAG system uses, and so the quality of its answers.

How it works on OceanToken

OceanToken offers reranker models on /v1/rerank, with the same key and balance as every other model. Use them between retrieval and generation in a RAG pipeline; see the model list.