Skip to content
HALOWERK

Denkwerk

rerank

Scores every (query, passage) pair with a cross-encoder run locally through transformers.js/ONNX Runtime and sorts by the model logit; relevance is the logistic sigmoid of the logit. multilingual: cross-encoder/mmarco-mMiniLMv2-L12-H384-v1 (Apache-2.0, trained on mMARCO: en, ar, zh, nl, fr, de, hi, id, it, ja, pt, ru, es, vi). english: cross-encoder/ms-marco-MiniLM-L6-v2 (Apache-2.0, MS MARCO, English only). Both are the int8 ONNX exports published in the model repositories (pinned.

POST https://denk.halowerk.com/v1/rerank

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
querystringYes
passagesarrayYesStrings or objects {id, text}.
modelstringNo
top_kintegerNo
max_lengthintegerNoToken limit per (query, passage) pair; lower values are faster.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "query",
    "passages"
  ],
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "passages": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "description": "Strings or objects {id, text}.",
      "items": {
        "anyOf": [
          {
            "type": "string",
            "minLength": 1,
            "maxLength": 6000
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "text"
            ],
            "properties": {
              "id": {
                "type": "string",
                "maxLength": 128
              },
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 6000
              },
              "score": {
                "type": "number"
              }
            }
          }
        ]
      }
    },
    "model": {
      "type": "string",
      "enum": [
        "multilingual",
        "english"
      ],
      "default": "multilingual"
    },
    "top_k": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "max_length": {
      "type": "integer",
      "minimum": 64,
      "maximum": 512,
      "default": 512,
      "description": "Token limit per (query, passage) pair; lower values are faster."
    }
  }
}

Open original schema

Published input example

{
  "query": "Wie hoch ist die Mehrwertsteuer in Deutschland?",
  "passages": [
    "Der allgemeine Umsatzsteuersatz beträgt 19 Prozent.",
    "Berlin ist die Hauptstadt."
  ]
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →