Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add topprismdata/cultivating-ml-agent --skill per-category-modeling-backfiregit clone --depth 1 https://github.com/topprismdata/cultivating-ml-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/per-category-modeling-backfire)<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/per-category-modeling-backfire"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/per-category-modeling-backfire/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/topprismdata/cultivating-ml-agent/per-category-modeling-backfire"><img src="https://agentmods.dev/badge/skills/topprismdata/cultivating-ml-agent/per-category-modeling-backfire.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00103 | $0.01560 |
| Opus 5 | $0.00051 | $0.00780 |
| Sonnet 5 | $0.00021 | $0.00312 |
| Haiku 4.5 | $0.00010 | $0.00156 |
Grade A, and why
per-category-modeling-backfire scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Per-Category Modeling Backfire: When Splitting Data Hurts
Problem
A common "advanced" technique in Kaggle competitions is to train separate models for each category (e.g., per product family, per store, per region). While this seems intuitively correct—different categories have different patterns—it can backfire spectacularly when individual categories lack sufficient data volume.
Context / Trigger Conditions
Use when considering:
- Training separate GBDT models per product family, store, or region
- Per-category CV improves but leaderboard score degrades
- Each category has <100K rows but the full dataset has >1M rows
- Categories have highly imbalanced data volumes (some huge, some tiny)
- The global model already handles category differences via categorical features
Specific symptoms:
- Per-category CV: 0.367 (better) vs Global CV: 0.375 → Per-category LB: 2.10 vs Global LB: 1.86
- Small categories show high CV variance (>0.05 std across folds)
- Test predictions from per-category models have shifted mean (higher or lower than expected)
Solution
The Data Volume Threshold
Per-category modeling only works when each category has enough data to train a robust model.
| Rows per category | Per-category modeling | Recommendation |
|---|---|---|
| <50K | Harmful — overfitting, high variance | Use global model |
| 50K-200K | Risky — depends on problem complexity | Test both, compare LB |
| 200K-1M | Usually beneficial | Per-category if CV confirms |
| >1M | Almost always beneficial | Per-category recommended |
Why It Fails With Small Categories
- Overfitting: 70K rows × 5-fold CV = 14K validation rows. Easy to overfit.
- High variance: Small categories (BOOKS, HARDWARE) have CV std >0.05, meaning the model is unstable across folds.
- Feature instability: Lag/rolling features with limited history don't generalize.
- Loss of cross-category signal: Global model learns that "weekend → more sales" applies across ALL categories, amplifying this signal. Per-category models each must re-learn this from limited data.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 156 lines · 103 tokens per session scan A 6a46ee7cdd6e
per-category-modeling-backfire is a skill published in the GitHub repository topprismdata/cultivating-ml-agent (5 stars, last pushed 15d ago), licensed MIT. It adds 103 tokens to every session and 1,560 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
huggingface-hub
Hugging Face Hub CLI (hf) — search, download, and upload models and datasets, manage repos, query datasets with SQL, deploy inference endpoints, manage Spaces and buckets.
tensorboard
Visualize training metrics, debug models with histograms, compare experiments, visualize model graphs, and profile performance with TensorBoard - Google's ML visualization toolkit.
mlflow
Track ML experiments, manage model registry with versioning, deploy models to production, and reproduce experiments with MLflow - framework-agnostic ML lifecycle platform.
datachain-knowledge
Use whenever datasets, cloud storage buckets, or data pipelines are mentioned — creating, saving, querying, listing, exploring, deleting, or processing data in S3, GCS, Azure Blob, or local storage. Also use when running any script that may create datasets as a side effect. Maintains a knowledge base at dc-knowledge/…
prompt-scanner
A scanner for text sent to an AI agent, looking for prompt injection and jailbreak attempts. Prompt injection is text that tries to override an agent's instructions; a jailbreak tries to bypass its safety limits.
install-openviking-memory
Install and configure the OpenViking long-term memory plugin for OpenClaw via natural conversation. Once installed, the plugin automatically captures facts from chats and recalls relevant context before each reply (auto-capture + auto-recall, cross-session). Covers prerequisites, install through OpenClaw's plugin…