--- title: Cross-Encoder Reranking API emoji: ⚖️ colorFrom: indigo colorTo: blue sdk: docker pinned: false app_port: 7860 --- # ⚖️ FinReg BGE Cross-Encoder Reranking API High-performance cloud cross-encoder re-ranking service powered by **`BAAI/bge-reranker-base`**. --- ## 🚀 Quick Usage (POST `/rerank`) ### Request ```json POST /rerank Content-Type: application/json { "query": "What are Priority Sector Lending targets under RBI norms?", "documents": [ "RBI Circular on Priority Sector Lending: Domestic commercial banks must achieve 40% of ANBC...", "SEBI Mutual Fund regulations: AMCs must maintain minimum net worth of Rs 50 Crore...", "PMLA Act: Banking entities must retain transaction records for 5 years..." ], "top_k": 2 } ``` ### Response ```json { "query": "What are Priority Sector Lending targets under RBI norms?", "model": "BAAI/bge-reranker-base", "total_evaluated": 3, "latency_ms": 42.5, "scores": [0.954, 0.001, 0.002], "ranked_indices": [0, 2, 1], "ranked_results": [ { "rank": 1, "original_index": 0, "score": 0.954, "document": "RBI Circular on Priority Sector Lending: Domestic commercial banks must achieve 40% of ANBC..." } ] } ```