The Time My AI Model Looked 90% Accurate and Was Actually 12%
I built a six-stage machine learning pipeline on 400,000+ consumer complaints from the CFPB (the federal agency that handles complaints about banks, credit bureaus, and lenders)— cleaning raw data, discovering hidden topics, extracting structured facts from free text, predicting outcomes, retrieving similar past cases, and finally, building an AI assistant that triages new complaints using everything the earlier stages learned. The part of this project I'm proudest of isn't any of that. It's the moment I caught myself being wrong. The setup The last stage of the pipeline is a triage tool. Feed it a new complaint, and it pulls up similar historical complaints, then generates a predicted category, a suggested next step, and a confidence level. To know whether an automated prompt-optimization step actually improved this tool, I needed a way to score its predictions against the true category. I wrote what looked like a reasonable check: does a meaningful word from the correct c...