We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
cohere/rerank-5-fastRuns on your balance at the prices above. New accounts start with free usage.
Settings
Cohere: Rerank 5 Fast is a reranking model from Cohere, positioned as the low-latency tier of the company's Rerank 5 family. Rather than generating text, it scores and reorders candidate documents against a query, which places it in the retrieval stage of a search or RAG pipeline rather than in the generation stage.
The model works with text input and produces a rerank output, meaning its response is an ordering of the documents you supply rather than new prose. It supports a context length of 32768 tokens, and its maximum output is 29491. Because it is built for scoring and reordering, it does not take the sampling or generation parameters you would expect from a chat model.
The practical use cases follow directly from that behaviour. If you run a first-stage retriever such as a vector search or keyword search, Rerank 5 Fast can take the top candidates it returns and reorder them so the most relevant documents sit at the top. That improves the quality of what you feed into a downstream answer generator, and it also helps when you present search results directly to a user. The low-latency tier is aimed at high-throughput retrieval, so it fits pipelines that issue many queries and cannot afford a slow reranking step on each one.
You call it through api14's OpenAI-compatible API using the model id "cohere/rerank-5-fast". Because the endpoint follows the OpenAI format, you can point existing OpenAI client libraries at api14 and pass that id as the model. The model lists no supported parameters, so requests rely on the model id together with your query and candidate documents rather than on tuning options.
Since Rerank 5 Fast only reorders documents you provide, it is not a fit when you need text generation, summarisation or reasoning over a prompt. Those tasks call for a generative model, with reranking applied beforehand if retrieval quality matters.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.post("/rerank", { body: {
"model": "cohere/rerank-5-fast",
"query": "What is the capital of France?",
"documents": [
"Paris is the capital of France.",
"Berlin is in Germany."
],
"top_n": 1
} });
console.log(result.results);
This community has no topics yet. Open the first one about Cohere: Rerank 5 Fast.