diff --git a/agent-skills/skills/kumo-data-science/SKILL.md b/agent-skills/skills/kumo-data-science/SKILL.md index 0668c6cf5..a9ab04484 100644 --- a/agent-skills/skills/kumo-data-science/SKILL.md +++ b/agent-skills/skills/kumo-data-science/SKILL.md @@ -338,8 +338,10 @@ in the same or a later turn. Then, per `kumoai-reference/references/kumo_finetun - Report the outcome: the training metrics, or the exception and the cell that raised it - **Read what Kumo said about the data first.** A warning or error about the data — duplicate primary keys, a foreign key that matched few rows, invalid values read as null, a float or - mismatched key, an empty training table — leads the report, with the table, column and count, - and the decision goes to the user: fix the source, change the key or link, or accept the loss. + mismatched key, an empty training table, or a nonzero count from a read-only check cell such as + entities whose history is cut off by sampling — leads the report, with the table, column and + count, and the decision goes to the user: fix the source, change the key or link, or accept the + loss. A run that finished is not a success until they have decided. Never change the data, a column's type or the query to make such a message go away (`kumoai-reference/references/troubleshooting_signals.md` §1a). A failure that is not about the diff --git a/agent-skills/skills/kumoai-reference/SKILL.md b/agent-skills/skills/kumoai-reference/SKILL.md index eed96d801..9d0ede8c7 100644 --- a/agent-skills/skills/kumoai-reference/SKILL.md +++ b/agent-skills/skills/kumoai-reference/SKILL.md @@ -92,6 +92,11 @@ Before returning code: exclusions. - If the active host adapter restricts a semantic type, confirm the generated code includes the adapter's runtime type guard before `graph.snapshot()`. +- For a temporal task, the notebook runs the sampled-history check from + `kumoai-reference/references/troubleshooting_signals.md` §2 (*far more events than the model + samples*) before `graph.snapshot()`, read-only, through the host's own SQL session + (`kumoai-reference/references/kumo_finetuning_sdk.md` §3.3), never the Kumo connector, and + prints each table, the number kept and the count. It reports; it never filters or aggregates. - Confirm that the output table in the generated code matches the output location from the original request. - Check against known error patterns in `kumoai-reference/references/troubleshooting_signals.md`. diff --git a/agent-skills/skills/kumoai-reference/references/troubleshooting_signals.md b/agent-skills/skills/kumoai-reference/references/troubleshooting_signals.md index a57911a67..edd40cec1 100644 --- a/agent-skills/skills/kumoai-reference/references/troubleshooting_signals.md +++ b/agent-skills/skills/kumoai-reference/references/troubleshooting_signals.md @@ -154,6 +154,29 @@ transaction = kumo.Table.from_source_table( ``` Entity tables may use the entity creation time. Tables with no meaningful timeline can remain without a time column — that is legal. Do **not** designate an administrative "last modified" timestamp unless it represents when the row became valid for modeling. +### Symptom: some entities have far more events than the model samples +**Cause:** Training samples a fixed number of neighbours per entity per hop and keeps the **most +recent** ones before the anchor (`temporal_strategy='last'`). An entity with more linked rows +than that has its older history cut off, silently. On the edge from the entity to the target's +table, hop 1 keeps `ceil(sqrt(ceil(target rows / entity rows)) * 8)` rows, held between 64 and +512; every other edge keeps the run mode's per-hop default (8 `DEBUG`, 12 `FAST`, 16 `NORMAL`, 24 +`BEST`). +**Check (read-only, before training):** for each table with a time column that links directly to +the entity table, count the entities whose rows in it exceed that number, and the largest count: + +```sql +SELECT COUNT(*) AS ENTITIES_OVER, MAX(N) AS MOST_ROWS +FROM (SELECT , COUNT(*) AS N FROM .. GROUP BY ) WHERE N > ; +``` + +The count is over all history, so it bounds the entities cut off at any one anchor. +**Fix (the user's, upstream):** a nonzero count goes to the user with the table, the number kept +and the count: those entities are modelled on their most recent rows only. Very dense events +(clicks, readings) can be rolled up in the source, for example daily. The agent never aggregates +or samples them itself. +Source: shipped package (`kumo_core.automl.target_fanout`, `kumo_core.model_plan`, +`kumo_core.training.config`) + ### Symptom: the user supplies pre-aggregated features (`logins_last_30_days`, etc.) **Cause:** Aggregating before ingestion removes the sequence/relationship information the GNN learns from. Kumo reports aggregated features can perform **5–10% worse** than an equivalent GBDT model, while raw data performs better. **Fix:** Ask for the raw timestamped event table instead. Do not do feature engineering on Kumo's behalf.