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,55 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 760 570" width="760" height="570" style="background:#ffffff">
|
||||
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
|
||||
<text x="40" y="78" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">① 「怎麼樣」對前文每個詞的注意力權重</text>
|
||||
<rect x="60" y="96" width="150" height="66" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
|
||||
<text x="135.0" y="118" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">北京</text>
|
||||
<text x="135.0" y="143" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Key · 權重 0.35</text>
|
||||
<rect x="228" y="96" width="150" height="66" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
|
||||
<text x="303.0" y="118" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">的</text>
|
||||
<text x="303.0" y="143" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Key · 權重 0.05</text>
|
||||
<rect x="396" y="96" width="150" height="66" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
|
||||
<text x="471.0" y="118" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">天氣</text>
|
||||
<text x="471.0" y="143" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Key · 權重 0.55</text>
|
||||
<rect x="564" y="96" width="150" height="66" rx="6" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
|
||||
<text x="639.0" y="118" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="20" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">怎麼樣</text>
|
||||
<text x="639.0" y="143" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Query(當前)</text>
|
||||
<text x="380" y="192" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Query 與各 Key 打分 → 歸一化為權重 → 對 Value 加權求和(重點參考「天氣」)</text>
|
||||
<text x="40" y="244" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="start" dominant-baseline="central" font-weight="bold">② 注意力熱力圖:每個詞只能看自己與前文(因果三角)</text>
|
||||
<text x="176" y="284" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="end" dominant-baseline="central" font-weight="normal">Key →</text>
|
||||
<text x="232.0" y="284" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">北京</text>
|
||||
<text x="296.0" y="284" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">的</text>
|
||||
<text x="360.0" y="284" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">天氣</text>
|
||||
<text x="424.0" y="284" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">怎麼樣</text>
|
||||
<text x="110" y="428" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">Query ↓</text>
|
||||
<text x="176" y="332.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="end" dominant-baseline="central" font-weight="normal">北京</text>
|
||||
<rect x="200" y="300" width="64" height="64" fill="#555555" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="232.0" y="332.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#ffffff" text-anchor="middle" dominant-baseline="central">1.00</text>
|
||||
<rect x="264" y="300" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<rect x="328" y="300" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<rect x="392" y="300" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<text x="176" y="396.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="end" dominant-baseline="central" font-weight="normal">的</text>
|
||||
<rect x="200" y="364" width="64" height="64" fill="#b0b0b0" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="232.0" y="396.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.30</text>
|
||||
<rect x="264" y="364" width="64" height="64" fill="#555555" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="296.0" y="396.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#ffffff" text-anchor="middle" dominant-baseline="central">0.70</text>
|
||||
<rect x="328" y="364" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<rect x="392" y="364" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<text x="176" y="460.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="end" dominant-baseline="central" font-weight="normal">天氣</text>
|
||||
<rect x="200" y="428" width="64" height="64" fill="#b0b0b0" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="232.0" y="460.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.20</text>
|
||||
<rect x="264" y="428" width="64" height="64" fill="#dcdcdc" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="296.0" y="460.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.10</text>
|
||||
<rect x="328" y="428" width="64" height="64" fill="#555555" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="360.0" y="460.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#ffffff" text-anchor="middle" dominant-baseline="central">0.70</text>
|
||||
<rect x="392" y="428" width="64" height="64" fill="#ffffff" stroke="#e0e0e0" stroke-width="1"/>
|
||||
<text x="176" y="524.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="end" dominant-baseline="central" font-weight="normal">怎麼樣</text>
|
||||
<rect x="200" y="492" width="64" height="64" fill="#b0b0b0" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="232.0" y="524.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.35</text>
|
||||
<rect x="264" y="492" width="64" height="64" fill="#dcdcdc" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="296.0" y="524.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.05</text>
|
||||
<rect x="328" y="492" width="64" height="64" fill="#888888" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="360.0" y="524.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#ffffff" text-anchor="middle" dominant-baseline="central">0.55</text>
|
||||
<rect x="392" y="492" width="64" height="64" fill="#dcdcdc" stroke="#ffffff" stroke-width="2"/>
|
||||
<text x="424.0" y="524.0" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#333333" text-anchor="middle" dominant-baseline="central">0.05</text>
|
||||
<text x="380" y="586" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">格子越深 = 注意力越集中;上三角為空 = 不能看到還沒生成的詞</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.7 KiB |
Reference in New Issue
Block a user