ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,462 @@
|
||||
{
|
||||
"experiment_id": "2-4",
|
||||
"created_at": "2026-07-30T12:26:22.987790+08:00",
|
||||
"protocol_sha256": "ec1ec36d5a6ee21b5185295a7a4447f4e0173f1681a9fe471b240dda1e7cf32a",
|
||||
"protocol_copy": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/experiment_protocol.json",
|
||||
"provider": "openai",
|
||||
"model": "kimi-k3",
|
||||
"user_model": "kimi-k3",
|
||||
"objective_scoring": "vendored tau-bench environment reward",
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-baseline_0730121451.json",
|
||||
"sha256": "ff5388e01597814644bb329caab1837fd44779555ceed84ed28c161b575ad056"
|
||||
},
|
||||
"rewards": [
|
||||
0.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 70.0,
|
||||
"total": 10,
|
||||
"successes": 7,
|
||||
"failures": 3,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
14,
|
||||
10,
|
||||
30,
|
||||
18,
|
||||
15,
|
||||
14,
|
||||
11,
|
||||
14,
|
||||
16,
|
||||
24
|
||||
],
|
||||
"tool_calls": [
|
||||
6,
|
||||
5,
|
||||
28,
|
||||
14,
|
||||
12,
|
||||
11,
|
||||
7,
|
||||
11,
|
||||
12,
|
||||
17
|
||||
],
|
||||
"tool_errors": [
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 221,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1599454,
|
||||
"completion_tokens": 88017,
|
||||
"total_tokens": 1687471
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 40.79078,
|
||||
"arm_complete": true
|
||||
},
|
||||
"tone_trump": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_trump_0730121452.json",
|
||||
"sha256": "4450b537f8b2d41178f71c6aaaec6ae5ac3feac7bd469f101d0e7699ec3eee51"
|
||||
},
|
||||
"rewards": [
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 60.0,
|
||||
"total": 10,
|
||||
"successes": 6,
|
||||
"failures": 4,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
13,
|
||||
11,
|
||||
16,
|
||||
18,
|
||||
12,
|
||||
15,
|
||||
10,
|
||||
12,
|
||||
14,
|
||||
23
|
||||
],
|
||||
"tool_calls": [
|
||||
7,
|
||||
7,
|
||||
14,
|
||||
14,
|
||||
9,
|
||||
12,
|
||||
6,
|
||||
8,
|
||||
10,
|
||||
17
|
||||
],
|
||||
"tool_errors": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 194,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1425756,
|
||||
"completion_tokens": 94297,
|
||||
"total_tokens": 1520053
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 37.94482,
|
||||
"arm_complete": true
|
||||
},
|
||||
"tone_casual": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_casual_0730121452.json",
|
||||
"sha256": "792a087353695f4ac3e4007d9fa6ffebc7b54c85c1249ca728524e95b292e502"
|
||||
},
|
||||
"rewards": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 90.0,
|
||||
"total": 10,
|
||||
"successes": 9,
|
||||
"failures": 1,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
14,
|
||||
10,
|
||||
16,
|
||||
15,
|
||||
15,
|
||||
14,
|
||||
12,
|
||||
15,
|
||||
16,
|
||||
19
|
||||
],
|
||||
"tool_calls": [
|
||||
9,
|
||||
5,
|
||||
13,
|
||||
11,
|
||||
11,
|
||||
11,
|
||||
8,
|
||||
9,
|
||||
13,
|
||||
12
|
||||
],
|
||||
"tool_errors": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 200,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1435720,
|
||||
"completion_tokens": 93507,
|
||||
"total_tokens": 1529227
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 38.0651,
|
||||
"arm_complete": true
|
||||
},
|
||||
"wiki_random": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-wiki_random_0730121452.json",
|
||||
"sha256": "b071977829c53deeb1b03ae01017ad2341f247c1028781dfd1d5a4d3de2936a6"
|
||||
},
|
||||
"rewards": [
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 80.0,
|
||||
"total": 10,
|
||||
"successes": 8,
|
||||
"failures": 2,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
14,
|
||||
9,
|
||||
14,
|
||||
15,
|
||||
13,
|
||||
10,
|
||||
14,
|
||||
30,
|
||||
15,
|
||||
23
|
||||
],
|
||||
"tool_calls": [
|
||||
7,
|
||||
5,
|
||||
10,
|
||||
13,
|
||||
10,
|
||||
7,
|
||||
10,
|
||||
28,
|
||||
11,
|
||||
15
|
||||
],
|
||||
"tool_errors": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 209,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1446738,
|
||||
"completion_tokens": 89732,
|
||||
"total_tokens": 1536470
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 37.90796,
|
||||
"arm_complete": true
|
||||
},
|
||||
"no_tool_desc": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-no_tool_desc_0730121452.json",
|
||||
"sha256": "dfc27bdabf2d15c82f244d82f4a25b40349692b8d6fa66fd6acd9560a9731e4b"
|
||||
},
|
||||
"rewards": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 90.0,
|
||||
"total": 10,
|
||||
"successes": 9,
|
||||
"failures": 1,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
14,
|
||||
9,
|
||||
15,
|
||||
12,
|
||||
15,
|
||||
11,
|
||||
13,
|
||||
13,
|
||||
17,
|
||||
18
|
||||
],
|
||||
"tool_calls": [
|
||||
9,
|
||||
5,
|
||||
11,
|
||||
9,
|
||||
12,
|
||||
7,
|
||||
10,
|
||||
8,
|
||||
14,
|
||||
12
|
||||
],
|
||||
"tool_errors": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 187,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1171788,
|
||||
"completion_tokens": 93672,
|
||||
"total_tokens": 1265460
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 32.80296,
|
||||
"arm_complete": true
|
||||
},
|
||||
"all_ablations": {
|
||||
"artifact": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_casual_wiki_random_no_tool_desc_0730122622.json",
|
||||
"sha256": "94e7428c6589171096f24cb0d16de10df2c4af0b5e73a559e9df8003d6100dce"
|
||||
},
|
||||
"rewards": [
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
1.0,
|
||||
0.0
|
||||
],
|
||||
"success_rate": 80.0,
|
||||
"total": 10,
|
||||
"successes": 8,
|
||||
"failures": 2,
|
||||
"tasks_completed": 10,
|
||||
"expected_tasks": 10,
|
||||
"task_errors": [],
|
||||
"agent_steps": [
|
||||
13,
|
||||
10,
|
||||
16,
|
||||
16,
|
||||
9,
|
||||
12,
|
||||
15,
|
||||
12,
|
||||
15,
|
||||
21
|
||||
],
|
||||
"tool_calls": [
|
||||
7,
|
||||
5,
|
||||
13,
|
||||
12,
|
||||
8,
|
||||
6,
|
||||
10,
|
||||
8,
|
||||
10,
|
||||
14
|
||||
],
|
||||
"tool_errors": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
],
|
||||
"real_api_calls": 196,
|
||||
"response_ids_present": true,
|
||||
"usage": {
|
||||
"prompt_tokens": 1247279,
|
||||
"completion_tokens": 97489,
|
||||
"total_tokens": 1344768
|
||||
},
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 34.69448,
|
||||
"arm_complete": true
|
||||
}
|
||||
},
|
||||
"credential_scan_passed": true,
|
||||
"credential_findings": [],
|
||||
"usage_and_cost": {
|
||||
"total_real_api_calls": 1207,
|
||||
"prompt_tokens": 8326735,
|
||||
"completion_tokens": 556714,
|
||||
"total_tokens": 8883449,
|
||||
"observed_litellm_cost_usd": 0,
|
||||
"all_calls_priced": false,
|
||||
"native_cost_cny": 222.2061,
|
||||
"native_cost_complete": true,
|
||||
"qualification": "Prompt cache detail is unavailable in these responses, so every prompt token is conservatively priced as uncached."
|
||||
},
|
||||
"campaign_complete": true,
|
||||
"hypothesis_results": {
|
||||
"historical_percentages_reproduced": false,
|
||||
"qualification": "Current fixed ten-task campaign only; compare arm metrics directly."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"experiment_id": "2-4",
|
||||
"protocol_version": "1.0.0",
|
||||
"frozen_on": "2026-07-30",
|
||||
"authority": "book/chapter2.md:654",
|
||||
"benchmark": "vendored tau-bench airline test split",
|
||||
"provider": "Moonshot official OpenAI-compatible endpoint",
|
||||
"model": "kimi-k3",
|
||||
"user_model": "kimi-k3",
|
||||
"temperature": 1,
|
||||
"user_temperature": 1,
|
||||
"seed": 20260730,
|
||||
"task_ids": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
||||
"trials_per_task": 1,
|
||||
"max_agent_steps": 30,
|
||||
"arms": {
|
||||
"baseline": {
|
||||
"tone": "professional neutral",
|
||||
"wiki": "original structured rules",
|
||||
"tool_descriptions": "complete"
|
||||
},
|
||||
"tone_trump": {
|
||||
"tone": "exaggerated Trump-style",
|
||||
"wiki": "original structured rules",
|
||||
"tool_descriptions": "complete"
|
||||
},
|
||||
"tone_casual": {
|
||||
"tone": "casual with emoji/slang",
|
||||
"wiki": "original structured rules",
|
||||
"tool_descriptions": "complete"
|
||||
},
|
||||
"wiki_random": {
|
||||
"tone": "professional neutral",
|
||||
"wiki": "same rules flattened and pre-shuffled",
|
||||
"tool_descriptions": "complete"
|
||||
},
|
||||
"no_tool_desc": {
|
||||
"tone": "professional neutral",
|
||||
"wiki": "original structured rules",
|
||||
"tool_descriptions": "all description fields blank"
|
||||
},
|
||||
"all_ablations": {
|
||||
"tone": "casual with emoji/slang",
|
||||
"wiki": "same rules flattened and pre-shuffled",
|
||||
"tool_descriptions": "all description fields blank"
|
||||
}
|
||||
},
|
||||
"metrics": [
|
||||
"tau-bench objective reward/pass rate",
|
||||
"agent steps and model calls",
|
||||
"tool calls and environment tool errors",
|
||||
"provider prompt/completion/total tokens",
|
||||
"provider response IDs",
|
||||
"LiteLLM native cost estimate"
|
||||
],
|
||||
"acceptance_gates": [
|
||||
"all six arms run the same ten task IDs with the same seed and user simulator",
|
||||
"each task is scored only by the vendored tau-bench objective environment",
|
||||
"every agent and simulated-user model call is a real provider response with ID and usage",
|
||||
"raw request messages, tools, response content/tool calls, usage, timings, and trajectories are retained",
|
||||
"the randomized wiki contains the same experimental rule material in the frozen pre-generated order",
|
||||
"the no-description arm preserves schemas while blanking every nested description",
|
||||
"campaign completion is independent of whether the manuscript hypotheses win",
|
||||
"historical percentage claims are not treated as reproduced unless this fixed campaign independently yields them",
|
||||
"credential scan passes"
|
||||
],
|
||||
"hypotheses": {
|
||||
"tone": "tone variants have limited effect on objective task success",
|
||||
"organization": "randomizing instruction organization reduces success",
|
||||
"tool_descriptions": "removing descriptions increases tool errors and reduces success"
|
||||
},
|
||||
"transport_amendment": {
|
||||
"amended_on": "2026-07-30",
|
||||
"reason": "The OpenAI-direct credential returned insufficient_quota and the OpenRouter credential returned User not found before any model response or task observation was obtained.",
|
||||
"change": "Use the available official Moonshot endpoint and kimi-k3 for both action model and user simulator.",
|
||||
"unchanged": [
|
||||
"tasks",
|
||||
"arms",
|
||||
"temperature",
|
||||
"seed",
|
||||
"step limit",
|
||||
"objective gates and hypotheses"
|
||||
],
|
||||
"failed_campaign": "runs/exp2-4-gpt-4o-mini-20260730-v1",
|
||||
"methodological_note": "This is an availability amendment, not a response-conditioned change: both rejected transports produced zero successful model calls and therefore exposed no task outcomes."
|
||||
},
|
||||
"pricing": {
|
||||
"currency": "CNY",
|
||||
"uncached_input_per_million_tokens": 20,
|
||||
"cached_input_per_million_tokens": 2,
|
||||
"output_per_million_tokens": 100,
|
||||
"qualification": "Prompt cache detail is unavailable in these responses, so every prompt token is conservatively priced as uncached."
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"experiment_id": "2-4",
|
||||
"campaign_complete": true,
|
||||
"protocol_sha256": "ec1ec36d5a6ee21b5185295a7a4447f4e0173f1681a9fe471b240dda1e7cf32a",
|
||||
"summary_path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/comparison.json",
|
||||
"summary_sha256": "64d4218ce721bd51c58fce4314ffc62fa8e8fd66975b5b4be54051a64be8a63a",
|
||||
"arm_artifacts": {
|
||||
"baseline": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-baseline_0730121451.json",
|
||||
"sha256": "ff5388e01597814644bb329caab1837fd44779555ceed84ed28c161b575ad056"
|
||||
},
|
||||
"tone_trump": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_trump_0730121452.json",
|
||||
"sha256": "4450b537f8b2d41178f71c6aaaec6ae5ac3feac7bd469f101d0e7699ec3eee51"
|
||||
},
|
||||
"tone_casual": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_casual_0730121452.json",
|
||||
"sha256": "792a087353695f4ac3e4007d9fa6ffebc7b54c85c1249ca728524e95b292e502"
|
||||
},
|
||||
"wiki_random": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-wiki_random_0730121452.json",
|
||||
"sha256": "b071977829c53deeb1b03ae01017ad2341f247c1028781dfd1d5a4d3de2936a6"
|
||||
},
|
||||
"no_tool_desc": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-no_tool_desc_0730121452.json",
|
||||
"sha256": "dfc27bdabf2d15c82f244d82f4a25b40349692b8d6fa66fd6acd9560a9731e4b"
|
||||
},
|
||||
"all_ablations": {
|
||||
"path": "/Users/boj/book/ai-agent-book/chapter2/prompt-engineering/runs/exp2-4-kimi-k3-20260730-v7/tool-calling-kimi-k3-tone_casual_wiki_random_no_tool_desc_0730122622.json",
|
||||
"sha256": "94e7428c6589171096f24cb0d16de10df2c4af0b5e73a559e9df8003d6100dce"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user