Train and deploy ML models with Claude and Slack approval
What this workflow does This workflow automates the full machine learning lifecycle end-to-end using Claude AI as the intelligent decision-maker at every stage. Send one HTTP request with a dataset URL and a business ...
Template notes
What this workflow does
This workflow automates the full machine learning lifecycle end-to-end using Claude AI as the intelligent decision-maker at every stage. Send one HTTP request with a dataset URL and a business goal — and the pipeline handles everything from raw CSV to a human-approved, documented model ready for GitHub.
The pipeline runs in 5 sequential phases:
Phase 1 — Strategy Claude Sonnet 4 receives the dataset URL, target variable, and business goal. It outputs a structured JSON plan covering feature ideas, algorithm choices, and the evaluation metric. A fallback parser ensures the pipeline continues even if the LLM output is slightly malformed.
Phase 2 — Data Engineering The workflow fetches the CSV via HTTP Request and runs it through a custom quoted-field CSV parser (handles commas inside quoted name fields, common in datasets like Titanic). It drops rows with missing targets, imputes missing Age values, and encodes categorical columns (Sex, Embarked) into numeric form.
Phase 3 — Feature Engineering Claude Haiku reviews the cleaned dataset and confirms the 3 best features to engineer. A Code node then creates FamilySize (SibSp + Parch + 1), IsAlone (binary flag), and TitleEncoded (extracted and mapped from passenger name). A row-count validation gate ensures no data is silently lost.
Phase 4 — Training & Evaluation Three algorithms are trained from scratch in pure JavaScript — no external ML libraries required: - Logistic Regression via gradient descent (200 epochs) - Random Forest via 10 bagged decision stumps - XGBoost via gradient boosting with residual-based stump selection
Precision, recall, F1, and accuracy are computed for each. Claude Sonnet then acts as an LLM judge: it reads all three result sets alongside the original business goal and selects the winner with a one-sentence justification. A deterministic fallback (highest F1) runs if the LLM response fails to parse.