cicora.ai
API specificationRetrieval quality

Rerank

Reorder a small set of candidates against a query to improve the precision of final retrieval.

Integration reference: choose parameters and available capabilities from your account API settings and the model catalogue for your environment.

Send query and documents

First obtain an inexpensive broad set through search or embeddings, then send query and candidates to rerank. This reduces cost and latency compared with reranking a whole corpus.

Documents need to retain your internal id so a result can map back to the source record.

Rerank request
bash
curl --request POST https://cicora.ai/api/v1/rerank \
  --header "Authorization: Bearer $CICORA_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "cohere/rerank-v3.5",
    "query": "How do I change a subscription?",
    "documents": ["Billing changes are in Settings.", "Images can be generated from a prompt."],
    "top_n": 1
  }'

Candidate size

  • Limit documents to a sensible count before the call.
  • top_n should reflect how many items the next step really needs.
  • Do not combine documents with different access rights into one text.

Use the score

A rerank result is an ordering signal, not absolute truth. Combine it with access filters, recency, and business rules.

Log the query and de-identified candidate ids for offline evaluation without copying restricted content into unnecessary logs.