> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forii.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reranking

> Improve RAG quality with cross-encoder reranking — Coming Soon

<Warning>
  This endpoint is not yet available. It is planned for a future release.
</Warning>

Cross-encoder reranking significantly outperforms cosine similarity alone. Essential for production search systems over Indic-language documents.

## Planned endpoint

```
POST https://api.forii.in/inference/v1/rerank
```

### Example (planned)

```bash theme={null}
curl https://api.forii.in/inference/v1/rerank \
  -H "Authorization: Bearer $FORII_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "forii/rerank-v3",
    "query": "GST rate for textile exports",
    "documents": [
      "GST on textile exports is 0% with LUT",
      "Textile domestic sales attract 5% GST",
      "Service tax on textile logistics is 18%"
    ],
    "top_n": 3
  }'
```

### Planned response

```json theme={null}
{
  "object": "list",
  "data": [
    {"index": 1, "relevance_score": 0.94, "document": "Textile domestic sales attract 5% GST"},
    {"index": 0, "relevance_score": 0.89, "document": "GST on textile exports is 0% with LUT"},
    {"index": 2, "relevance_score": 0.31, "document": "Service tax on textile logistics is 18%"}
  ],
  "model": "forii/rerank-v3",
  "usage": {"prompt_tokens": 45, "total_tokens": 45}
}
```

## Related

* [Embeddings](/docs/api-reference/embeddings) — Generate vectors for RAG
* [Roadmap](/docs/support/roadmap) — feature timeline
