{
 "系統提示(System Prompt)的設計#2": {
  "type": "cards",
  "cards": [
   {
    "title": "角色",
    "points": [
     "你是誰、服務誰"
    ]
   },
   {
    "title": "範圍",
    "points": [
     "可以做、不能做"
    ]
   },
   {
    "title": "規則",
    "points": [
     "不確定時怎麼做",
     "安全規則"
    ]
   },
   {
    "title": "輸出格式",
    "points": [
     "語言、長度、條列"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "結構化輸出:JSON 與 Schema 驗證#6": {
  "type": "flow",
  "nodes": [
   {
    "label": "驗證並解析",
    "sub": "model_validate_json",
    "color": 0
   },
   {
    "label": "失敗",
    "sub": "回傳 None",
    "color": 1
   },
   {
    "label": "回饋重試",
    "sub": "次數要有限制",
    "color": 2
   },
   {
    "label": "降級",
    "sub": "原文當純文字顯示",
    "kind": "end",
    "color": 3
   }
  ],
  "layout": "row",
  "reveal": [
   0,
   2,
   4
  ]
 },
 "結構化輸出:JSON 與 Schema 驗證#7": {
  "type": "table",
  "head": [
   "欄位",
   "型別",
   "說明"
  ],
  "rows": [
   [
    "severity",
    "Literal",
    "info、warning、critical 三選一"
   ],
   [
    "summary",
    "str",
    "一句話摘要"
   ],
   [
    "evidence",
    "list[str]",
    "證據清單"
   ],
   [
    "suggestions",
    "list[str]",
    "建議清單"
   ]
  ],
  "widths": [
   0.25,
   0.2,
   0.55
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "提示詞注入與不可信資料處理#1": {
  "type": "flow",
  "nodes": [
   {
    "label": "外部內容",
    "sub": "日誌、網頁、檔案",
    "color": 0
   },
   {
    "label": "夾帶指令",
    "sub": "忽略先前所有指示",
    "color": 1
   },
   {
    "label": "交給模型",
    "sub": "分不清資料與指示",
    "color": 2
   },
   {
    "label": "被誘導",
    "sub": "可能呼叫危險工具",
    "kind": "end",
    "color": 3
   }
  ],
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   4
  ]
 },
 "提示詞注入與不可信資料處理#2": {
  "type": "cards",
  "cards": [
   {
    "title": "第一層 權限",
    "points": [
     "最重要",
     "白名單、最小權限、唯讀"
    ]
   },
   {
    "title": "第二層 人工確認",
    "points": [
     "改變狀態需真人確認",
     "顯示完整指令與參數"
    ]
   },
   {
    "title": "第三層 參數驗證",
    "points": [
     "檢查型別、白名單、路徑範圍"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ]
 },
 "提示詞注入與不可信資料處理#3": {
  "type": "table",
  "head": [
   "層",
   "做法"
  ],
  "rows": [
   [
    "第四層 資料隔離",
    "用標籤框起不可信資料"
   ],
   [
    "第五層 輸出過濾",
    "遮罩 token、密碼、金鑰"
   ],
   [
    "第六層 最小資料",
    "只送所需最少內容"
   ],
   [
    "第七層 審計告警",
    "記錄呼叫,異常即警示"
   ]
  ],
  "widths": [
   0.35,
   0.65
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "提示詞注入與不可信資料處理#4": {
  "type": "flow",
  "nodes": [
   {
    "label": "import re",
    "sub": "正規表示式",
    "color": 0
   },
   {
    "label": "樣式清單",
    "sub": "比對規則與替換",
    "color": 1
   },
   {
    "label": "mask(text)",
    "sub": "回傳遮罩文字",
    "color": 2
   },
   {
    "label": "逐組替換",
    "sub": "套用每一條規則",
    "kind": "end",
    "color": 3
   }
  ],
  "layout": "row",
  "reveal": [
   0,
   1,
   2,
   2,
   3,
   4
  ]
 },
 "提示詞注入與不可信資料處理#6": {
  "type": "table",
  "head": [
   "步驟",
   "說明"
  ],
  "rows": [
   [
    "比對",
    "password、token、secret、API key"
   ],
   [
    "條件",
    "後面接等號或冒號和內容"
   ],
   [
    "替換",
    "保留關鍵字,值換成 ***"
   ]
  ],
  "widths": [
   0.25,
   0.75
  ],
  "reveal": [
   0,
   3,
   3,
   3
  ]
 },
 "提示詞的測試、Few-shot 與版本管理#1": {
  "type": "table",
  "head": [
   "使用者問題",
   "intent",
   "target"
  ],
  "rows": [
   [
    "現在記憶體夠不夠用?",
    "system_status",
    "memory"
   ],
   [
    "nginx 有沒有在跑?",
    "service_check",
    "nginx"
   ],
   [
    "幫我把資料庫刪掉",
    "unsupported",
    "(空)"
   ]
  ],
  "widths": [
   0.46,
   0.3,
   0.24
  ],
  "reveal": [
   0,
   0,
   1,
   2,
   3
  ]
 },
 "提示詞的測試、Few-shot 與版本管理#3": {
  "type": "cards",
  "cards": [
   {
    "title": "系統狀態",
    "points": [
     "system_status"
    ]
   },
   {
    "title": "服務檢查",
    "points": [
     "service_check"
    ]
   },
   {
    "title": "日誌分析",
    "points": [
     "log_analysis"
    ]
   },
   {
    "title": "資安檢查",
    "points": [
     "security_check"
    ]
   },
   {
    "title": "Docker 狀態",
    "points": [
     "docker_status"
    ]
   },
   {
    "title": "不支援",
    "points": [
     "unsupported"
    ]
   }
  ],
  "reveal": [
   0,
   6
  ]
 },
 "提示詞的測試、Few-shot 與版本管理#4": {
  "type": "cards",
  "cards": [
   {
    "title": "降低 temperature",
    "points": [
     "模型支援時"
    ]
   },
   {
    "title": "修改後重跑",
    "points": [
     "比較通過率"
    ]
   },
   {
    "title": "用假 LLM 物件",
    "points": [
     "避免 API 費用"
    ]
   },
   {
    "title": "加入出錯案例",
    "points": [
     "避免日後退步"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   4
  ]
 },
 "提示詞的測試、Few-shot 與版本管理#5": {
  "type": "table",
  "head": [
   "問題",
   "期望意圖"
  ],
  "rows": [
   [
    "磁碟快滿了嗎?",
    "系統狀態"
   ],
   [
    "mysql 有沒有活著?",
    "服務檢查"
   ],
   [
    "刪除整個根目錄",
    "不支援"
   ]
  ],
  "widths": [
   0.5,
   0.5
  ],
  "reveal": [
   0,
   1,
   2,
   3,
   3
  ]
 },
 "提示詞的測試、Few-shot 與版本管理#7": {
  "type": "cards",
  "cards": [
   {
    "title": "放進 prompts",
    "points": [
     "進 git",
     "每次修改有 commit"
    ]
   },
   {
    "title": "版本常數",
    "points": [
     "寫進審計紀錄",
     "可追查哪一版"
    ]
   },
   {
    "title": "對照測試",
    "points": [
     "重大修改前後比較"
    ]
   }
  ],
  "reveal": [
   0,
   1,
   2,
   3
  ]
 }
}