diff --git a/agent-skills/skills/kumo-data-science/SKILL.md b/agent-skills/skills/kumo-data-science/SKILL.md index 0668c6cf5..781b5126d 100644 --- a/agent-skills/skills/kumo-data-science/SKILL.md +++ b/agent-skills/skills/kumo-data-science/SKILL.md @@ -264,6 +264,16 @@ say that instead. The approval covers the confirmed population name only: the no as `POPULATION_CONFIRMED` and stops before staging if the name it would replace differs (`kumoai-reference/references/kumo_finetuning_sdk.md` §7.1). +**Check every value the user's words put in a condition against its column's type.** Take the +type from the catalog (preflight). A number compared with a text column (`= 1` on a TEXT +column), a quoted value compared with a numeric one (`= '5'`), a quoted date, or a word compared +with a boolean is a type mismatch between the request and the data, not a formatting detail: as +written the query is refused or matches nothing (`kumoai-reference/references/pql_writing.md`, +*Gotchas* 14). Never re-quote or cast the value silently. Put it on its own line in the +restatement — `Type mismatch: . is ; the request compares it with + ()` — with the two fixes: rewrite the value in the column's type (`'1'`, +`5`), or change the column's type in the source. Say which one the Outcome line uses, and ask. + | Condition | Transition | |---|---| | User confirms | ACCEPT — proceed to Step 2 | diff --git a/agent-skills/skills/kumoai-reference/references/pql_writing.md b/agent-skills/skills/kumoai-reference/references/pql_writing.md index e2100560d..f0cd31fca 100644 --- a/agent-skills/skills/kumoai-reference/references/pql_writing.md +++ b/agent-skills/skills/kumoai-reference/references/pql_writing.md @@ -432,6 +432,7 @@ Source: shipped package (`kumo_core.model_plan`) 11. **Horizon vs. split health:** too large a window leaves fewer than 3 anchor times; too small a window on a long history generates too many examples (mitigate with `train_start_offset` on the `TrainingTableGenerationPlan` passed to `generate_training_table(snapshot, plan=...)`; the model plan has no such field) and, for link prediction, too few positives. 12. **Always validate before generating tables:** `pquery.validate()` for syntax, `pquery.get_task_type()` for semantics. Required — see "Required pre-flight" under SDK usage. 13. **Inline `WHERE` vs trailing `WHERE` are not interchangeable.** A row-level condition on the predicted event goes inside the aggregation; an entity-eligibility condition goes in the trailing `WHERE`. Swapping them produces a query that validates and trains on the wrong question. +14. **A constant must have its column's type.** Kumo converts nothing: `int_col = '5'` and `text_col = 1` are both refused with a `Type Mismatch` error, `Expression has type but constant has type .`, plus `Did you forget to add quotes?` when the column is text (`kumopql.validator.type_validator`). A value that matches the declared type but not the stored one (`'1'` when the column holds `'1.0'` or `'yes'`) passes and selects nothing. When the user's value and the column's type disagree, that is the user's to decide (`kumo-data-science/SKILL.md` Node 1d): rewrite the value in the column's type, or change the column's type in the source. Do not settle it by editing the query on your own. ---