系統地層 STRATA · LLM SYSTEMS · v16
{{ lg.label }}
{{ summary.pct }}% 掌握度
系統地層 · 導覽 ×
{{ st.num }} {{ st.label }} {{ st.desc }}
語言 · LANGUAGE
{{ lg.label }}
{{ guideNum }} / {{ guideTotal }} {{ guideTitle }}

{{ guidePlain }}

← 上一步 {{ guideNextLabel }} 結束
SCENE 01 · 查詢推理核心

系統怎麼把一個問題,變成一句帶引用的答案

點任一個節點看它在做什麼;或按 播放,看一個真實的查詢沿著系統流動。

{{ playBtnLabel }} ✦ 帶我走
請求的旅程 · 主軸 · 點任一站
在哪發生 {{ lc.label }}
前端
編排
模型
數據
支援
離線索引 · 建立一次
文件
解析
切塊
嵌入 → 向量庫
⑤ 前端 Client 用戶提問 / 顯示答案
⑥ 後端 / 編排層 中樞 · 協調全部步驟、守門
③ 嵌入服務 Embedding · GPU
⑩ LLM 服務 / MaaS prefill → decode
④ 向量庫 含原文明文
① 文件 / 物件儲存 原文 · 備份
快取
Ⓐ 日誌 / 可觀測 prompt+回應 持久副本
{{ an.text }}
{{ lensCap }}
{{ capStep }} {{ capTitle }}
{{ capEl }}
SCENE 02 · 適應階梯

三條路,把能力匯入推理核心

RAG 不改權重、只在推理時注入知識;微調與預訓練則改動模型本身。點任一塊,展開那條管線的全部節點。

繼續預訓練建立深層領域能力(最貴)
微調 SFT改行為(改權重)
RAG 知識注入補知識(不改權重)
模型權重基座 + adapter
推理服務prefill → decode
→ 答案
SCENE 07 · 詞彙與掌握

每一個術語,都在這裡被你點亮

{{ summary.pct }}%
{{ summary.know }}
{{ summary.review }}待覆習
{{ summary.unsure }}未懂
{{ summary.none }}未碰
{{ fb.label }} {{ glSumText }}

圓點:空心=未碰 · ✓懂 · ~待覆習 · ?未懂(點一下循環,會記住)

{{ g.name }} · {{ g.count }}
{{ tm.glyph }} {{ tm.t }} {{ tm.d }}
SCENE 03 · 深入專題

挑出最關鍵的節點,一路鑽到底

這幾站把地圖上最核心的機制鑽到數學與工程的底。點開細讀。

T1Embedding
嵌入:語意如何變成數字

語意如何變成高維空間裡的一個點,而「相近」就是「靠近」。

細讀 →
T2Retrieval
檢索:相近怎麼量、百萬條怎麼快找

餘弦相似度的幾何,加上 ANN 如何用一點準確度換幾百倍速度。

細讀 →
T3LLM Serving
推理服務:逐字生成與 KV cache

prefill 與 decode 的成本差,以及 KV cache 為何能省下巨量重算。

細讀 →
T4Who calls whom
一次提問:後端 × 向量庫 × MaaS 怎麼分工

誰主動、誰被動、誰跟誰說話——把調用與流轉一次看清。

細讀 →
T5KV cache
KV cache:一張完整流程圖

prefill → 吐首字 → decode 迴圈 → 停止,一頁看懂整條生成流程。

細讀 →
SCENE 04 · 代理層 Agents

當模型開始自己思考、用工具、分多步完成任務

RAG 是單次「檢索→生成」;代理是它的超集——一個會循環的系統。

ReAct 迴圈:思考 → 行動 → 觀察 Agent Loop

整個畫面。代理不是一問一答,而是一個迴圈:模型 思考(Reason)下一步做什麼 → 行動(Act)呼叫一個工具 → 觀察(Observe)看結果 → 再思考……直到完成。步驟由模型自己決定。

Harness 執行骨架(迴圈 + 工具 + 記憶) 模型 LLM(腦) ① 思考 Reason:下一步做什麼 工具 Tools 檢索/RAG · 計算 · MCP 工具… ② 行動 Act{tool, args} ③ 觀察 Observe結果回傳 ↻ 重複直到完成 完成 →最終答案

harness 撐起這個迴圈;模型是腦,工具是手,觀察結果再餵回。

工具呼叫 / Function Calling。模型怎麼「行動」?它輸出一個結構化請求(例 {"tool":"search_policy","args":{"q":"大額現金門檻"}}),由 harness 執行、把結果回傳。模型自己不跑程式,只發出請求。

MCP(Model Context Protocol)。一個開放標準,讓任何工具/資料源用同一種接口接上任何代理——工具界的「USB 插口」,不必為每個工具寫膠水程式。

skill。打包好的能力:一個有名字、可重用的「提示 + 工具 + 步驟」組合(例:一個『合規查詢 skill』綁好對的提示和政策搜尋工具)。

harness。模型外圍的執行骨架:撐起迴圈、管工具、存記憶/狀態、解析模型的工具請求、執行、把結果餵回。模型是腦,harness 是讓它能行動的身體;沒有 harness,模型只是文字進文字出。

The ReAct loop: Reason → Act → Observe Agent Loop

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.

Harness runtime (loop + tools + memory) Model — LLM (brain) ① Reason: what to do next Tools retrieval/RAG · compute · MCP tools… ② Act{tool, args} ③ Observeresult back ↻ repeat until done Done →final answer

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.

{{ tk.agents.text }}
SCENE 05 · 合規視角

四個切面,追問機密資料的去向

在哪、會不會越界、誰能碰、留多久——套在系統圖的每個資料落點上逐一問一遍。

① 靜態 At Rest

落點:向量庫、存的原文塊、(微調過的)模型權重、日誌、備份。

風險:原文以明文存在多處;向量可反推;權重記憶訓練資料且難刪。

控制:靜態加密 + 客戶自管金鑰、權限、可刪除(連衍生物一起清)。

② 傳輸 In Transit

落點:每一跳,尤其 「完整 Prompt 送往 MaaS」。

風險:TLS 只擋網絡竊聽,不等於對收方保密;走公有 MaaS = 機密原文出境。

控制:自託管/主權推理;或對送出內容去敏;明確邊界。

③ 使用與日誌 In Use + Logs

落點:推理時的 KV cache;日誌/可觀測平台記下的 prompt+回應。

風險:最易被忽略——機密的持久明文副本;供應商可能拿去訓練或自行保留。

控制:入庫前去敏/遮蔽、保留期上限、合約規範供應商資料用途。

④ 落地與權限 Residency + Access

落點:各儲存與推理的物理司法管轄;RAG 檢索對原文件的權限。

風險:跨境傳輸違規;越權檢索(用戶取到無權看的段落)。

控制:在地落點;chunk 層綁原文件 ACL,檢索時過濾。

兩個要記住的重點:最敏感的一個動作是「機密被拼進 Prompt、再送出去」();最容易被漏的一個落點是日誌。把這四個面當成一張清單,就是「AI 場景的數據安全合規」。
託管 MaaS 到底會存什麼?

MaaS(Model-as-a-Service,模型即服務)=雲端模型 API。純推理本身無狀態;會不會留、留什麼,取決於供應商合約/設定,不是介面上的單純同意(user consent)。

完整 Prompt 機密明文 託管 MaaS(Model-as-a-Service)· 供應商邊界 推理計算 (GPU 上跑模型) KV cache 暫存 秒級 · 算完即丟 ← 不持久 模型權重=只讀,不會把你的輸入寫進去(「模型自身帶儲存」是誤解) ↓ 以下才是「持久化」,預設可能開;是否存看供應商合約/設定 日誌 Logs prompt+回應 明文 (最易漏) 濫用偵測 保留 N 天再刪 Abuse monitoring 用於訓練 可能 · 常可退出 Training 你的 Embedding 向量不在這裡 → 存在你自己的向量庫(④) ZDR = Zero Data Retention(零資料保留) 與供應商簽了 ZDR,上面三個持久化才真正關閉 → 真正「算完不留」。這是合約條款,不是介面上的勾選同意。

純推理算完即丟;要持久化的是日誌/濫用偵測/訓練——能不能關,看合約(ZDR)。

① At Rest

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).

② In Transit

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.

③ In Use + Logs

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.

④ Residency + Access

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.

Two things to remember: the most sensitive single action is “secrets get packed into the Prompt and sent out” (); the most easily-missed single site is the logs. Treat these four lenses as a checklist and you have “data-security compliance for AI.”
{{ tk.comp.text }}
SCENE 06 · 前沿 2026

經典範式之外,2026 真正在發生的演化

八個關鍵概念,補上這張地圖的最新一層。點任一張細讀。

Reasoning
推理模型 / 推理時運算

先想再答,用推理時的算力換準確度。2026 最大的轉變。

細讀 →
Agentic RAG
代理式檢索 + 脈絡工程

檢索變成 agent 會呼叫的工具,多輪逼近答案。

細讀 →
Preference Tuning
偏好微調:RLHF / DPO

教模型「人類較喜歡哪個答案」——你改行為管線缺的另一半。

細讀 →
MoE
混合專家架構

每個 token 只激活幾個專家——又大又便宜。

細讀 →
Inference Opt
推理優化:快取 + 推測解碼

提示快取 + 推測解碼,把變貴的推理拉回便宜又快。

細讀 →
Multi-agent · Memory
多代理 + 記憶

主管分派、多 worker 協作,加上長短期記憶。

細讀 →
Prompt Injection
提示注入(RAG/agent 安全)

惡意指令藏在被讀到的內容裡——間接注入最危。

細讀 →
Evaluation
評估:RAGAS + LLM-as-Judge

怎麼知道它對、它在哪裡崩——applied 的命門。

細讀 →
SCENE · 工具庫 TOOLKIT

那麼多工具,先看它們各站在哪一層

同一件事常有好幾個工具可選。先依管線分層看每一層在做什麼、各有哪些選擇;再依品牌生態看哪些其實出自同一家(LangChain、Hugging Face 各自就是一整族)。

依管線分層 · BY LAYER 依品牌生態 · BY ECOSYSTEM {{ toolViewHint }}
{{ ly.name }}
{{ ly.note }}
{{ tl.t }} — {{ tl.d }}
{{ br.name }}
{{ br.note }}
{{ tl.t }} — {{ tl.d }}