pub fn evaluate_answer_gating_with_energy(
answer: &Answer,
question_id: Option<&str>,
question: Option<&Question>,
config: &GatingConfig,
energy: Option<f64>,
) -> GatingMetadataExpand description
単一の Answer に対し、自由エネルギー情報を含めて確信度ゲーティング評価を実施し、メタデータを生成する。
§概要
- 通常の確信度・マージン判定に先立ち、Energy-based OOD 安全弁 (Circuit Breaker) を評価する。
- Choice 型において正規化自由エネルギー $E_{\text{norm}}$ が
config.energy_thresholdを超過した場合、 高確信度判定をショートサーキットし、強制的にDecisionRoute::Fallbackへ降格する。
§引数
answer: 事後較正済みの判定結果。question_id: 質問識別子(プロンプト構築用、任意)。question: 質問定義(指示文やタイプ取得用、任意)。config: ゲーティング設定。energy: 算出された正規化自由エネルギー値 (任意)。
§戻り値
- 導出された
GatingMetadata。