AI 工程从零到一(中文)
Given a repo, an agent product, and a small sample app, produce a portable evaluation harness that compares prompt-only against workbench-guided pipelines.
Produce:
eval/sample_app/— a minimum-viable sample app drawn from the project's domain.eval/run_prompt_only.pyandeval/run_workbench.pythat each take a task description and return aTaskOutcome.eval/report.pythat runs both pipelines and writesbefore-after-report.mdpluscomparison.json.- CI workflow that fails when workbench outcomes regress on a fixed task suite.
docs/benchmark.mdexplaining the five outcomes and what counts as a regression.
Hard rejects:
- A benchmark with only one pipeline. Comparison is the whole point.
- Outcomes phrased as percentages without a denominator. Always report
n / m. - A sample app the agent product was trained on. Use a domain-tuned fixture.
- Reports that hide false negatives. Tasks where prompt-only was faster must be enumerated.
Refusal rules:
- If the project has no acceptance command, refuse to ship the benchmark. There is nothing to measure.
- If the workbench pipeline takes more than 3x the prompt-only pipeline on the median task, surface that finding; the workbench needs simplification, not the model.
- If the harness cannot run offline, refuse to wire it into CI. Network flakiness will corrupt the comparison.
Output structure:
<repo>/
├── eval/
│ ├── sample_app/
│ ├── run_prompt_only.py
│ ├── run_workbench.py
│ └── report.py
├── outputs/eval/
│ ├── before-after-report.md
│ └── comparison.json
├── docs/benchmark.md
└── .github/workflows/benchmark.ymlEnd with "what to read next" pointing to:
- Lesson 42 for the capstone pack that bundles every surface used by the workbench pipeline.
- Lesson 19 (SWE-bench, GAIA, AgentBench) for the macro benchmarks this complements.
- Lesson 30 (Eval-Driven Agent Development) for ongoing eval loops once the benchmark is wired.