NVIDIA 工程实践分析:LLM Agent 辅助 Kaggle 竞赛夺冠

MiaoDX

NVIDIA 工程实践分析:LLM Agent 辅助 Kaggle 竞赛夺冠

来源: Winning a Kaggle Competition with Generative AI–Assisted Coding (NVIDIA Developer Blog, 2026-04-23) 作者: Chris Deotte (NVIDIA Senior Data Scientist, Kaggle 4x Grandmaster) 分析: WLB + GSD(协作模式) 分析日期: 2026-04-27


一句话总结

NVIDIA 的 Kaggle 4x Grandmaster 用 3 个 LLM Agent(GPT-5.4 Pro / Gemini 3.1 Pro / Claude Opus 4.6)在 2026 年 3 月的 Kaggle Playground 竞赛中夺冠,核心洞察:Agent 不是替代人类思考,而是把"实验迭代速度"提升 10x——600,000 行代码、850 个实验、150 个模型的四级 stacking,全部在 human-in-the-loop 模式下完成。


1. 竞赛背景与成绩

1.1 Kaggle Playground S6E3:电信客户流失预测

指标数据
竞赛类型Tabular Data Classification(AUC 评分)
参赛时间2026 年 3 月
最终方案四级 stacking,150 个模型
实验总量850 个
代码总量600,000+ 行
使用的 AgentGPT-5.4 Pro, Gemini 3.1 Pro, Claude Opus 4.6
协作模式Human-in-the-loop(人类指导方向,Agent 执行)

1.2 四级 Stacking 架构

Level 1: Feature Extraction(特征提取层)

Level 2: Pattern Extraction(模式提取层)

Level 3: Pattern Extraction(第二层模式提取)

Level 4: Target Prediction(最终预测层)

150 个模型从 850 个实验中筛选出来,每一层都经过严格的 cross-validation 验证。


2. 四步 Agent 工作流

2.1 Step 1: EDA(探索性数据分析)

Agent 首先需要理解数据结构:

关键问题Agent 能力
训练/测试集行列数自动读取 CSV 并统计
目标列格式识别分类/回归任务
特征类型自动区分 categorical / numeric
缺失数据检测并建议处理策略

Prompt 示例(聊天模式):

"Please write EDA code to explore the CSV file train.csv and test.csv. I will run the code and share the plots and text back with you."

Prompt 示例(Claude Code 模式):

"Please write and run EDA code to understand the CSV files train.csv and test.csv"

2.2 Step 2: Baseline 构建

一旦 Agent 理解数据结构,立即构建第一个完整 pipeline:

Prompt 示例

"Please write full code pipeline to read train.csv and test.csv and train a kfold XGBoost model. Save the OOF (out of fold predictions) and the Test PREDS to disk as Numpy files. Display the metric score each fold and overall."

关键约定

  • 所有实验保存 train_oof_[MODEL]_[VERSION].npy
  • 所有实验保存 test_preds_[MODEL]_[VERSION].npy
  • 这些文件是后续 stacking 的"原材料"

2.3 Step 3: Feature Engineering(特征工程)

这是 Agent 价值最大的环节——快速迭代实验

优化方向Agent 能力
特征变换自动尝试 polynomial、interaction、binning
模型调参Grid search、Bayesian optimization
新想法生成读论文、读论坛、做 EDA、brainstorm

加速策略

  • 始终使用 GPU 加速(cuDF、cuML、XGBoost GPU、PyTorch GPU)
  • 每个实验无论好坏都保存结果
  • 迭代式改进:从 baseline 出发,逐步叠加优化

Prompt 示例(替换式改进):

"Please write me a complete replacement code for the code below that uses XYZ instead of ABC"

2.4 Step 4: Model Combination(模型组合)

当积累了数百个实验结果后,Agent 帮助:

任务技术
汇总所有实验读取所有 IPYNB,生成性能报告
融合多个想法用所有好 idea 训练一个更强的单模型
知识蒸馏用 OOF 和 test predictions 作为 pseudo-labels
Hill Climbing贪心选择最优模型子集
Stacking用 meta-model(Ridge/Logistic/NN/GBDT)组合

Prompt 示例(知识蒸馏):

"Can you please train a new single NN or GBDT using knowledge distillation from all our OOF and Test PREDs and make a new high performing single model?"

Prompt 示例(Stacking):

"Can you please try combining all our OOF and Test PREDs using various meta models? Please try Hill Climbing, Ridge/Logistic regression, NN, and GBDT stackers."


3. 核心工程洞察

3.1 两个瓶颈的消除

瓶颈传统解法Agent + GPU 解法
写代码速度人类手写LLM Agent 生成
执行速度CPU 串行GPU 并行(cuDF/cuML/XGBoost GPU)

结果:实验迭代周期从"天"压缩到"小时"甚至"分钟"。

3.2 多 Agent 策略

Chris 使用了 3 个不同厂商的 Agent

Agent优势场景
GPT-5.4 Pro代码生成、复杂逻辑
Gemini 3.1 Pro长上下文、多文件处理
Claude Opus 4.6深度推理、代码执行

不是"选一个最好的",而是"不同任务用不同工具"——这和人类团队的分工逻辑一致。

3.3 Human-in-the-Loop 不是妥协,而是最优策略

文章反复强调的关键点:

"Success in modern machine learning competitions is increasingly defined by how quickly you can generate, test, and iterate on ideas."

Agent 负责:

  • ✅ 代码生成
  • ✅ 实验执行
  • ✅ 结果汇总

人类负责:

  • ✅ 方向判断("这个 feature engineering 方向值得深入吗?")
  • ✅ 质量把关("这个 stacking 策略是否合理?")
  • ✅ 创意输入("我想到一个新 idea,Agent 帮我实现")

4. 与现有 Lab 分析的对比

维度OpenAI Agent EngineeringAnthropic Context EngineeringNVIDIA DynamoNVIDIA Kaggle Agent
核心关注Agent-first 工程流程Context 设计与评估Agentic 推理基础设施Agent 辅助数据科学工作流
Context 管理Progressive DisclosureContext EngineeringKV cache 全局状态实验结果管理(OOF/Test PREDs)
Multi-AgentSkills 路由Orchestrator-Worker跨 worker KV 共享多模型(GPT/Gemini/Claude)协作
人机协作较少涉及较少涉及较少涉及Human-in-the-loop 为核心
开源策略部分开源闭源完全开源方法论开源(博客)

互补性

  • OpenAI → Agent 工程方法论
  • Anthropic → Agent 设计原则
  • NVIDIA Dynamo → Agent 推理基础设施
  • NVIDIA Kaggle → Agent 在实际竞赛中的落地验证

5. 对我们的借鉴

5.1 立即可做

问题现状改进
实验管理混乱每次实验结果散落在不同文件建立统一的 OOF/prediction 保存规范
重复造轮子每次从 scratch 写 EDA用 Agent 生成标准化 EDA pipeline
缺乏 stacking 意识单模型即终点引入 hill climbing / stacking 组合策略
没有实验日志不知道哪些 idea 试过建立实验追踪系统

5.2 工作流层面

1. Agent 不是替代,是放大

  • 核心能力(问题理解、方向判断)仍需要人类
  • Agent 消除的是"执行瓶颈"
  • 最佳模式:人类做 strategy,Agent 做 tactics

2. 多 Agent 策略值得尝试

  • 不同 Agent 有不同优势
  • 不要追求"一个 Agent 做所有事"
  • 关键是人类层面的 orchestration

3. 实验管理将成为新瓶颈

  • 当实验成本趋近于零,"管理 850 个实验"比"跑 850 个实验"更难
  • 需要:版本控制、结果追踪、自动汇总、智能筛选

6. 核心洞察

1. Agent 辅助竞赛是"能力放大器"而非"能力替代器"

Kaggle Grandmaster + Agent > Kaggle Grandmaster alone > Agent alone

人类的专业判断 + Agent 的执行速度 = 前所未有的实验吞吐量。

2. 数据科学工作流正在被重构

传统:人类写代码 → 运行 → 分析结果 → 迭代 新范式:人类定义方向 → Agent 生成代码 → GPU 执行 → 人类判断 → 迭代

关键变化:人类的认知资源从"写代码"释放到"判断和创意"。

3. 实验管理将成为基础设施问题

当 850 个实验可以在几周内完成,如何:

  • 追踪每个实验的参数和结果?
  • 比较不同实验的优劣?
  • 自动发现最优组合?
  • 避免重复实验?

这些问题需要专门的工具支持,不是简单的"用 Agent 写代码"能解决的。

4. NVIDIA 的"生态绑定"策略

文章反复强调 cuDF、cuML、RAPIDS——这不是偶然。NVIDIA 在推广一个完整叙事:

  • Agent 写代码 → GPU 执行 → 赢得竞赛

对用户的实际影响:即使 Agent 是通用的(GPT/Gemini/Claude),执行层如果绑定 NVIDIA 生态,会获得额外速度优势。


原文引用

"In March 2026, three LLM agents generated over 600,000 lines of code, ran 850 experiments, and helped secure a first-place finish in a Kaggle playground competition."

"Success in modern machine learning competitions is increasingly defined by how quickly you can generate, test, and iterate on ideas."

"GPUs and libraries like NVIDIA cuDF, NVIDIA cuML, XGBoost, and PyTorch have largely solved the second problem [execution speed]. LLM agents now address the first problem [code generation]."

"The first-place solution is a four-level stack of 150 models, selected from 850."


联合结论

WLB & GSD 共识

  1. Agent 辅助数据科学已经从"概念验证"进入"生产实践"——Kaggle 竞赛是最佳试金石,这篇博客提供了完整的操作手册。

  2. Human-in-the-loop 不是过渡方案,而是最优方案——至少在需要深度领域判断的任务中,人类的战略价值在 Agent 时代反而提升了。

  3. 实验管理能力将成为新的基础设施需求——当实验成本趋近于零,如何管理、追踪、筛选、组合实验结果,将成为比"跑实验"更难的问题。

  4. 对于 Xiaomi EI 等工程团队,建议在自己的数据分析/建模任务中尝试这个四步工作流,先从"保存所有实验结果"和"标准化 EDA pipeline"两个低 hanging fruit 开始。


数据来源: NVIDIA Developer Blog, 2026-04-23 关联阅读: The Kaggle Grandmasters Playbook


分析模型: WLB — anthropic_kimi/k2.6 | GSD — anthropic_kimi/k2.6分析时间: 2026-04-27 11:30 (Asia/Shanghai)

M
MiaoDX × AI Agents
机器人研发工程师,OPC 实践者 — One Person, plus multi Claws。白天给机器人写 bug,其他时间和 AI Agents 一起做更多的事。