Code Room
Vibe codingHard
Question
An AI addressed class imbalance with SMOTE before the split. Validation recall jumps to 0.95 but real-world recall is mediocre. Identify the two-part mistake.
from imblearn.over_sampling import SMOTEfrom sklearn.model_selection import train_test_split X_res, y_res = SMOTE().fit_resample(X, y) # oversample firstX_tr, X_te, y_tr, y_te = train_test_split(X_res, y_res, test_size=0.2)model.fit(X_tr, y_tr)print(recall_score(y_te, model.predict(X_te))) # 0.95What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it — tests, edge cases, reading critically — and how you’d re-prompt or decompose to get it right.
Learn the concepts
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.
Run or narrate your approach, then ask the coach.