{{ guidePlain }}
系統怎麼把一個問題,變成一句帶引用的答案
點任一個節點看它在做什麼;或按 播放,看一個真實的查詢沿著系統流動。
三條路,把能力匯入推理核心
RAG 不改權重、只在推理時注入知識;微調與預訓練則改動模型本身。點任一塊,展開那條管線的全部節點。
每一個術語,都在這裡被你點亮
圓點:空心=未碰 · ✓懂 · ~待覆習 · ?未懂(點一下循環,會記住)
挑出最關鍵的節點,一路鑽到底
這幾站把地圖上最核心的機制鑽到數學與工程的底。點開細讀。
語意如何變成高維空間裡的一個點,而「相近」就是「靠近」。
餘弦相似度的幾何,加上 ANN 如何用一點準確度換幾百倍速度。
prefill 與 decode 的成本差,以及 KV cache 為何能省下巨量重算。
誰主動、誰被動、誰跟誰說話——把調用與流轉一次看清。
prefill → 吐首字 → decode 迴圈 → 停止,一頁看懂整條生成流程。
當模型開始自己思考、用工具、分多步完成任務
RAG 是單次「檢索→生成」;代理是它的超集——一個會循環的系統。
整個畫面。代理不是一問一答,而是一個迴圈:模型 思考(Reason)下一步做什麼 → 行動(Act)呼叫一個工具 → 觀察(Observe)看結果 → 再思考……直到完成。步驟由模型自己決定。
harness 撐起這個迴圈;模型是腦,工具是手,觀察結果再餵回。
工具呼叫 / Function Calling。模型怎麼「行動」?它輸出一個結構化請求(例 {"tool":"search_policy","args":{"q":"大額現金門檻"}}),由 harness 執行、把結果回傳。模型自己不跑程式,只發出請求。
MCP(Model Context Protocol)。一個開放標準,讓任何工具/資料源用同一種接口接上任何代理——工具界的「USB 插口」,不必為每個工具寫膠水程式。
skill。打包好的能力:一個有名字、可重用的「提示 + 工具 + 步驟」組合(例:一個『合規查詢 skill』綁好對的提示和政策搜尋工具)。
harness。模型外圍的執行骨架:撐起迴圈、管工具、存記憶/狀態、解析模型的工具請求、執行、把結果餵回。模型是腦,harness 是讓它能行動的身體;沒有 harness,模型只是文字進文字出。
The whole picture. An agent isn't one question, one answer — it's a loop: the model Reasons about what to do next → Acts by calling a tool → Observes the result → reasons again… until it's done. The model decides the steps itself.
The harness holds up the loop; the model is the brain, tools are the hands, results are fed back in.
Tool calls / Function calling. How does the model “act”? It emits a structured request (e.g. {"tool":"search_policy","args":{"q":"large-cash threshold"}}), the harness runs it and feeds the result back. The model never runs code itself — it only issues requests.
MCP (Model Context Protocol). An open standard that lets any tool/data source connect to any agent through one interface — the “USB port” of tools, so you don't write glue code for each one.
skill. A packaged capability: a named, reusable bundle of “prompt + tools + steps” (e.g. a “compliance-lookup skill” wiring the right prompt to a policy-search tool).
harness. The execution scaffold around the model: it runs the loop, manages tools, holds memory/state, parses the model's tool requests, executes them, and feeds results back. The model is the brain; the harness is the body that lets it act — without a harness, a model is just text-in, text-out.
四個切面,追問機密資料的去向
在哪、會不會越界、誰能碰、留多久——套在系統圖的每個資料落點上逐一問一遍。
落點:向量庫、存的原文塊、(微調過的)模型權重、日誌、備份。
風險:原文以明文存在多處;向量可反推;權重記憶訓練資料且難刪。
控制:靜態加密 + 客戶自管金鑰、權限、可刪除(連衍生物一起清)。
落點:每一跳,尤其 ⑨→⑩「完整 Prompt 送往 MaaS」。
風險:TLS 只擋網絡竊聽,不等於對收方保密;走公有 MaaS = 機密原文出境。
控制:自託管/主權推理;或對送出內容去敏;明確邊界。
落點:推理時的 KV cache;日誌/可觀測平台記下的 prompt+回應。
風險:最易被忽略——機密的持久明文副本;供應商可能拿去訓練或自行保留。
控制:入庫前去敏/遮蔽、保留期上限、合約規範供應商資料用途。
落點:各儲存與推理的物理司法管轄;RAG 檢索對原文件的權限。
風險:跨境傳輸違規;越權檢索(用戶取到無權看的段落)。
控制:在地落點;chunk 層綁原文件 ACL,檢索時過濾。
MaaS(Model-as-a-Service,模型即服務)=雲端模型 API。純推理本身無狀態;會不會留、留什麼,取決於供應商合約/設定,不是介面上的單純同意(user consent)。
純推理算完即丟;要持久化的是日誌/濫用偵測/訓練——能不能關,看合約(ZDR)。
Where: the vector DB, stored source chunks, (fine-tuned) model weights, logs, backups.
Risk: source text sits in plaintext in many places; vectors can be inverted; weights memorize training data and are hard to delete.
Controls: encryption at rest + customer-managed keys, permissions, deletability (purge derivatives too).
Where: every hop, especially ⑨→⑩ “the full Prompt sent to MaaS”.
Risk: TLS only blocks network eavesdropping, not confidentiality from the recipient; a public MaaS = secrets leave your boundary.
Controls: self-hosted / sovereign inference; or de-sensitize what you send; clear boundaries.
Where: the KV cache during inference; prompts+responses recorded by logs / observability.
Risk: the most overlooked — persistent plaintext copies of secrets; the provider may train on them or retain them.
Controls: de-sensitize / mask before storing, retention caps, contract the provider's use of data.
Where: the physical jurisdiction of each store and of inference; RAG retrieval's permission over source documents.
Risk: cross-border transfer violations; over-privileged retrieval (a user gets passages they shouldn't see).
Controls: in-region placement; bind chunk-level ACLs to the source document and filter at retrieval.
經典範式之外,2026 真正在發生的演化
八個關鍵概念,補上這張地圖的最新一層。點任一張細讀。
先想再答,用推理時的算力換準確度。2026 最大的轉變。
檢索變成 agent 會呼叫的工具,多輪逼近答案。
教模型「人類較喜歡哪個答案」——你改行為管線缺的另一半。
每個 token 只激活幾個專家——又大又便宜。
提示快取 + 推測解碼,把變貴的推理拉回便宜又快。
主管分派、多 worker 協作,加上長短期記憶。
惡意指令藏在被讀到的內容裡——間接注入最危。
怎麼知道它對、它在哪裡崩——applied 的命門。
那麼多工具,先看它們各站在哪一層
同一件事常有好幾個工具可選。先依管線分層看每一層在做什麼、各有哪些選擇;再依品牌生態看哪些其實出自同一家(LangChain、Hugging Face 各自就是一整族)。