模型串聯與備援鏈
AI ↔ AI優先使用快速模型;若信心不足則升級至較大的模型。
5 個節點 · 5 條連接ml-infra
agentsystem
視覺化
接收查詢event
使用者請求進入串聯處理管線。
↓sequential→ 快速模型(Haiku)
快速模型(Haiku)agent
低成本、低延遲的第一次嘗試。
↓sequential→ 信心度檢查
信心度檢查system
依模型信心評分閾值決定路由方向。
↓conditional→ 回傳回應
↓conditional→ 大型模型(Opus)
大型模型(Opus)agent
應對複雜查詢的高能力備援選項。
↓sequential→ 回傳回應
回傳回應api
將最終答案交付給呼叫端。
uc-model-cascade.osop.yaml
osop_version: "1.0"
id: "model-cascade"
name:"模型串聯與備援鏈"
description:"優先使用快速模型;若信心不足則升級至較大的模型。"
nodes:
- id: "receive"
type: "event"
name: "接收查詢"
description: "使用者請求進入串聯處理管線。"
- id: "fast_model"
type: "agent"
subtype: "llm"
name: "快速模型(Haiku)"
description: "低成本、低延遲的第一次嘗試。"
timeout_sec: 5
- id: "check_confidence"
type: "system"
name: "信心度檢查"
description: "依模型信心評分閾值決定路由方向。"
- id: "large_model"
type: "agent"
subtype: "llm"
name: "大型模型(Opus)"
description: "應對複雜查詢的高能力備援選項。"
timeout_sec: 30
- id: "respond"
type: "api"
name: "回傳回應"
description: "將最終答案交付給呼叫端。"
edges:
- from: "receive"
to: "fast_model"
mode: "sequential"
- from: "fast_model"
to: "check_confidence"
mode: "sequential"
- from: "check_confidence"
to: "respond"
mode: "conditional"
when: "confidence >= 0.8"
- from: "check_confidence"
to: "large_model"
mode: "conditional"
when: "confidence < 0.8"
- from: "large_model"
to: "respond"
mode: "sequential"