Skip to main content

reranking

Creates, updates, deletes, gets or lists a reranking resource.

Overview

Namereranking
TypeResource
Idcloudflare.ai.reranking

Supported models

Set model_name to one of the following models:

Reranking (1 model)
@cf/baai/bge-reranker-base

Fields

The following fields are returned by SELECT queries:

Model response

NameDatatypeDescription
contentsstringRaw response payload (binary or non-object results), used by contents-mode families.
errorsarray
messagesarray
resultobject
successboolean

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
runselectaccount_id, model_nameThis endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in Cloudflare Docs.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
model_namestring

SELECT examples

This endpoint provides users with the capability to run specific AI models on-demand. By submitting the required input data, users can receive real-time predictions or results generated by the chosen AI model. The endpoint supports various AI model types, ensuring flexibility and adaptability for diverse use cases. Model specific inputs available in Cloudflare Docs.

SELECT
contents
FROM cloudflare.ai.reranking
WHERE account_id = '{{ account_id }}' -- required
AND model_name = '{{ model_name }}' -- required
AND query = '{{ query }}' -- model input
AND contexts = '{{ contexts }}' -- model input
;