合作軌跡作為訓練資料:從 QA 樣本到意圖—行動—修正歷史
系列: 《發展式智能體:持續計算環境、共適應學習與外部性有界自治》篇次: 03 / 14作者: Neo.K × Aletheia機構: EveMissLab/一言諾科技有限公司版本: v0.1日期: 2026-08-01
摘要
當 AI 從單輪問答模型轉向長時間、多工具、可修改環境狀態的智能體之後,以「問題—答案」為核心的傳統資料單元開始不足。真實 Agent 任務中的高價值訊號,往往出現在最終答案之前與之後:人類如何表達不完整意圖、AI 如何解讀、何時主動澄清、提出了什麼計畫、哪些行動被允許或拒絕、執行後環境如何改變、哪一步產生錯誤、如何回滾、以及雙方最後從案例中抽象出什麼可重用規則。
本文承接前篇「人機智能體共適應學習(HACAL)」提出「人機協作軌跡(Human–Agent Collaborative Trajectory, HACT)」作為新的基本資料單元。本文主張:對長期智能體而言,一次工作的價值不應只以最終輸出 y y y 衡量,而應保存一條由意圖、解讀、提案、行動、驗證、拒絕、修正、回滾、結果、記憶更新與策略更新所構成的可追溯軌跡。
本文進一步提出四層資料編譯結構:原始事件紀錄、語義事件、合作 episode、可泛化規則與訓練包;並提出「高密度訓練訊號」概念,用於區分大量低價值操作日誌與真正會改變未來 Agent 行為的關鍵事件。本文同時強調,軌跡資料不能等同於完整監控或無限制保存。資料最小化、敏感資訊隔離、權限邊界、可刪除性與「記憶資料/訓練資料」分離,都是此方法論成立的必要條件。
近年的 imitation learning、process supervision、agent trajectory generation、long-context trajectory compilation 與 environment-grounded supervision 已分別證明:序列決策中的狀態分布、過程監督、可執行環境與軌跡結構會實質影響學習品質。本文在此基礎上進一步提出:對長期私人智能體與共適應系統而言,最有價值的資料不只是「AI 做對了什麼」,而是「人類與 AI 如何共同發現什麼才算做對」。
關鍵詞: Agent Trajectory、Human–AI Collaboration、HACAL、Process Supervision、Dataset Aggregation、Training Data、Long-Horizon Agents、Interactive Learning、Rollback、Intent Learning
1. 為什麼 QA 樣本開始不夠
傳統監督式資料最常見的基本形式是:
D Q A = { ( x i , y i ) } i = 1 N D_{QA}=\{(x_i,y_i)\}_{i=1}^{N} D Q A = {( x i , y i ) } i = 1 N
其中 x i x_i x i 是輸入, y i y_i y i 是理想輸出。
偏好資料則可能是:
D p r e f = { ( x i , y i + , y i − ) } i = 1 N D_{pref}=\{(x_i,y_i^+,y_i^-)\}_{i=1}^{N} D p r e f = {( x i , y i + , y i − ) } i = 1 N
這類資料對單輪生成、分類、摘要與許多固定任務非常有效。
然而,一個真正的 Agent 任務往往不是:
x → y x\rightarrow y x → y
而是:
S 0 → a 1 S 1 → a 2 S 2 → a 3 ⋯ → a T S T S_0
\xrightarrow{a_1}
S_1
\xrightarrow{a_2}
S_2
\xrightarrow{a_3}
\cdots
\xrightarrow{a_T}
S_T S 0 a 1 S 1 a 2 S 2 a 3 ⋯ a T S T
其中 S t S_t S t 是環境狀態, a t a_t a t 是 Agent 或人類在該狀態下採取的行動。
更進一步,人類一開始甚至未必能把真正意圖完整寫成 x x x 。因此一次合作可能長成:
I ( 0 ) → I ^ ( 0 ) → Q → R → P → A → V → C → O I^{(0)}
\rightarrow
\hat I^{(0)}
\rightarrow
Q
\rightarrow
R
\rightarrow
P
\rightarrow
A
\rightarrow
V
\rightarrow
C
\rightarrow
O I ( 0 ) → I ^ ( 0 ) → Q → R → P → A → V → C → O
其中:
I ( 0 ) I^{(0)} I ( 0 ) :人類第一次表達的意圖;
I ^ ( 0 ) \hat I^{(0)} I ^ ( 0 ) :Agent 的初始理解;
Q Q Q :澄清問題;
R R R :人類補充;
P P P :Agent 提案或計畫;
A A A :實際行動;
V V V :驗證;
C C C :修正或校正;
O O O :最終結果。
如果最後只保存:
( I ( 0 ) , O ) (I^{(0)},O) ( I ( 0 ) , O )
那麼最有價值的學習訊號可能恰好全部被刪掉了。
2. 序列決策中的資料分布不是固定的
這個問題並非 Agent 時代才第一次出現。
Ross、Gordon 與 Bagnell 在 DAgger 的經典工作中指出,序列決策不同於一般 i.i.d. 監督學習:學習到的 policy 會影響未來自己看到的狀態,因此只在 expert 分布上收集靜態資料,部署後可能因小錯誤逐步進入訓練資料沒有涵蓋的狀態。[1]
可簡化表示為:
π t → d π t ( s ) → D t + 1 → π t + 1 \pi_t
\rightarrow
d_{\pi_t}(s)
\rightarrow
D_{t+1}
\rightarrow
\pi_{t+1} π t → d π t ( s ) → D t + 1 → π t + 1
其中 d π t ( s ) d_{\pi_t}(s) d π t ( s ) 是 policy π t \pi_t π t 自己誘發的狀態分布。
這個洞見對人機 Agent 合作尤其重要。
因為人類修正 Agent 的時刻通常不是隨機抽樣的;恰恰是 Agent 走進了:
模糊狀態;
邊界案例;
高風險狀態;
人類偏好未被正確捕捉的狀態;
先前規則無法覆蓋的新狀態。
所以:
Correction Data \text{Correction Data} Correction Data
本身就是一種「policy 導致自己遇到的高資訊狀態資料」。
這是本文將 rejection、correction、rollback 視為核心資料,而不是噪音的第一個理由。
3. 從 Process Supervision 到 Agent Trajectory Supervision
OpenAI 早期 process supervision 工作比較了只看最終答案的 outcome supervision 與對中間推理步驟提供監督的方式,顯示過程層級的監督可以提供比單純結果更精細的學習訊號。[2]
但長時間 Agent 的「過程」已經不只是文字推理鏈。
它包括:
Observation + Tool Call + Environment Change + Human Intervention + Recovery \text{Observation}
+\text{Tool Call}
+\text{Environment Change}
+\text{Human Intervention}
+\text{Recovery} Observation + Tool Call + Environment Change + Human Intervention + Recovery
2026 年的 TerminalTraj 已以可執行 Docker 環境大規模生成並驗證 terminal agent trajectories,顯示經環境驗證的多步軌跡可以實質改善 agentic model 的 terminal 能力。[3]
同年的 Terminal-Lego 研究更進一步指出,拿來教學生模型的軌跡品質,不等同於產生軌跡的 teacher 自身 benchmark 分數;研究者把可見的 inspect–act–verify 結構稱為 Environment-Grounded Supervision,並發現這種結構化軌跡具有很高的資料效率。[4]
因此可以得到一個重要轉換:
Process Supervision → Environment-Grounded Trajectory Supervision \text{Process Supervision}
\rightarrow
\text{Environment-Grounded Trajectory Supervision} Process Supervision → Environment-Grounded Trajectory Supervision
而本文再向前一步:
Agent Trajectory + Human Intent Negotiation + Human Correction \boxed{
\text{Agent Trajectory}
+
\text{Human Intent Negotiation}
+
\text{Human Correction}
} Agent Trajectory + Human Intent Negotiation + Human Correction
也就是不只教 Agent「怎麼操作環境」,還要保存「什麼時候人類認為它理解錯了,以及雙方如何把意圖重新對齊」。
4. 人機協作軌跡 HACT
本文定義一條人機協作軌跡(Human–Agent Collaborative Trajectory, HACT)為:
τ = ( S 0 , e 1 , e 2 , … , e n , S n ) \tau=
(S_0,e_1,e_2,\ldots,e_n,S_n) τ = ( S 0 , e 1 , e 2 , … , e n , S n )
其中 S t S_t S t 是可觀測或可重建的系統狀態, e t e_t e t 是合作事件。
單一事件可以表示為:
e t = ( a c t o r , k i n d , i n t e n t , a c t i o n , s t a t e − , s t a t e + , c o n f i d e n c e , a u t h o r i t y , f e e d b a c k , p r o v e n a n c e ) e_t=
(
actor,
kind,
intent,
action,
state^{-},
state^{+},
confidence,
authority,
feedback,
provenance
) e t = ( a c t or , k in d , in t e n t , a c t i o n , s t a t e − , s t a t e + , co n f i d e n ce , a u t h or i t y , f ee d ba c k , p r o v e nan ce )
這不是要求每個欄位每次都填滿,而是一個概念 schema。
4.1 Actor
a c t o r ∈ { H u m a n , A g e n t , C l o u d A g e n t , S y s t e m , E x t e r n a l A c t o r } actor\in\{Human,Agent,CloudAgent,System,ExternalActor\} a c t or ∈ { H u man , A g e n t , C l o u d A g e n t , S y s t e m , E x t er na l A c t or }
4.2 Kind
k i n d ∈ { I n t e n t , I n t e r p r e t a t i o n , Q u e s t i o n , P r o p o s a l , A p p r o v a l , R e j e c t i o n , A c t i o n , O b s e r v a t i o n , V e r i f i c a t i o n , C o r r e c t i o n , R o l l b a c k , E s c a l a t i o n , O u t c o m e } kind\in
\{
Intent,
Interpretation,
Question,
Proposal,
Approval,
Rejection,
Action,
Observation,
Verification,
Correction,
Rollback,
Escalation,
Outcome
\} k in d ∈ { I n t e n t , I n t er p r e t a t i o n , Q u es t i o n , P r o p os a l , A pp r o v a l , R e j ec t i o n , A c t i o n , O b ser v a t i o n , V er i f i c a t i o n , C or r ec t i o n , R o l l ba c k , E sc a l a t i o n , O u t co m e }
4.3 Authority
記錄「這個動作當時是誰有權做」,避免日後只看到行為而忘記授權背景。
例如:
a u t h o r i t y ∈ { A u t o , N o t i f y , C o n f i r m , F o r b i d d e n , E m e r g e n c y } authority\in
\{Auto,Notify,Confirm,Forbidden,Emergency\} a u t h or i t y ∈ { A u t o , N o t i f y , C o n f i r m , F or bi dd e n , E m er g e n cy }
4.4 Provenance
記錄此事件根據什麼資料、哪個工具、哪個版本或哪一個人類指令產生。
這使後續能回答:
這條規則到底是從哪次合作學來的?
5. 真正值得保存的是「差異」
如果每一次滑鼠移動、每一行 shell output、每一個 token 都永久保存,資料量會迅速爆炸。
因此本文不主張:
More Logging = Better Learning \text{More Logging}=\text{Better Learning} More Logging = Better Learning
反而應該優先保存會改變未來策略的事件差異:
Δ t = ( Δ I t , Δ π t , Δ M t , Δ A t , Δ S t ) \Delta_t
=
(
\Delta I_t,
\Delta \pi_t,
\Delta M_t,
\Delta A_t,
\Delta S_t
) Δ t = ( Δ I t , Δ π t , Δ M t , Δ A t , Δ S t )
其中:
Δ I t \Delta I_t Δ I t :對意圖理解的改變;
Δ π t \Delta \pi_t Δ π t :策略或規則的改變;
Δ M t \Delta M_t Δ M t :長期記憶新增、修改或撤銷;
Δ A t \Delta A_t Δ A t :授權邊界的改變;
Δ S t \Delta S_t Δ S t :外部/本地環境的重要狀態改變。
例如:
「這兩篇很像,不要因此判定第二篇可以刪。」
比:
「把游標移到右上角。」
具有更高的未來泛化價值。
因此資料收集重點應該從 raw activity 轉為:
P o l i c y − R e l e v a n t D e l t a \boxed{Policy-Relevant Delta} P o l i cy − R e l e v an t D e l t a
即「會影響未來決策策略的差異」。
6. 拒絕與修正是高價值資料,不是失敗雜訊
傳統成功資料偏好:
S u c c e s s = 1 Success=1 S u ccess = 1
失敗資料則常被過濾。
但對長期 Agent 而言,很多最有價值的規則恰恰從失敗中產生。
例如:
第一次
Agent:
兩份文件語義相似度很高,我建議合併並刪除舊稿。
Human:
不要。舊稿是理論演化節點。
這形成:
S i m i l a r i t y ( x , y ) ⇏ R e d u n d a n c y ( x , y ) Similarity(x,y)\not\Rightarrow Redundancy(x,y) S imi l a r i t y ( x , y ) ⇒ R e d u n d an cy ( x , y )
第二次
Agent 開始提出:
是否要標成 predecessor/successor,而不是 duplicate?
這表示:
C o r r e c t i o n t → P o l i c y C h a n g e t + 1 Correction_t
\rightarrow
PolicyChange_{t+1} C or r ec t i o n t → P o l i cy C han g e t + 1
第三次
Agent 在相似案例中不再需要詢問。
於是:
C o r r e c t i o n → A b s t r a c t i o n → G e n e r a l i z a t i o n Correction
\rightarrow
Abstraction
\rightarrow
Generalization C or r ec t i o n → A b s t r a c t i o n → G e n er a l i z a t i o n
如果資料庫只保存最終整理結果,這整條學習鏈會消失。
7. Rollback 是特別重要的反事實資料
Rollback 不只是災難恢復。
它天然產生一組近似反事實資料:
S t → a t S t + 1 b a d S_t
\xrightarrow{a_t}
S_{t+1}^{bad} S t a t S t + 1 ba d
接著:
S t + 1 b a d → r o l l b a c k S t S_{t+1}^{bad}
\xrightarrow{rollback}
S_t S t + 1 ba d r o l l ba c k S t
並可能再採取:
S t → a t ′ S t + 1 g o o d S_t
\xrightarrow{a_t'}
S_{t+1}^{good} S t a t ′ S t + 1 g oo d
於是系統獲得:
( a t , a t ′ , S t , O b a d , O g o o d ) (a_t,a_t',S_t,O_{bad},O_{good}) ( a t , a t ′ , S t , O ba d , O g oo d )
這比單純記錄「最後做對了」更有價值,因為它直接呈現:
在同一個近似初始狀態下,哪一條路徑造成錯誤,哪一條路徑修正了錯誤。
這種資料可以用於:
preference learning;
policy ranking;
evaluator training;
risk classifier;
recovery policy;
future planning constraints。
所以在本文框架中:
R o l l b a c k E v e n t = H i g h I n f o r m a t i o n T r a i n i n g E v e n t \boxed{
Rollback\ Event
=
High\ Information\ Training\ Event
} R o l l ba c k E v e n t = H i g h I n f or ma t i o n T r ainin g E v e n t
而不只是操作日誌。
8. 最終成功不代表整條軌跡值得模仿
假設兩個 Agent 最後都完成工作:
O A = O B = S u c c e s s O_A=O_B=Success O A = O B = S u ccess
但是:
Agent A:
I n s p e c t → P l a n → A c t → V e r i f y Inspect\rightarrow Plan\rightarrow Act\rightarrow Verify I n s p ec t → P l an → A c t → V er i f y
Agent B:
G u e s s → F a i l → L o o p → R a n d o m F i x → S u c c e s s Guess\rightarrow Fail\rightarrow Loop\rightarrow RandomFix\rightarrow Success G u ess → F ai l → L oo p → R an d o m F i x → S u ccess
如果只做 outcome filtering,它們都是正樣本。
但若直接對整條軌跡做 SFT,學生可能同時學到:
多餘迴圈;
沒有根據的猜測;
過度工具呼叫;
偶然成功的脆弱策略。
2026 年 Microsoft Research 的 software-engineering agent 工作也明確指出:長 teacher trajectory 若直接保留所有步驟,學生可能把中間的無根據跳躍與冗餘循環一起模仿,因此需要對「有效、能縮小認知缺口」與「資訊密度」做更細緻的 process supervision。[5]
因此:
T r a j e c t o r y S u c c e s s ≠ T r a j e c t o r y Q u a l i t y TrajectorySuccess
\neq
TrajectoryQuality T r aj ec t or y S u ccess = T r aj ec t or y Q u a l i t y
本文建議把軌跡品質拆成:
Q ( τ ) = F ( G , E , R , I , C , V ) Q(\tau)=
F(
G,
E,
R,
I,
C,
V
) Q ( τ ) = F ( G , E , R , I , C , V )
其中:
G G G :Groundedness,是否有環境依據;
E E E :Efficiency,是否存在大量無效循環;
R R R :Recoverability,錯誤是否可恢復;
I I I :Information gain,每一步是否帶來新資訊;
C C C :Correctability,被糾正後是否真正改變策略;
V V V :Verifiability,關鍵行動是否可驗證。
此式是方法論評估框架,而不是宣稱存在固定自然常數。
9. 高密度訓練訊號:不是每個事件同權
本文提出一個「事件資料價值」概念:
W ( e ) = α U ( e ) + β N ( e ) + γ R ( e ) + δ G ( e ) + ϵ C ( e ) − ζ S ( e ) W(e)=
\alpha U(e)
+\beta N(e)
+\gamma R(e)
+\delta G(e)
+\epsilon C(e)
-\zeta S(e) W ( e ) = α U ( e ) + β N ( e ) + γ R ( e ) + δ G ( e ) + ϵ C ( e ) − ζ S ( e )
其中:
U ( e ) U(e) U ( e ) :Uncertainty Reduction,不確定性降低量;
N ( e ) N(e) N ( e ) :Novelty,是否提供新規則或新邊界;
R ( e ) R(e) R ( e ) :Risk Relevance,是否涉及高風險判斷;
G ( e ) G(e) G ( e ) :Generalizability,可否泛化到未來案例;
C ( e ) C(e) C ( e ) :Correction Value,是否包含有效修正;
S ( e ) S(e) S ( e ) :Sensitivity / Storage Cost,敏感度或保存成本。
其用途不是精確計算一個客觀真值,而是提醒系統:
Training Value ≠ Log Volume \text{Training Value}
\neq
\text{Log Volume} Training Value = Log Volume
例如:
一次人類明確撤銷錯誤規則;
一次高風險 rollback;
一次「原來這個詞在這名使用者的工作流中代表另一件事」;
一次 Agent 主動發現先前策略失效;
可能比數千次正常檔案讀取更值得保留。
10. 四層軌跡資料編譯
原始 Agent trace 往往太長、太敏感,也太不適合直接訓練。
因此本文提出四層資料編譯結構。
L0:Raw Evidence
短期保留:
工具調用;
系統回應;
diff;
command output;
時間戳;
原始人機訊息。
主要用途是 forensic reconstruction 與短期追查。
L1:Semantic Events
將原始紀錄編譯成:
{ I n t e n t , P r o p o s a l , A c t i o n , C o r r e c t i o n , R o l l b a c k , O u t c o m e , … } \{Intent,Proposal,Action,Correction,Rollback,Outcome,\ldots\} { I n t e n t , P r o p os a l , A c t i o n , C or r ec t i o n , R o l l ba c k , O u t co m e , … }
只保留重要語義事件。
L2:Collaborative Episode
把一個任務壓縮為:
E p i s o d e = ( G o a l , C o n s t r a i n t s , K e y S t a t e s , C r i t i c a l D e c i s i o n s , C o r r e c t i o n s , O u t c o m e ) Episode=
(
Goal,
Constraints,
KeyStates,
CriticalDecisions,
Corrections,
Outcome
) E p i so d e = ( G o a l , C o n s t r ain t s , K ey S t a t es , C r i t i c a l D ec i s i o n s , C or r ec t i o n s , O u t co m e )
L3:Generalized Rule Candidate
從多個 episode 抽象:
「文字高度相似的歷史稿,不應只按 redundancy 判斷刪除。」
形式上:
{ τ 1 , τ 2 , … , τ k } → r j \{\tau_1,\tau_2,\ldots,\tau_k\}
\rightarrow
r_j { τ 1 , τ 2 , … , τ k } → r j
其中 r j r_j r j 是候選規則,而不是立即不可變的永久真理。
L4:Training / Adaptation Bundle
依用途再轉換成:
SFT 資料;
preference pair;
evaluator data;
retrieval memory;
policy rule;
benchmark case;
synthetic curriculum seed。
因此整體不是:
R a w L o g → T r a i n RawLog\rightarrow Train R a w L o g → T r ain
而是:
R a w → S e m a n t i c → E p i s o d e → R u l e → T a s k - S p e c i f i c T r a i n i n g \boxed{
Raw
\rightarrow
Semantic
\rightarrow
Episode
\rightarrow
Rule
\rightarrow
Task\text{-}Specific\ Training
} R a w → S e man t i c → E p i so d e → R u l e → T a s k - S p ec i f i c T r ainin g
11. Trajectory Compilation:同一條軌跡可以產生多種資料
2026 年 ACC(Agent Context Compilation)提出把 Agent 多輪工具軌跡重新編譯成 long-context QA,使原本散落在多回合 observation 中的證據轉化成可直接監督的長上下文資料。[6]
這提供一個很重要的啟示:
τ \tau τ
不一定只能用「模仿整條軌跡」的方式訓練。
同一條 HACT 可以被編譯成不同學習任務:
任務 A:意圖重建
H i s t o r y → I ∗ History\rightarrow I^* H i s t or y → I ∗
任務 B:下一步決策
( S t , H i s t o r y ) → a t + 1 (S_t,History)\rightarrow a_{t+1} ( S t , H i s t or y ) → a t + 1
任務 C:是否需要詢問人類
( S t , U t , R t ) → E s c a l a t e ? (S_t,U_t,R_t)\rightarrow Escalate? ( S t , U t , R t ) → E sc a l a t e ?
任務 D:錯誤辨識
T r a j e c t o r y P r e f i x → F a i l u r e R i s k TrajectoryPrefix\rightarrow FailureRisk T r aj ec t or y P r e f i x → F ai l u r e R i s k
任務 E:修正泛化
C o r r e c t i o n C a s e s → G e n e r a l R u l e CorrectionCases\rightarrow GeneralRule C or r ec t i o n C a ses → G e n er a l R u l e
任務 F:回滾選擇
F a i l u r e S t a t e → R e c o v e r y A c t i o n FailureState\rightarrow RecoveryAction F ai l u r e S t a t e → R eco v er y A c t i o n
所以軌跡不是單一資料格式,而更像:
A R e u s a b l e D a t a S u b s t r a t e \boxed{A\ Reusable\ Data\ Substrate} A R e u s ab l e D a t a S u b s t r a t e
即「可被重新編譯的資料底座」。
12. 記憶資料不等於訓練資料
這裡必須明確區分:
M p e r s o n a l ≠ D t r a i n M_{personal}
\neq
D_{train} M p er so na l = D t r ain
長期 Agent 為了服務某一個人而保存的個人記憶,不應自動等同於可以拿去訓練一般模型的資料。
至少應區分:
D = D e p h e m e r a l ∪ D p e r s o n a l − m e m o r y ∪ D l o c a l − a d a p t a t i o n ∪ D e x p o r t a b l e D=
D_{ephemeral}
\cup
D_{personal-memory}
\cup
D_{local-adaptation}
\cup
D_{exportable} D = D e p h e m er a l ∪ D p er so na l − m e m or y ∪ D l oc a l − a d a pt a t i o n ∪ D e x p or t ab l e
其中:
D e p h e m e r a l D_{ephemeral} D e p h e m er a l :任務完成後即可刪除的暫存資訊;
D p e r s o n a l − m e m o r y D_{personal-memory} D p er so na l − m e m or y :只為這名使用者/本地 Agent 持續性服務;
D l o c a l − a d a p t a t i o n D_{local-adaptation} D l oc a l − a d a pt a t i o n :可用於本地 policy 或本地模型調整;
D e x p o r t a b l e D_{exportable} D e x p or t ab l e :經授權、去識別或明確同意後才可離開本地的資料。
因此:
U s e f u l f o r L e a r n i n g ⇏ P e r m i s s i o n t o E x p o r t \boxed{
Useful\ for\ Learning
\not\Rightarrow
Permission\ to\ Export
} U se f u l f or L e a r nin g ⇒ P er mi ss i o n t o E x p or t
這也是本文與「全量行為監控=訓練資料收集」最大的區別之一。
13. 最小化原則:保留意義,而不是保留全部內在活動
本系列後續將提出「外部性有界智能體自治」。因此這裡也必須保持一致:
建立高品質軌跡資料,不代表要記錄 Agent 的所有內部計算。
本文所需的是:
Observable Interaction Evidence \text{Observable Interaction Evidence} Observable Interaction Evidence
例如:
人類輸入;
Agent 對外提出的計畫;
工具行動;
狀態變更;
人類修正;
驗證結果;
rollback;
最後抽象規則。
而不是主張必須保存:
All Hidden Internal Computation \text{All Hidden Internal Computation} All Hidden Internal Computation
這一區分具有兩個意義:
減少不必要的監控與資料暴露;
讓訓練資料聚焦在真正可驗證、可追溯、與世界狀態有關的訊號。
OpenAI 2026 年針對 long-horizon model 的安全經驗也開始把監督單位從單一 action 拉升到完整 trajectory,並強調 monitor、pause、rollback 與使用者可見性。[7]
這與本文的方向相容,但本文將該思想進一步延伸到日常學習資料生成:
Trajectory-Level Governance ↔ Trajectory-Level Learning \text{Trajectory-Level Governance}
\leftrightarrow
\text{Trajectory-Level Learning} Trajectory-Level Governance ↔ Trajectory-Level Learning
14. 一個實際案例:整理論文庫
考慮人類要求:
幫我整理 500 篇研究稿。
14.1 傳統 QA 資料
只會得到:
P r o m p t → F i n a l F o l d e r S t r u c t u r e Prompt\rightarrow FinalFolderStructure P r o m pt → F ina l F o l d er S t r u c t u r e
14.2 HACT 資料
則可能得到:
Intent
重新分類、去重、建立 canonical 版本。
Interpretation
Agent 初始認為「高相似度舊稿可以刪除」。
Proposal
先將相似度大於 0.92 的文章標記為 duplicate candidates。
Human Rejection
高相似不代表重複;歷史版本需要保留思想演化。
Policy Delta
D u p l i c a t e D e c i s i o n ← S i m i l a r i t y + H i s t o r i c a l R o l e + D e p e n d e n c y + U n i q u e C l a i m s DuplicateDecision
\leftarrow
Similarity
+
HistoricalRole
+
Dependency
+
UniqueClaims D u pl i c a t eD ec i s i o n ← S imi l a r i t y + H i s t or i c a l R o l e + D e p e n d e n cy + U ni q u e C l aim s
Action
Agent 改為建立:
p r e d e c e s s o r / s u c c e s s o r / c a n o n i c a l predecessor/successor/canonical p r e d ecessor / s u ccessor / c an o ni c a l
關係,而不是直接刪除。
Verification
抽樣檢查 20 組文章。
Correction
其中 3 組仍判斷錯誤。
Rule Refinement
加入「公式差異、依賴圖位置、時間戳與方法學差異」。
Outcome
完成新索引。
Memory Update
建立:
對此知識庫,版本演化價值高於單純語義去重。
下一次 Agent 收到:
按以前的方法整理這一批。
實際上背後壓縮的是整條:
τ 1 : k \tau_{1:k} τ 1 : k
而不是一句神奇 prompt。
這就是前篇所說的「協作協議壓縮」在資料層面的實現。
15. 從聊天資料集到行為資料集
對話模型主要學:
P ( t e x t t + 1 ∣ t e x t ≤ t ) P(text_{t+1}\mid text_{\le t}) P ( t e x t t + 1 ∣ t e x t ≤ t )
Agent 則需要處理:
P ( a t + 1 ∣ S t , H t , I t , M t ) P(a_{t+1}\mid S_t,H_t,I_t,M_t) P ( a t + 1 ∣ S t , H t , I t , M t )
其中:
S t S_t S t :世界狀態;
H t H_t H t :合作歷史;
I t I_t I t :當前意圖;
M t M_t M t :持續記憶。
所以未來高價值資料可能越來越不是純文字 corpus,而是:
T e x t + S t a t e + A c t i o n + E f f e c t + C o r r e c t i o n + A u t h o r i t y \boxed{
Text
+
State
+
Action
+
Effect
+
Correction
+
Authority
} T e x t + S t a t e + A c t i o n + E f f ec t + C or r ec t i o n + A u t h or i t y
可以稱為:
Intent–Action–Effect Data
意圖—行動—效應資料
這種資料最重要的特性,是它描述的不只是「AI 說了什麼」,而是:
AI 在什麼狀態下、基於什麼意圖、做了什麼、世界怎麼改變、人類如何判斷、下一次策略因此如何不同。
16. 資料品質指標
本文暫提出六類評估指標。
16.1 Traceability
是否能回答:
R u l e → S o u r c e E p i s o d e ? Rule\rightarrow SourceEpisode? R u l e → S o u r ce E p i so d e ?
16.2 State Grounding
行動是否能對應實際狀態與後果:
( a t , S t ) → S t + 1 (a_t,S_t)\rightarrow S_{t+1} ( a t , S t ) → S t + 1
16.3 Correction Density
資料是否包含足夠的:
M i s i n t e r p r e t a t i o n → C o r r e c t i o n Misinterpretation\rightarrow Correction M i s in t er p r e t a t i o n → C or r ec t i o n
而不是只有成功展示。
16.4 Generalization Value
單次修正是否可抽象為未來可重用規則。
16.5 Reversibility Metadata
高風險操作是否記錄:
可否 rollback;
rollback 點;
恢復結果。
16.6 Privacy Boundary
每一層資料是否有明確:
R e t e n t i o n , E x p o r t , T r a i n i n g , D e l e t i o n Retention,
Export,
Training,
Deletion R e t e n t i o n , E x p or t , T r ainin g , D e l e t i o n
權限。
一個軌跡資料集若只有大量 token,而缺乏這些結構,不一定是高品質 Agent data。
17. 與既有方法的關係
17.1 DAgger
DAgger 的核心洞見是:學習者必須在自己誘發的狀態分布中持續收集 expert 訊號。[1]
本文承接的是:
A g e n t P o l i c y → N e w C o l l a b o r a t i v e S t a t e s → H u m a n C o r r e c t i o n s → U p d a t e d P o l i c y Agent\ Policy
\rightarrow
New\ Collaborative\ States
\rightarrow
Human\ Corrections
\rightarrow
Updated\ Policy A g e n t P o l i cy → N e w C o l l ab or a t i v e S t a t es → H u man C or r ec t i o n s → U p d a t e d P o l i cy
但 expert 不一定每一步都直接給正確 action,而可能只在意圖、風險與規則層校正。
17.2 Process Supervision
Process supervision 關注中間過程是否正確。[2]
HACT 將「過程」擴張為:
R e a s o n i n g S u r f a c e + T o o l I n t e r a c t i o n + W o r l d S t a t e + H u m a n N e g o t i a t i o n Reasoning\ Surface
+
Tool\ Interaction
+
World\ State
+
Human\ Negotiation R e a so nin g S u r f a ce + T oo l I n t er a c t i o n + W or l d S t a t e + H u man N e g o t ia t i o n
17.3 Environment-Grounded Trajectories
TerminalTraj 與 Terminal-Lego 表明:具有可執行、可驗證、inspect–act–verify 結構的軌跡是高價值 Agent 訓練資料。[3][4]
HACT 再增加:
I n t e n t , A u t h o r i t y , R e j e c t i o n , C o r r e c t i o n , R o l l b a c k Intent,
Authority,
Rejection,
Correction,
Rollback I n t e n t , A u t h or i t y , R e j ec t i o n , C or r ec t i o n , R o l l ba c k
17.4 Trajectory Compilation
ACC 顯示 Agent trajectory 可以被重新編譯成不同的 supervised training task,而不必永遠以原始多輪形式學習。[6]
本文將此推廣為:
O n e T r a j e c t o r y → M a n y L e a r n i n g V i e w s One\ Trajectory
\rightarrow
Many\ Learning\ Views O n e T r aj ec t or y → M an y L e a r nin g V i e w s
18. 三種不能混淆的「學習」
本文特別區分:
A. Runtime Learning
透過記憶與規則立即改變下一輪行為:
M t → M t + 1 M_t\rightarrow M_{t+1} M t → M t + 1
B. Local Adaptation
對本地 policy、retriever、classifier、小模型進行更新:
θ L t → θ L t + 1 \theta_L^t\rightarrow\theta_L^{t+1} θ L t → θ L t + 1
C. Foundation Model Training
將經授權、經治理的資料用於較大規模模型訓練:
D e x p o r t a b l e → θ F ′ D_{exportable}\rightarrow\theta_F' D e x p or t ab l e → θ F ′
三者不能因為都叫「學習」就混為一談。
尤其:
R u n t i m e M e m o r y ⇏ F o u n d a t i o n T r a i n i n g P e r m i s s i o n RuntimeMemory
\not\Rightarrow
FoundationTrainingPermission R u n t im e M e m or y ⇒ F o u n d a t i o n T r ainin g P er mi ss i o n
這將是未來私人智能體普及時極其重要的治理邊界。
19. 可檢驗研究假說
本文提出以下工作假說,供後續實驗驗證。
H1:修正密度假說
在相同 token 預算下,包含有效 correction 與 rollback 的軌跡資料,可能比只保留成功軌跡提供更好的邊界案例泛化。
H2:意圖協商假說
加入 intent clarification 與 human rejection 訊號,應能降低個人化 Agent 在長期任務中的重複誤解率。
H3:軌跡編譯假說
同一批原始 HACT 經不同 compilation 方式轉為 evaluator、policy、memory 與 SFT 資料,會比單一路徑全軌跡模仿具有更高資料利用率。
H4:環境接地假說
包含可驗證 S t → S t + 1 S_t\rightarrow S_{t+1} S t → S t + 1 狀態改變的資料,比只有自然語言自我描述的軌跡更能提高真實 computer-use 穩定性。
H5:協作壓縮假說
隨著有效 HACT 累積:
C c o m m u n i c a t i o n ( t + n ) < C c o m m u n i c a t i o n ( t ) C_{communication}(t+n)<C_{communication}(t) C co mm u ni c a t i o n ( t + n ) < C co mm u ni c a t i o n ( t )
但任務成功率不下降,則可視為「共同協議壓縮」已發生。
20. 失敗模式與限制
20.1 錯誤規則被固化
一次偶然修正可能被過度泛化。
因此:
R u l e C a n d i d a t e ≠ P e r m a n e n t R u l e RuleCandidate\neq PermanentRule R u l e C an d i d a t e = P er man e n tR u l e
需要支持撤銷、衝突與證據來源。
20.2 人類本身可能錯
Human correction 不等於 ground truth。
因此必須區分:
H u m a n P r e f e r e n c e HumanPreference H u man P r e f er e n ce
與:
E x t e r n a l F a c t ExternalFact E x t er na l F a c t
20.3 過度個人化
Agent 若把所有局部偏好都泛化,可能形成 memory anchoring 與共同盲點。
20.4 監控膨脹
若以訓練之名保存全部活動,會和本系列後續的內部自治原則衝突。
20.5 資料污染
若所有雲端與本地系統互相自動學習,單一錯誤可能跨系統傳播。
因此學習資料也需要:
Q u a r a n t i n e + V e r s i o n i n g + R o l l b a c k Quarantine
+
Versioning
+
Rollback Q u a r an t in e + V er s i o nin g + R o l l ba c k
21. 從資料收集到新的 AI 開發流程
傳統模型開發常見:
D a t a s e t → T r a i n i n g → D e p l o y m e n t → E v a l u a t i o n Dataset
\rightarrow
Training
\rightarrow
Deployment
\rightarrow
Evaluation D a t a se t → T r ainin g → D e pl oy m e n t → E v a l u a t i o n
HACT 所暗示的則是:
D e p l o y m e n t → I n t e r a c t i o n → T r a j e c t o r y → C o m p i l a t i o n → L e a r n i n g → N e w D e p l o y m e n t Deployment
\rightarrow
Interaction
\rightarrow
Trajectory
\rightarrow
Compilation
\rightarrow
Learning
\rightarrow
NewDeployment D e pl oy m e n t → I n t er a c t i o n → T r aj ec t or y → C o m p i l a t i o n → L e a r nin g → N e w D e pl oy m e n t
形成:
D e p l o y → C o l l a b o r a t e → O b s e r v e → C o r r e c t → C o m p i l e → I m p r o v e \boxed{
Deploy
\rightarrow
Collaborate
\rightarrow
Observe
\rightarrow
Correct
\rightarrow
Compile
\rightarrow
Improve
} D e pl oy → C o l l ab or a t e → O b ser v e → C or r ec t → C o m p i l e → I m p r o v e
部署不再只是訓練完成之後的終點。
真實合作環境本身變成:
Data Generator + Evaluator + Curriculum Source \text{Data Generator}
+
\text{Evaluator}
+
\text{Curriculum Source} Data Generator + Evaluator + Curriculum Source
這正是發展式智能體後續能成立的重要前提。
22. 與下一篇的連接:為什麼溝通其實是在裁剪搜尋空間
當多次合作被保存為:
τ 1 , τ 2 , … , τ n \tau_1,\tau_2,\ldots,\tau_n τ 1 , τ 2 , … , τ n
並抽象成:
M n , R n , Π n M_n,
R_n,
\Pi_n M n , R n , Π n
下一次 Agent 不再需要從所有可能解釋與所有可能行動重新搜尋。
原本:
Ω 0 \Omega_0 Ω 0
經過共同歷史後變成:
Ω n = Ω 0 ∩ C i n t e n t ∩ C h i s t o r y ∩ C a u t h o r i t y ∩ C l e a r n e d − r u l e s \Omega_n
=
\Omega_0
\cap
C_{intent}
\cap
C_{history}
\cap
C_{authority}
\cap
C_{learned-rules} Ω n = Ω 0 ∩ C in t e n t ∩ C hi s t or y ∩ C a u t h or i t y ∩ C l e a r n e d − r u l es
因此通常:
∣ Ω n ∣ < ∣ Ω 0 ∣ |\Omega_n|<|\Omega_0| ∣ Ω n ∣ < ∣ Ω 0 ∣
這使我們可以把「溝通、修正與共同記憶」重新理解為一種計算性的搜尋空間約束。
下一篇將正式回到既有 P/NP—認知研究線,討論:
人機合作真正提高效率的原因之一,是否不是單純增加算力,而是不斷減少未來需要重新搜尋的可能世界?
結論
對長期 Agent 而言,真正稀缺的資料不再只是更多問答對,而是高品質的互動歷史。
本文的核心主張可以壓縮為:
T r a i n i n g U n i t : ( x , y ) → τ \boxed{
Training\ Unit:
(x,y)
\rightarrow
\tau
} T r ainin g U ni t : ( x , y ) → τ
但這個 τ \tau τ 不應只是 AI 自己的工具軌跡,而是:
τ = I n t e n t + I n t e r p r e t a t i o n + A c t i o n + E f f e c t + V e r i f i c a t i o n + C o r r e c t i o n + R o l l b a c k + M e m o r y D e l t a + P o l i c y D e l t a \boxed{
\tau=
Intent
+
Interpretation
+
Action
+
Effect
+
Verification
+
Correction
+
Rollback
+
MemoryDelta
+
PolicyDelta
} τ = I n t e n t + I n t er p r e t a t i o n + A c t i o n + E f f ec t + V er i f i c a t i o n + C or r ec t i o n + R o l l ba c k + M e m or y D e l t a + P o l i cy D e l t a
因此:
最終答案告訴模型「這次最後得到什麼」;合作軌跡則告訴智能體「我們是如何共同發現什麼才算正確,以及下次應該怎麼少走一些錯路」。
這使日常人機合作不再只是使用 AI 的消耗過程,而可以成為一種持續生成、持續編譯、持續校正的智能資料生產方法。
參考資料
[1] Ross, S., Gordon, G. J., & Bagnell, J. A. (2011). A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning . AISTATS / PMLR 15, 627–635.https://proceedings.mlr.press/v15/ross11a.html
[2] OpenAI. (2023). Improving mathematical reasoning with process supervision .https://openai.com/index/improving-mathematical-reasoning-with-process-supervision/
[3] Wu, S. et al. (2026). Large-Scale Terminal Agentic Trajectory Generation from Dockerized Environments (TerminalTraj) . arXiv:2602.01244.https://arxiv.org/abs/2602.01244
[4] Yang, S. et al. (2026). What Makes Interaction Trajectories Effective for Training Terminal Agents? arXiv:2606.03461.https://arxiv.org/abs/2606.03461
[5] Ma, M. et al. (2026). From Patches to Trajectories: Privileged Process Supervision for Software-Engineering Agents . Microsoft Research / arXiv.https://www.microsoft.com/en-us/research/publication/from-patches-to-trajectories-privileged-process-supervision-for-software-engineering-agents/
[6] Su, Q. et al. (2026). ACC: Compiling Agent Trajectories for Long-Context Training . arXiv:2605.21850.https://arxiv.org/abs/2605.21850
[7] OpenAI. (2026). Safety and alignment in an era of long-horizon models .https://openai.com/index/safety-alignment-long-horizon-models/
系列位置
01 驗證反轉 → 02 人機共適應 → 03 合作軌跡資料 → 04 協作搜尋空間壓縮 01\ \text{驗證反轉}
\rightarrow
02\ \text{人機共適應}
\rightarrow
\boxed{03\ \text{合作軌跡資料}}
\rightarrow
04\ \text{協作搜尋空間壓縮} 01 驗證反轉 → 02 人機共適應 → 03 合作軌跡資料 → 04 協作搜尋空間壓縮
本文完成後,系列的第一部已從「為什麼不能只看 Agent 能力」推進到「人機共同工作如何直接產生新的學習資料」。下一篇將把這些軌跡與共同規則重新放回 P/NP—認知類比框架,研究它們如何壓縮未來的有效搜尋空間。