개요
Reranker (재랭킹)
쿼리와 후보 문서를 입력으로 받아 관련도 점수로 정렬. RAG 파이프라인의 마지막 단계, 검색 결과 정밀화, FAQ 매칭, 상품 검색 정확도 향상 등에 사용.
- 엔드포인트
- /v1/rerank
- 예시 모델
- bge-reranker-v2-m3
API
API 예시
# 1) discover an online reranker — Grid's set changes constantly,
# don't hardcode an id in your code.
MODEL=$(curl -s https://api.openalchemy.io/v1/models \
-H "Authorization: Bearer $OPENALCHEMY_API_KEY" \
| jq -r '.data[] | select(.online and .endpoint_type=="rerank") | .id' \
| head -1)
# 2) rerank — results come back as {index, relevance_score},
# index points into your documents array
curl https://api.openalchemy.io/v1/rerank \
-H "Authorization: Bearer $OPENALCHEMY_API_KEY" \
-H "X-Project-Id: $YOUR_PROJECT_ID" \
-H "Content-Type: application/json" \
-d "{
\"model\": \"$MODEL\",
\"query\": \"Where is the best ramen in Tokyo?\",
\"documents\": [
\"Ichiran has 24-hour shops in Shibuya.\",
\"Tsuta in Sugamo holds a Michelin star.\",
\"The Tsukiji market is famous for sushi.\",
\"Afuri serves yuzu shio ramen in Ebisu.\"
],
\"top_n\": 4
}"상태
할당량 및 요금 (프로젝트별)
할당과 레이트 리밋은 API 키를 발급한 프로젝트에 적용. 도메인 스코프의 정책 레이어가 각 모달리티를 호출할 수 있는 오리진을 추가로 제약.
오늘 시작
추론 비용을 연금술에 가까운 무언가로 바꿀 준비, 됐나요?
가입만 하면 2,000 무료 크레딧($2 상당) 제공. 신용카드 불필요.