AI Team Gets Loan Model to 84% Accuracy, Then Gets Stuck on Approval-Rate Gap Between Unmarried and Married Applicants
Karan used Google ADK and Gemini to build an automated ML team. The Analyst, Engineer, and Skeptic challenge one another's work, the Harness scores independently, and humans appear only for feature review and launch. In one experiment, logistic regression cut loss from 641 to 378, but the fairness gap kept it from launching on its own.
Karan Shingde built an automated ML team with Google ADK and Gemini. The project runs on Google Cloud, with a video demo and a public GitHub repo. First, here's how it works.
The team has four roles. The Analyst looks at the data first and finds what drives the outcome. The Engineer builds features and trains models. The Skeptic looks for leakage, unfair features, and weak models. You are the fourth role: you approve features and decide what goes live. The project also includes a Chat Analyst that answers questions about the data, models, and production traffic, with tables and charts in its answers.
The key design is in the harness. Agents don't read CSVs directly and guess conclusions. They write Python, run code, and make judgments from the output. The harness handles four things: gives agents tools and limits permissions, checks every handoff, scores models independently, and runs agent code in isolated processes. One rule runs through the whole system: no agent scores its own model. Models are retrained by the harness and scored on the same batch of unseen test applications.
Loan approval example. The training set has 614 historical applications; the test set has 367 simulated production applications. The cost of a wrong approval is twice that of a wrong rejection. Models are ranked by loss per thousand applications. Logistic regression has 84% accuracy and loss 378. XGBoost is 388, random forest 447. Approving everyone has a loss of 641. The launch candidate model saves 41% versus approving everyone.
In the feature stage, the Skeptic flags Gender and Married; the lender has no fair reason to use them. Karan keeps two fix suggestions and has the Engineer remove them. In the model stage, the Skeptic says the work is 'Sound' but points out that the approval rate is 64% for unmarried applicants and 80% for married applicants, below the 0.8 fairness threshold. The harness requires a human decision. Karan knows about the gap and still launches logistic regression as v1. This is a demo on a public dataset, not a real lending model. A real lender should fix the gap first.
Human in the loop has two default gates: feature review and launch decision. The Skeptic reviews once at each stage, and incomplete work is sent back once. A model with a fairness warning does not launch on its own. Every decision records who made it.
Versioning and deployment. The feature store, model registry, and the whole pipeline are versioned. The launched model is served via /predict, and rollback is one click. The next run continues from the previous run's code and feedback. On GCP, Agent Runtime hosts the backend, Cloud Run runs the console, Cloud Storage stores run records, models, and features, Terraform and GitHub Actions handle deployment, and Cloud Trace and BigQuery are used for tracing and prompt responses.
Cost control. One run used 50 tool calls and 328k Gemini 3.5 tokens, 54% of them from cache. In this run, every agent ran Gemini 3.5 Flash. Agent work time was 15.7 minutes; the whole run was 27.7 minutes, with waiting for human review in between. Three practices reduce cost: front-load the briefing to reduce back-and-forth; compress old outputs in long conversations into one-line summaries; use prompt caching for each agent's fixed instructions. The biggest cost is conversation history, not prompts.
A few lessons from Karan: pipeline demos look better because they take decisions out of the agent's hands. Don't let an agent report its own score. Set limits and stopping rules for the Skeptic. Handle credentials early. Agent Runtime request limits affect console communication, and shared storage forces a single server. This pattern is not limited to ML teams; it also works for an SRE team: one agent proposes a fix, another agent proves the fix is problematic, and a human approves the production change.
Project code: https://github.com/kmeanskaran/auto-ml-adk/
Agents CLI quickstart: https://google.github.io/agents-cli/guide/quickstart-tutorial/
ADK docs: https://adk.dev/get-started/python/
Original tweet: https://x.com/kmeanskaran/status/2119817320810057827
The original is official collaboration content between Karan and Google Cloud.
发布时间: 2026-11-10 01:30