Skip to main content

apply_gating_to_answers_with_logits

Function apply_gating_to_answers_with_logits 

Source
pub fn apply_gating_to_answers_with_logits(
    answers: &mut IndexMap<String, Answer>,
    logits_map: &IndexMap<String, Vec<f64>>,
    state: Option<&str>,
    questions: &IndexMap<String, Question>,
    gating_config: Option<&GatingConfig>,
    calib_config: &CalibrationConfig,
) -> Option<SystemRoutingSummary>
Expand description

複数質問の判定結果マップに対し、ロジット配列を用いたエネルギー付きゲーティング判定を一括適用する。

各回答にゲーティングメタデータ (および OOD 診断) を付与し、有効な場合は SystemRoutingSummary を返却する。

§引数

  • answers: 判定結果マップ (可変参照)。
  • logits_map: 各質問のロジット配列マップ。
  • state: 共通の文脈テキスト (任意)。
  • questions: 質問定義マップ。
  • gating_config: 明示的なゲーティング設定 (任意)。
  • calib_config: モデルのキャリブレーション設定。

§戻り値

ゲーティングが有効な場合は Some(SystemRoutingSummary)、無効な場合は None。