# Knowledge Topic Top-k Label Coverage

> Knowledge Topic Top-k Label Coverage is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-16).

Computes top-k label coverage metrics for a knowledge topic classifier given up to 200 labelled text records with predicted probabilities.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-ml-knowledge-topic-top-k?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/knowledge-topic-top-k-label-coverage-3e746fa5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GMmLqq8bCcjcW_ToGzvGb

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability knowledge-topic-top-k-label-coverage-3e746fa5 -d '<json body>'
```

Example prompt: Evaluate the top-2 label coverage for my knowledge topic classifier — I have 12 labeled records with actual and predicted labels (setup, usage, troubleshooting, reference) and their probability arrays, and I want to know how often the correct label appears in the top 2 predictions.

## When to prefer this

Choose this endpoint when you need a lightweight, local top-k label coverage evaluation for a four-class knowledge topic classifier (setup, usage, troubleshooting, reference) without sending data to a hosted model or foundation model. Ideal for fast, low-cost ($0.01) spot-checks on small datasets up to 200 records using your own predicted labels and probability scores.

## Known failure modes

- More than 200 records submitted — endpoint only accepts up to 200 labelled records
- Probability array length not exactly 4 — each record requires exactly 4 probability values
- k value outside range 1–4 — will be rejected
- Invalid label values — actual and predicted must be one of: setup, usage, troubleshooting, reference
- Malformed record missing required fields (id, text, actual, predicted, probabilities) — validation error
- Payment of 0.01 USDC not completed via x402 protocol — request rejected

## How this service works

Knowledge topic - Top-k label coverage: Top-k label coverage for Knowledge topic. Up to 200 supplied labelled text records. Local dataset tools, evaluation and small naive-Bayes baselines; no hosted model or foundation-model training. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded top-k label coverage deliverable.

## Output

Returns a top-k label coverage metric indicating the proportion of supplied records where the true label appears among the top k predicted labels ranked by probability, computed locally over the submitted dataset of up to 200 records across four knowledge topic categories: setup, usage, troubleshooting, and reference.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "k": {
   "type": "integer",
   "default": 2,
   "maximum": 4,
   "minimum": 1
  },
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "text",
     "actual",
     "predicted",
     "probabilities"
    ],
    "properties": {
     "id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "text": {
      "type": "string",
      "default": "",
      "maxLength": 1000
     },
     "actual": {
      "enum": [
       "setup",
       "usage",
       "troubleshooting",
       "reference"
      ],
      "type": "string"
     },
     "predicted": {
      "enum": [
       "setup",
       "usage",
       "troubleshooting",
       "reference"
      ],
      "type": "string"
     },
     "probabilities": {
      "type": "array",
      "items": {
       "type": "number",
       "default": 0,
       "maximum": 1,
       "minimum": 0
      },
      "default": [],
      "maxItems": 4,
      "minItems": 4
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "id": "example-0-0",
     "text": "setup sample document number 0 for this supplied dataset.",
     "actual": "setup",
     "predicted": "setup",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-1",
     "text": "setup sample document number 1 for this supplied dataset.",
     "actual": "setup",
     "predicted": "setup",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-2",
     "text": "setup sample document number 2 for this supplied dataset.",
     "actual": "setup",
     "predicted": "setup",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-0",
     "text": "usage sample document number 0 for this supplied dataset.",
     "actual": "usage",
     "predicted": "usage",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-1",
     "text": "usage sample document number 1 for this supplied dataset.",
     "actual": "usage",
     "predicted": "usage",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666666666
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/knowledge-topic-top-k-label-coverage-3e746fa5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
