ToolAssay

Pack the best passages into a token budget with Maximal Marginal Relevance

Pack the best passages into a token budget with Maximal Marginal Relevance: relevance from your scores or BM25, redundancy from TF-IDF cosine, exact token count, citation labels. Selects passages greedily by Maximal Marginal Relevance (Carbonell and Goldstein 1998): lambda * relevance - (1 - lambda) * maximum TF-IDF cosine similarity to the passages already chosen; passages that no longer fit the budget are skipped.

Answeringour last check, 2026-11-27
7 of 7checks answered this week
900 msmedian answer time
$0.003listed price per call
$0.003price it asked us

Paid test badge: not yet. The checks above are free: we call the tool without paying and read the payment request it sends back. The Verified badge needs paid calls whose answers match the promised output, and nobody can buy a badge.

Endpoint

POST https://denk.halowerk.com/v1/context-pack

CategoryMarket data
Provider hostdenk.halowerk.com
Networkseip155:8453
Payment schemesexact
Self-reported calls, 30 days1 from 1 payers (the provider's figure, not ours)

Our checks, last 30 days

DayResultHTTPAskedTime
2026-11-27 valid payment request 402$0.003 901 ms
2026-11-26 valid payment request 402$0.003 888 ms
2026-11-25 valid payment request 402$0.003 900 ms
2026-11-24 valid payment request 402$0.003 911 ms
2026-11-23 valid payment request 402$0.003 865 ms
2026-11-22 valid payment request 402$0.003 906 ms
2026-11-21 valid payment request 402$0.003 889 ms
2026-11-20 valid payment request 402$0.003 881 ms

Example input (from the provider)

{
  "body": {
    "budget_tokens": 200,
    "passages": [
      {
        "id": "a",
        "score": 0.9,
        "text": "Die K\u00fcndigungsfrist betr\u00e4gt drei Monate."
      },
      {
        "id": "b",
        "score": 0.4,
        "text": "Die Kaution betr\u00e4gt drei Monatsmieten."
      }
    ],
    "query": "K\u00fcndigungsfrist Mietvertrag"
  },
  "bodyType": "json",
  "method": "POST",
  "type": "http"
}

Promised output schema (from the provider)

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "budget_tokens": {
              "maximum": 2000000,
              "minimum": 1,
              "type": "integer"
            },
            "encoding": {
              "default": "cl100k_base",
              "enum": [
                "cl100k_base",
                "o200k_base"
              ],
              "type": "string"
            },
            "lambda": {
              "default": 0.7,
              "maximum": 1,
              "minimum": 0,
              "type": "number"
            },
            "order": {
              "default": "selection",
              "enum": [
                "selection",
                "source",
                "edges"
              ],
              "type": "string"
            },
            "passages": {
              "items": {
                "anyOf": [
                  {
                    "maxLength": 20000,
                    "minLength": 1,
                    "type": "string"
                  },
                  {
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "maxLength": 128,
                        "type": "string"
                      },
                      "score": {
                        "type": "number"
                      },
                      "text": {
                        "maxLength": 20000,
                        "minLength": 1,
                        "type": "string"
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "type": "object"
                  }
                ]
              },
              "maxItems": 300,
              "minItems": 1,
              "type": "array"
            },
            "query": {
              "maxLength": 2000,
              "type": "string"
            },
            "separator": {
              "default": "\n\n",
              "maxLength": 20,
              "type": "string"
            },
            "template": {
              "default": "[{id}] {text}",
              "maxLength": 200,
              "type": "string"
            }
          },
          "required": [
            "passages",
            "budget_tokens"
          ],
          "type": "object"
        },
        "bodyType": {
          "enum": [
            "json",
            "form-data",
            "text"
          ],
          "type": "string"
        },
        "method": {
          "enum": [
            "POST",
            "PUT",
            "PATCH"
          ],
          "type": "string"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method",
        "bodyType",
        "body"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

This page as JSON