diff --git a/agent-skills/skills/kumo-data-science/SKILL.md b/agent-skills/skills/kumo-data-science/SKILL.md index 0668c6cf5..8274ab277 100644 --- a/agent-skills/skills/kumo-data-science/SKILL.md +++ b/agent-skills/skills/kumo-data-science/SKILL.md @@ -91,7 +91,7 @@ trainer, and `predict` runs against an explicitly rebuilt graph snapshot (see St - Join, clean, deduplicate, aggregate, create labels, or transform data **as model input**. Diagnostic scalar aggregates during preflight — reported as proposal evidence, never written and never fed to training — are not this; they exist so a key can be checked before it silently - discards rows + discards rows, and an interval checked for rows that end before they start - Search for, rank, or curate tables by business relevance - Retry or resume jobs, or keep state across sessions. The one execution the agent performs is Step 3, and only when the user asks. @@ -338,7 +338,8 @@ 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, + mismatched key, an empty training table, or a nonzero count from a read-only check cell such as + rows whose interval ends before it starts — 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 diff --git a/agent-skills/skills/kumo-data-science/accept/preflight.md b/agent-skills/skills/kumo-data-science/accept/preflight.md index abed8b5ba..8e69bbcc6 100644 --- a/agent-skills/skills/kumo-data-science/accept/preflight.md +++ b/agent-skills/skills/kumo-data-science/accept/preflight.md @@ -169,6 +169,21 @@ Decide by semantic role, never by a fixed column-name list. Record every exclusi in the proposal. Where the role is genuinely ambiguous, do not invent one — show the column as an exclusion the user can overturn at the gate, rather than asking the user for column names. +**An interval that ends before it starts.** When a row carries both ends of one interval — its +time column and a later timestamp that closes the same interval (a delivery, resolution, end or +expiry time), decided by semantic role — count the rows whose end precedes their start, whether +or not the end column stays a feature. Kumo accepts such rows without a check. + +```sql +SELECT COUNT(*) AS N, SUM(CASE WHEN < THEN 1 ELSE 0 END) AS N_END_BEFORE_START +FROM ..; +``` + +Report a nonzero count under `Not found` with the table, both columns and the count, and let the +user decide; never correct, filter or drop those rows. When the preflight result in hand did not +run this probe (a host-supplied result that read only key probes), name the pair in the proposal +as not yet counted: the notebook counts it (`kumoai-reference/SKILL.md` Step 4). + ## 6. Links A link is proposed when a column in table A has the **same name** as the primary key of table B @@ -220,6 +235,7 @@ Excluded columns Not found - payments: no primary key inferred [inferred] — treated as keyless; edge source only unless corrected - events: no usable time column [inferred] — a time-ranged target cannot reference this table +- fraud_events: 37 of 120,000 rows have RESOLVED_AT before EVENT_AT [inferred] — reported, not corrected - ... Confirm, or correct any line (your values take precedence). @@ -232,8 +248,9 @@ format. - Prepare, transform, aggregate or materialize **model inputs** — joining, cleaning, deduplicating, creating labels. A diagnostic scalar aggregate over source rows is permitted - solely as evidence for the proposal: row, distinct and null counts for a proposed or candidate key. Its - result is reported and then discarded; it is never written anywhere and never reaches training. + solely as evidence for the proposal: row, distinct and null counts for a proposed or candidate key, + and the count of rows whose interval ends before it starts (§5). Its result is reported and then + discarded; it is never written anywhere and never reaches training. - Rank tables by relevance or drop tables the user did not ask to drop. - Proceed to PQL before the proposal is confirmed. - Ask the user for columns, types, keys or joins — with one exception: when §0 finds you cannot diff --git a/agent-skills/skills/kumoai-reference/SKILL.md b/agent-skills/skills/kumoai-reference/SKILL.md index eed96d801..115f6bc94 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 every interval the graph gate named but preflight did not count + (`kumo-data-science/accept/preflight.md` §5), the notebook counts the rows that end before they + start, read-only, before `graph.snapshot()` — through the host's own SQL session + (`kumoai-reference/references/kumo_finetuning_sdk.md` §3.3), never the Kumo connector — and + prints the table, both columns and the count. It reports; it never filters. - 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`.