Skip to main content

apply_gating_to_answers

Function apply_gating_to_answers 

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

複数質問の判定結果マップに対し、ゲーティング判定を一括適用し集約サマリーを算出する。

各回答にゲーティングメタデータを付与し、有効な場合は SystemRoutingSummary を返却する。

§引数

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

§戻り値

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