models

bge-reranker-v2-m3

Markdown · JSON

bge-reranker-v2-m3

BAAI’s multilingual cross-encoder for ranking candidate passages against a query. It reads each query–passage pair together and returns a relevance score, refining a search shortlist without generating an answer or creating document embeddings.

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

BGE Reranker v2 M3 is a multilingual relevance model built on BGE-M3. It receives a query and a candidate passage together and returns a score for their relationship. BAAI positions this edition as an efficient multilingual reranker, including for Chinese and English retrieval, where a search application needs to refine an existing list of candidates.

Relevance from a query–passage pair

A cross-encoder processes both texts jointly, allowing their content to interact before the relevance score is produced. This differs from an embedding model, which encodes texts independently for reusable vector comparison. The reranker’s output is a scalar score for a particular pair, rather than a document vector or a written answer.

Use the model after an initial search has selected plausible passages. Pair the question with each candidate and order the candidates by the resulting scores. This focuses the more detailed comparison on a manageable shortlist instead of asking a cross-encoder to inspect every passage in a large collection.

The v2 M3 edition

The maker identifies BGE-M3 as the base model and lists multilingual support as a principal feature. Within its v2 reranker family, M3 is the efficient multilingual option; the Gemma-based and layer-selection variants are distinct models with different implementation choices. The name M3 here does not mean the reranker returns the dense, sparse and multi-vector embeddings of the original embedding model.

This distinction matters when choosing the result your application requires. Select an embedding model to represent and search a document collection. Select this reranker when you already have candidate text and need to decide which passage is most relevant to the current query.

Preparing candidates that can be ranked usefully

Provide the actual question and the complete candidate text needed to interpret it. Preserve headings or nearby definitions when they determine the meaning of a passage. In the published Transformers example, the query and passage are tokenised together with truncation and max_length=512. That is an example setting rather than a model-wide limit. Keep the question and required evidence within the selected pair budget, and check what truncation removes. A result mentioning the same product as a query can still be irrelevant if it addresses the wrong operation or condition; prepare examples that distinguish those cases when evaluating retrieval quality.

For a document assistant, keep candidate identifiers alongside their text, score the question–passage pairs and pass the selected original passages to the answering step. The answering model then receives the evidence rather than a relevance score without its source. This is an illustrative retrieval workflow; the reranker itself neither searches an external collection nor writes the answer.

Reading and normalising scores

The manufacturer returns raw relevance scores, with a higher value indicating a closer match. Its documented optional normalisation applies a sigmoid function to place the score between 0 and 1. A normalised score has a convenient range, but that transformation alone does not establish a calibrated probability that the candidate is correct.

Choose ranking or filtering thresholds using representative query–passage pairs from your workload. Include passages that share keywords but answer a different question, as well as relevant passages with different wording. This makes the selected threshold meaningful for the collection being searched.

For an Ailoot API project, define what the final context should contain and how many candidates can be examined efficiently. The useful result is a better ordered evidence set for the next application step. Keep this edition’s relevance output separate from document embeddings, generated prose and the layer-selection controls documented for other rerankers.

Ailoot Ultra · Rerank POST /v1/rerank bge-reranker-v2-m3

bge-reranker-v2-m3

BAAI /bge-reranker-v2-m3

Overview

BAAI’s multilingual cross-encoder for ranking candidate passages against a query. It reads each query–passage pair together and returns a relevance score, refining a search shortlist without generating an answer or creating document embeddings.

Accepted inputs
Text
Results
Ranked results

Available in Ailoot · inputs & methods

Ailoot Ultra · Rerank POST /v1/rerank
Input types
text
Output types
rerank
FieldTypeRequirementValues & limitsDefault
FieldmodelTypestringRequirementRequiredValues & limits
bge-reranker-v2-m3
Default—
FieldqueryTypestringRequirementOptionalValues & limitsDefault—
FielddocumentsTypearrayRequirementRequiredValues & limitsDefault—
Method parameters and lifecycle
ParameterContract
Parametercontent_typeContractapplication/json
ParameterrequiredContractmodel, documents
Parametermaterial_typesContracttext
Parametermaterial_conditionsContractSet your actual query and nonempty array of original text documents. Result indices refer to that original array.

Lifecycle: synchronous_result_then_owned_library

GET /v1/media/assets/{asset_id}/content

GET /v1/media/assets

GET /v1/media/assets/{asset_id}

Pricing

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode
Not specified When fast mode is selected
Flex mode
Not specified When flex mode is selected
Maximum reasoning effort
Not specified When maximum reasoning effort uses the default adjustment

Ailoot rates

Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

ConfigurationRate scheduleBilling unitCharge
ConfigurationBase token ratesRate scheduleBase rateBilling unit—Charge
Input · Input tokens — / 1K tokens
Output · Output tokens — / 1K tokens
Input · Cache read — / 1K tokens
Input · Cache write — / 1K tokens
Input · Cache write, 1 hour — / 1K tokens
Configurationtotal tokenRate schedule—Billing unit/ 1K tokensCharge
Input · total token $0.00004 / 1K tokens

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. How reservation and settlement work →

Example requests

Ailoot Ultra · Rerank

Use actual input and retain the complete result
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_QUERY:?Set the actual documented input value}"
export AILOOT_QUERY
: "${AILOOT_DOCUMENTS_JSON:?Set the actual documented input value}"
export AILOOT_DOCUMENTS_JSON
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
request={'model': 'bge-reranker-v2-m3', 'query': '${ACTUAL_QUERY}', 'documents': '${ACTUAL_DOCUMENTS}'}
request['query']=os.environ['AILOOT_QUERY']
request['documents']=json.loads(os.environ['AILOOT_DOCUMENTS_JSON'])
Path('request.json').write_text(json.dumps(request,ensure_ascii=False),encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/rerank \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o response.bin
# Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.

Receive and save results

Ailoot Ultra · Rerank

Complete original native JSON result with the configured response model, original document indices, relevance scores, document strings and native token usage. Retain every actual result and usage field.

  • GET /v1/media/assets/{asset_id}/content
  • GET /v1/media/assets
  • GET /v1/media/assets/{asset_id}
Keep all completed results

Keep every complete returned response, file and content part.

Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.

If the original response needs checking

Retain the actual X-Client-Request-ID and complete response. Read the original owned assets and their exact signed content URLs; never resubmit an uncertain creation.

Response fields
FieldTypeMeaning
FieldmodelTypestringMeaningExact response model required by the configured Source consumer.
Fieldresults[].indexTypeintegerMeaningUnique original input document index.
Fieldresults[].relevance_scoreTypenumberMeaningFinite relevance score.
Fieldresults[].documentTypestringMeaningOriginal text document required by this configured response consumer.
Fieldusage.total_tokensTypeintegerMeaningFinite nonnegative native token count required by the current accepted tariff.
Errors and next steps
ResponseConditionNext step
Response400 · invalid_request_errorConditionThe JSON body or explicit canonical model ID is invalid.Next stepRetain the response and correct the indicated request field.
Response401 · authentication_errorConditionThe Ailoot API key is invalid.Next stepUse your authorized Ailoot API key.
Response403 · permission_errorConditionThe key group does not admit this method.Next stepRetain the returned error details.
Response404 · not_found_errorConditionThe selected method has no admitted route.Next stepRetain the returned error details.
Response422 · price_unavailableConditionThe accepted tariff cannot obtain its required input quantity or bound.Next stepRetain the response; use the input representation required by the accepted tariff.
Response503 · ConditionRequired storage, route, method price or reservation is unavailable.Next stepKeep the complete original response. An uncertain reservation is not permission to resubmit.
Response502 · billing_requires_checkConditionThe original result, usage or settlement requires checking.Next stepRetain the actual request ID and original response. Read the existing owned record; do not resubmit creation.

Aliases

Model aliases

Ailoot Ultra bge-reranker-v2-m3

Method path aliases

Use the method paths shown above.

Related caller IDs

bge-reranker-v2-m3

FAQ · bge-reranker-v2-m3
What inputs and results are available?

POST /v1/rerank · bge-reranker-v2-m3: text → rerank

Which fields does the request use?

POST /v1/rerank · bge-reranker-v2-m3: model, query, documents

More details

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription
Choose a discounted plan for your regular requests.
Promo code: up to 50% off
Enter your code at checkout. The price updates to reflect the current promotion.
Spending in your history
The model, tokens and amount are recorded for each request.

Choose a subscription · View model prices

Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application
Add text, image, video and audio generation to paid features in your service.
Reseller licence
Send a description of your project and how you provide access. Request written terms for use and resale.
Documents on the website
The service offer, licence agreement and data processing policy are available before you connect.

Request a reseller licence · Service offer and licence agreement