{"uid":"cap_GMmLqq8bCcjcW_ToGzvGb","slug":"knowledge-topic-top-k-label-coverage-3e746fa5","name":"Knowledge Topic Top-k Label Coverage","description":"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.","url":"https://market.datapackvibe.com/x402/assistant-sector-ml-knowledge-topic-top-k?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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.06666666666666667,0.06666666666666667]},{"id":"example-1-2","text":"usage sample document number 2 for this supplied dataset.","actual":"usage","predicted":"usage","probabilities":[0.06666666666666667,0.8,0.06666666666666667,0.06666666666666667]},{"id":"example-2-0","text":"troubleshooting sample document number 0 for this supplied dataset.","actual":"troubleshooting","predicted":"troubleshooting","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-2-1","text":"troubleshooting sample document number 1 for this supplied dataset.","actual":"troubleshooting","predicted":"troubleshooting","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-2-2","text":"troubleshooting sample document number 2 for this supplied dataset.","actual":"troubleshooting","predicted":"troubleshooting","probabilities":[0.06666666666666667,0.06666666666666667,0.8,0.06666666666666667]},{"id":"example-3-0","text":"reference sample document number 0 for this supplied dataset.","actual":"reference","predicted":"reference","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]},{"id":"example-3-1","text":"reference sample document number 1 for this supplied dataset.","actual":"reference","predicted":"reference","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]},{"id":"example-3-2","text":"reference sample document number 2 for this supplied dataset.","actual":"reference","predicted":"reference","probabilities":[0.06666666666666667,0.06666666666666667,0.06666666666666667,0.8]}],"maxItems":200,"minItems":2}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_f9ekSVn8TW8ySsmkUBU68","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes top-k label coverage metrics for a knowledge topic classifier given up to 200 labelled text records with predicted probabilities.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Classifier coverage check before deployment","prompt":"Before I ship my knowledge base topic classifier, can you run a top-2 label coverage check on these 20 labeled records — each has an actual category (setup, usage, troubleshooting, or reference), a predicted label, and 4 probability scores — and tell me how often the true label lands in the top 2 predictions?"},{"title":"Comparing k values for support doc routing","prompt":"I'm tuning a support document router that classifies articles into setup, usage, troubleshooting, and reference. Can you compute the top-k label coverage for k=1, k=2, and k=3 separately on my 50 labeled samples with their probability arrays so I can see how much coverage improves as k increases?"},{"title":"Spot-checking a naive-Bayes baseline model","prompt":"I trained a simple naive-Bayes model to categorize knowledge articles into setup, usage, troubleshooting, and reference, and I have 30 test records with predicted labels and probability outputs. Can you calculate the top-3 label coverage to see if my baseline is good enough before investing in a bigger model?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T00:53:06.216Z","isFirstParty":false,"canonicalSlug":"knowledge-topic-top-k-label-coverage-3e746fa5"}