EvalPlanner:基于“計劃-執行”雙階段的大語言模型評估框架
大語言模型(LLM)評估系統在生成思維鏈(Chain-of-Thought, CoT)序列時,需要系統地捕捉評估過程中的推理步驟。但是由于缺乏人工標注的CoT訓練數據,以及預定義評估提示在復雜任務中的局限性,構建高質量的LLM評估模型面臨重大挑戰。另外手動調整評估指令的方法在面對多樣化和復雜任務時表現出明顯的局限性。
為應對這些挑戰,研究團隊提出了EvalPlanner[1],這是一種創新的LLM評估算法。該算法采用計劃-執行的雙階段范式,首先生成無約束的評估計劃,隨后執行該計劃并做出最終判斷。這種方法顯著提升了評估過程的系統性和可靠性。
核心方法論
系統架構
EvalPlanner的架構包含三個核心組件,如下圖所示:
具體來說,系統包含以下關鍵要素:
a) 評估計劃(z)
- 基于輸入指令x,系統制定具體的響應評估策略
- 計劃設計注重靈活性和通用性
b) 計劃執行模塊
- 依序執行評估計劃的各個步驟
- 分析目標響應a和b,生成詳細的評估結果
c) 最終判決(y)
- 在評判LLM(參數θ)的框架下,將計劃z和執行e作為潛變量
- 判決生成過程可表述為:
工作流程
系統的整體工作流程如下圖所示:
主要步驟包括:
- 從分布P中采樣多個評估計劃z
- 對每個計劃,從分布E中采樣多個執行路徑e
- 通過自訓練循環優化計劃和執行過程
- 在測試階段,模型生成結構化的CoT輸出:? = (z?, ?, ?)
訓練數據生成方法
提示詞選擇與響應對生成
系統采用兩類核心任務領域:
- 通用指令執行任務
a.通過對原始指令引入噪聲生成對比樣本
b.原始指令響應作為正例,噪聲指令響應作為負例
- 數學推理任務
- 采樣多個候選響應
- 正確解答作為正例,錯誤解答作為負例
評估計劃生成
系統采用通用且無約束的計劃生成提示模板,該模板僅基于輸入指令查詢經過指令調優的LLM以獲取初始計劃。提示模板的核心內容如下:
We want to evaluate the quality of the responses provided by AI assistants to
the user question displayed below. For that, your task is to help us build an
evaluation plan that can then be executed to assess the response quality.
Whenever appropriate, you can choose to also include a step-by-step reference
answer as part of the evaluation plan. Enclose your evaluation plan between
the tags “[Start of Evaluation Plan]” and “[End of Evaluation Plan]”.
[User Question]
{instruction}
計劃執行生成
計劃執行階段采用種子模型,結合指令和響應對,基于生成的計劃進行推理并產生判決。
Please act as an impartial judge and evaluate the quality of the responses
provided by two AI assistants to the user question displayed below. You
should choose the assistant that follows the user’s instructions and answers
the user’s question better. Your evaluation should consider factors such as
the helpfulness, relevance, accuracy,depth, creativity, and level of detail
of their responses. Begin your evaluation by comparing the two responses and
provide a short explanation. Avoid any position biases and ensure that the
order in which the responses were presented does not influence your decision.
Do not allow the length of the responses to influence your evaluation. Do not
favor certain names of the assistants. Be as objective as possible. After
providing your explanation, output your final verdict by strictly following
this format: “[[A]]” if assistant A is better, “[[B]]” if assistant B is better.
[[User Question]]
{instruction}
[The Start of Assistant A’s Answer]
{response A}
[The End of Assistant A’s Answer]
[The Start of Assistant B’s Answer]
{response B}
[The End of Assistant B’s Answer]
這種分離式架構具有兩個主要優勢:
- 確保執行過程嚴格遵循預定計劃
- 通過對同一計劃采樣多個執行路徑,增加評估數據的多樣性
構建計劃-執行偏好對
對于每個輸入指令:
- 采樣|P|個計劃
- 每個計劃采樣|E|個執行路徑
- 考慮響應對的兩種順序(a,b)和(b,a),總共生成2×|P|×|E|個CoT序列
計劃與執行的優化策略
系統采用自訓練循環進行優化,主要包含以下步驟:
初始監督微調(SFT)
- 從種子模型M?開始
- 在正確思維子集D??上進行微調
- 得到模型M????
第一輪直接偏好優化(DPO)
- 以M????為基礎
- 在包含正確與錯誤思維的數據集D?上執行DPO
- 得到模型M????
第二輪直接偏好優化(DPO)
- 以M????為基礎
- 在新的指令和響應對子集D?上執行DPO
- 得到最終模型M????
實驗設置與評估
訓練數據構建
- WildChat數據集:使用自學習評估器生成綜合響應
- MATH數據集:通過Mixtral 22Bx8 Instruct模型生成多個候選解答
實驗配置
訓練數據規模:
- WildChat: 17,588個獨特三元組
- MATH: 4,141個獨特三元組
采樣參數:
- 每次迭代5個計劃
- 每個計劃8個執行路徑(每種順序4個)
- 溫度參數0.8,top_p值0.95
基準比較
模型性能與多個基準系統進行對比:
- 零樣本評估的開源和閉源LLM
- 具有評論功能的獎勵模型
- RewardBench排行榜上的領先模型
實驗結果與分析
性能優勢
EvalPlanner展現出顯著的性能優勢:
- 在較少訓練數據的情況下超越所有基準系統
- 為生成式獎勵模型創造新的性能記錄
- 在多個種子模型上展示方法的普適性
數據效率
系統表現出優異的數據效率:
- 僅使用5K偏好對即達到92.3的性能分數
- 通過迭代DPO進一步提升至93.9
- 相比單次DPO迭代(92.5)取得明顯進步
泛化能力
在多個評估基準上驗證了系統的泛化能力:
- FollowBenchEval:在多層次約束評估中超越基準13%
- RM-Bench:展示出對內容變化的強大魯棒性
- JudgeBench:在多類別挑戰性問題上保持競爭力
總結
EvalPlanner通過創新的計劃-執行范式,成功解決了LLM評估模型面臨的核心挑戰。系統在多個基準測試中的出色表現,證實了該方法在構建高效、穩健的評估模型方面的有效性。特別是在數據效率和泛化能力方面的優勢,為未來LLM評估系統的發展提供了新的研究方向。