Files
myWiki/concepts/harness-engineering.md
2026-06-01 10:46:01 +08:00

50 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Harness Engineering"
created: 2026-05-29
updated: 2026-05-29
type: concept
tags: ["agent", "engineering", "constraint", "LLM"]
sources: ["https://mp.weixin.qq.com/s/PglkqhlSoI7LEOb3AOHl8g"]
---
# Harness Engineering
**Harness Engineering** 是随着 [[autoharness|AutoHarness]] 等工作而兴起的一门新兴工程实践学科:系统性地为 LLM Agent 构建约束层harness使其在结构化环境中产生可靠、合法的行为。
## 学科定位
传统 AI 工程关注 Model 的训练与部署。Harness Engineering 关注的则是 Model **外部**的结构:
- 合法性验证回路
- 反馈收集与聚合
- 代码自合成与迭代
- 约束的搜索与优化
## 核心实践
1. **约束即代码**Harness 以可执行代码形式表达(可验证、可迭代)
2. **搜索驱动合成**:通过 [[thompson-sampling-code-search|Thompson 采样]] 在 harness 空间中搜索
3. **Refiner-Critic 环**LLM 生成改进 → 环境反馈 → 迭代优化
4. **层级递进**:从 Verifier轻约束→ Filter → Policy强约束
## 与 Model Engineering 的分工
| 维度 | Model Engineering | Harness Engineering |
|------|-------------------|---------------------|
| 优化对象 | 神经网络参数 | 可执行代码 |
| 反馈来源 | 梯度信号 | 环境交互 |
| 可解释性 | 低 | 高(可读代码) |
| 部署成本 | 高昂 | 零(纯代码) |
## 未来方向
- 可复用 Harness 组件库
- 跨游戏的约束知识迁移
- 从"代码约束"扩展到"行为准则约束"
- 与 [[heuristic-learning|Heuristic Learning]] 融合
## 相关
- [[model-harness-relationship]] — Model-Harness 关系
- [[autoharness]] — 核心方法
- [[compiled-ai-paradigm]] — 编译型 AI