P8:/portal/daemon/extract 萃取模型 scout → qwen3-30b(真筆記實測:品質不降、額度天花板翻倍)

免金鑰路短板=Workers AI 免費 10,000 neurons/日。leo 真實筆記 8 篇 × 5 模型實測
(arcrun-rag docs/benchmarks/p8-extractor-quality/,usage.neurons 為 CF 原生計量):
scout 84 n/檔(119 檔/日)→ qwen3-30b 43 n/檔(232 檔/日);格式合規 8/8、
三元組 7.6 條全可解析(scout 5.0)。granite 最便宜但 5/8 缺段=實測否決。
聊天 recipe(workers_ai_chat)不動;只 commit 本 hunk,工作區另有 P7 進行中改動未收。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-08-09 00:40:52 +08:00
parent 466e56bc2d
commit aa6b899276
2 changed files with 22 additions and 3 deletions
+12 -3
View File
@@ -780,9 +780,18 @@ portalRouter.post('/portal/daemon/extract', (c) =>
`## 關聯\n- 實體A ${REL} 關係 ${REL} 實體B3-8 行,用上面實體名)\n\n原稿:\n${srcText}`;
try {
// 模型與 workers_ai_chat recipe 同一支(選型實測見 api-recipe-seeds.ts:140
// llama-4-scout 2373ms/答案最完整;對照 Gemini gemma-4-31b-it 16.87 秒且吐英文草稿)。
const out = (await c.env.AI.run('@cf/meta/llama-4-scout-17b-16e-instruct', {
// 🔴 模型選型(P8 短板齊平,2026-08-09 實測換的)
// 免金鑰路的短板=Workers AI 免費 10,000 neurons/日。用 leo 真實筆記 8 篇
// × 5 模型實測(arcrun-rag docs/benchmarks/p8-extractor-quality/
// usage.neurons 為 CF 回應原生計量):
// llama-4-scout84 n/檔 ⇒ 119 檔/日(t181 選的舊現役,當時只比延遲與完整度)
// qwen3-30b-a3b-fp843 n/檔 ⇒ 232 檔/日,格式合規 8/8、
// 三元組平均 7.6 條全可解析(scout 5.0),品質不降反升
// granite-4.0-h-micro11.7 n/檔(最便宜)但 5/8 缺段、三元組幾乎全滅 ⇒ 否決
// ⇒ 換 qwen3-30b:同額度天花板直接翻倍,品質有據(P8:要換模型就要實測並講清楚)。
// (聊天用的 workers_ai_chat recipe 仍是 scout,選型見 api-recipe-seeds.ts:140
// 萃取與聊天自此分開選型——萃取是額度大戶,聊天量小不動。)
const out = (await c.env.AI.run('@cf/qwen/qwen3-30b-a3b-fp8', {
messages: [{ role: 'user', content: prompt }],
max_tokens: 2048,
temperature: 0.2,