Denkwerk
rag metrics
All metrics are defined in the response. With relevant_ids: precision@k and recall@k over the first k contexts, MRR, average precision and nDCG@k with binary relevance and log2 discount. Without relevant_ids, a context counts as relevant when it supports the reference (or the question if no reference) at or above the threshold; context precision = mean of precision@i over relevant positions (rank-weighted, as in RAGAS but without an LLM judge). Context recall: share of reference sentences.
POST https://denk.halowerk.com/v1/rag-metricsInputs
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | Yes | User question. |
| answer | string | Yes | Generated answer. |
| contexts | array | Yes | Retrieved contexts in rank order: strings or objects {id, text}. |
| reference | string | No | Ground-truth answer (enables context recall and correctness). |
| relevant_ids | array | No | Ids (or 0-based positions as strings) of the truly relevant contexts. |
| k | integer | No | |
| method | string | No | |
| language | string | No | |
| lexical_threshold | number | No | |
| semantic_threshold | number | No | Cosine threshold for intfloat/multilingual-e5-small (heuristic; related pairs typically score 0.80-0.90, unrelated 0.65-0.75). |
Show full input schema
{
"type": "object",
"additionalProperties": false,
"required": [
"question",
"answer",
"contexts"
],
"properties": {
"question": {
"type": "string",
"minLength": 1,
"maxLength": 5000,
"description": "User question."
},
"answer": {
"type": "string",
"minLength": 1,
"maxLength": 20000,
"description": "Generated answer."
},
"contexts": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"description": "Retrieved contexts in rank order: strings or objects {id, text}.",
"items": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 20000
},
{
"type": "object",
"additionalProperties": false,
"required": [
"text"
],
"properties": {
"id": {
"type": "string",
"maxLength": 128
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 20000
}
}
}
]
}
},
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 20000,
"description": "Ground-truth answer (enables context recall and correctness)."
},
"relevant_ids": {
"type": "array",
"maxItems": 50,
"uniqueItems": true,
"items": {
"type": "string",
"maxLength": 128
},
"description": "Ids (or 0-based positions as strings) of the truly relevant contexts."
},
"k": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 5
},
"method": {
"type": "string",
"enum": [
"lexical",
"embedding",
"both"
],
"default": "lexical"
},
"language": {
"type": "string",
"enum": [
"auto",
"de",
"en"
],
"default": "auto"
},
"lexical_threshold": {
"type": "number",
"minimum": 0.1,
"maximum": 1,
"default": 0.6
},
"semantic_threshold": {
"type": "number",
"minimum": 0.5,
"maximum": 1,
"default": 0.8,
"description": "Cosine threshold for intfloat/multilingual-e5-small (heuristic; related pairs typically score 0.80-0.90, unrelated 0.65-0.75)."
}
}
}Published input example
{
"question": "Where is the Eiffel Tower?",
"answer": "The Eiffel Tower is in Paris.",
"contexts": [
"The Eiffel Tower is a landmark in Paris, completed in 1889.",
"Berlin is the capital of Germany."
]
}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
- Denkwerk0.003 USDC
agent card generate
POSThttps://denk.halowerk.com/v1/agent-card-generateBuilds an Agent2Agent protocol Agent Card with protocolVersion, name, description, url, version, capabilities, default input/output modes and skills. Skills come from the supplied list or are derived from OpenAPI operations (operationId, su
- Denkwerk0.003 USDC
agent permission diff
POSThttps://denk.halowerk.com/v1/agent-permission-diffTakes the tool names (with optional descriptions) and permission scopes of an agent before and after a change and reports added and removed tools and scopes, classifies new capabilities by risk (payments, sending messages, deleting or writi
- Denkwerk0.003 USDC
annotation guide draft
POSThttps://denk.halowerk.com/v1/annotation-guide-draftTakes example texts per label and derives, without a language model, the most distinguishing terms per label (TF-IDF contrast against the other labels), representative examples, cross-label example pairs with high similarity that need a wri