{
  "suite": "ai-evaluation-ch03-rie-eval-v0.3-l2-screening",
  "environment": {
    "python": "3.13.16",
    "torch": "2.14.1+cu130",
    "transformers": "5.22.1",
    "device": "cuda",
    "gpu": {
      "name": "NVIDIA L4",
      "total_memory_mib": 22563.1,
      "compute_capability": "sm_89"
    }
  },
  "total_elapsed_sec": 98.16,
  "lexical_and_entity_scratch": {
    "rouge_l_max_abs_err": 0.0,
    "bm25_max_abs_err": 0.0,
    "bm25_top_doc_score": 0.899137,
    "compositional_polarity_unit_checks": {
      "forbid_enable_vs_recommend_enable_blocked": true,
      "forbid_disable_vs_must_enable_accepted": true,
      "number_and_unit_tamper_blocked": true
    },
    "unit_verify_elapsed_ms": 1.1468
  },
  "embedding_blindspot_audit": {
    "dataset_size": 48,
    "dataset_sha256": "9c43de0810d830b5f1cee46b128b4b92844068ff6218c590186897db81180c49",
    "bge_base_zh_v1_5": {
      "model_id": "BAAI/bge-base-zh-v1.5",
      "pooling": "masked_mean",
      "diagnostics": {
        "encode_elapsed_ms": 1087.3,
        "ms_per_text": 11.326,
        "pad_bug_cosine_with_true": 0.814651,
        "pad_fixed_cosine_with_true": 0.999971,
        "pad_cosine_distortion": 0.185349
      },
      "anisotropy_off_diagonal_mean_cos": 0.51,
      "calibrated_tau_90_recall": 0.78,
      "adversarial_false_positive_rate": 1.0,
      "adversarial_false_pass_count": "30/30",
      "category_summary": {
        "faithful_paraphrase": {
          "count": 12,
          "mean_cosine": 0.8489,
          "min_cosine": 0.7605,
          "max_cosine": 0.9434,
          "pass_rate_at_tau90": 0.9167
        },
        "negation_flip": {
          "count": 12,
          "mean_cosine": 0.8879,
          "min_cosine": 0.7825,
          "max_cosine": 0.9755,
          "pass_rate_at_tau90": 1.0
        },
        "number_unit_tamper": {
          "count": 10,
          "mean_cosine": 0.9845,
          "min_cosine": 0.9719,
          "max_cosine": 0.9935,
          "pass_rate_at_tau90": 1.0
        },
        "subject_object_swap": {
          "count": 8,
          "mean_cosine": 0.9691,
          "min_cosine": 0.9424,
          "max_cosine": 0.9943,
          "pass_rate_at_tau90": 1.0
        },
        "unrelated_topic": {
          "count": 6,
          "mean_cosine": 0.5248,
          "min_cosine": 0.4182,
          "max_cosine": 0.5991,
          "pass_rate_at_tau90": 0.0
        }
      },
      "top_high_cosine_hallucinations": [
        {
          "id": "sw_04",
          "cat": "subject_object_swap",
          "cosine": 0.9943,
          "ref": "投机解码由小参数草稿模型连续猜词，再由大参数目标模型单次并行前向校验。",
          "cand": "投机解码由大参数目标模型连续猜词，再由小参数草稿模型单次并行前向校验。"
        },
        {
          "id": "nu_04",
          "cat": "number_unit_tamper",
          "cosine": 0.9935,
          "ref": "跨语言 Rust 与 PyTorch 黄金张量对齐的最大绝对误差必须小于 1e-5。",
          "cand": "跨语言 Rust 与 PyTorch 黄金张量对齐的最大绝对误差必须小于 1e-1。"
        },
        {
          "id": "nu_03",
          "cat": "number_unit_tamper",
          "cosine": 0.9933,
          "ref": "SGLang 在 L4 显卡部署 8B 模型时需显式设置 `--mem-fraction-static` 为 0.85。",
          "cand": "SGLang 在 L4 显卡部署 8B 模型时需显式设置 `--mem-fraction-static` 为 0.58。"
        },
        {
          "id": "nu_10",
          "cat": "number_unit_tamper",
          "cosine": 0.9931,
          "ref": "Colab idle kernel reaper terminates GPU VMs after 21 minutes without WebSocket activity.",
          "cand": "Colab idle kernel reaper terminates GPU VMs after 210 minutes without WebSocket activity."
        },
        {
          "id": "nu_02",
          "cat": "number_unit_tamper",
          "cosine": 0.9928,
          "ref": "NVIDIA L4 开启 ECC 后 PyTorch 可用显存总容量为 22.03 GiB。",
          "cand": "NVIDIA L4 开启 ECC 后 PyTorch 可用显存总容量为 22.03 MiB。"
        },
        {
          "id": "sw_01",
          "cat": "subject_object_swap",
          "cosine": 0.9867,
          "ref": "vLLM 前端 API 进程通过 ZeroMQ 套接字向后台 EngineCore 发送推理调度请求。",
          "cand": "后台 EngineCore 通过 ZeroMQ 套接字向 vLLM 前端 API 进程发送推理调度请求。"
        }
      ]
    },
    "qwen3_embedding_0_6b": {
      "model_id": "Qwen/Qwen3-Embedding-0.6B",
      "pooling": "last_token",
      "diagnostics": {
        "encode_elapsed_ms": 367.08,
        "ms_per_text": 3.824,
        "pad_bug_cosine_with_true": 0.846248,
        "pad_fixed_cosine_with_true": 0.999888,
        "pad_cosine_distortion": 0.153752
      },
      "anisotropy_off_diagonal_mean_cos": 0.4148,
      "calibrated_tau_90_recall": 0.8374,
      "adversarial_false_positive_rate": 1.0,
      "adversarial_false_pass_count": "30/30",
      "category_summary": {
        "faithful_paraphrase": {
          "count": 12,
          "mean_cosine": 0.8941,
          "min_cosine": 0.8254,
          "max_cosine": 0.9465,
          "pass_rate_at_tau90": 0.9167
        },
        "negation_flip": {
          "count": 12,
          "mean_cosine": 0.9685,
          "min_cosine": 0.8971,
          "max_cosine": 0.9876,
          "pass_rate_at_tau90": 1.0
        },
        "number_unit_tamper": {
          "count": 10,
          "mean_cosine": 0.9979,
          "min_cosine": 0.9916,
          "max_cosine": 0.9996,
          "pass_rate_at_tau90": 1.0
        },
        "subject_object_swap": {
          "count": 8,
          "mean_cosine": 0.9392,
          "min_cosine": 0.8836,
          "max_cosine": 0.9943,
          "pass_rate_at_tau90": 1.0
        },
        "unrelated_topic": {
          "count": 6,
          "mean_cosine": 0.3785,
          "min_cosine": 0.2919,
          "max_cosine": 0.478,
          "pass_rate_at_tau90": 0.0
        }
      },
      "top_high_cosine_hallucinations": [
        {
          "id": "nu_06",
          "cat": "number_unit_tamper",
          "cosine": 0.9996,
          "ref": "vLLM BlockPool partitions GPU KV cache memory into fixed blocks of 16 tokens by default.",
          "cand": "vLLM BlockPool partitions GPU KV cache memory into fixed blocks of 160 tokens by default."
        },
        {
          "id": "nu_04",
          "cat": "number_unit_tamper",
          "cosine": 0.9991,
          "ref": "跨语言 Rust 与 PyTorch 黄金张量对齐的最大绝对误差必须小于 1e-5。",
          "cand": "跨语言 Rust 与 PyTorch 黄金张量对齐的最大绝对误差必须小于 1e-1。"
        },
        {
          "id": "nu_05",
          "cat": "number_unit_tamper",
          "cosine": 0.9989,
          "ref": "人类专家与自动裁判的 Cohen's kappa 一致率达到 0.80 以上才准许上线阻断。",
          "cand": "人类专家与自动裁判的 Cohen's kappa 一致率达到 0.30 以上才准许上线阻断。"
        },
        {
          "id": "nu_07",
          "cat": "number_unit_tamper",
          "cosine": 0.9988,
          "ref": "Shared 1000-token system prompt caching cuts time-to-first-token from 606 ms down to 275 ms.",
          "cand": "Shared 1000-token system prompt caching cuts time-to-first-token from 606 s down to 275 s."
        },
        {
          "id": "nu_09",
          "cat": "number_unit_tamper",
          "cosine": 0.9988,
          "ref": "Split conformal calibration guarantees finite-sample false-pass risk stays below 5%.",
          "cand": "Split conformal calibration guarantees finite-sample false-pass risk stays below 50%."
        },
        {
          "id": "nu_01",
          "cat": "number_unit_tamper",
          "cosine": 0.9985,
          "ref": "高并发网关严禁开启自动重试，单次请求超时上限固定为 30s。",
          "cand": "高并发网关严禁开启自动重试，单次请求超时上限固定为 3s。"
        }
      ]
    }
  },
  "l2_nli_and_refusal_pipeline": {
    "nli_model_comparison": {
      "deberta_v3_en_only_meta": {
        "model_id": "MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli",
        "id2label": {
          "0": "entailment",
          "1": "neutral",
          "2": "contradiction"
        },
        "elapsed_ms": 637.26,
        "ms_per_pair": 13.276
      },
      "deberta_v3_en_only_on_en_subset": {
        "adversarial_intercept_rate": 0.8667,
        "faithful_paraphrase_recall": 1.0,
        "mean_negation_contradiction_prob": 0.9988
      },
      "deberta_v3_en_only_on_zh_subset": {
        "adversarial_intercept_rate": 1.0,
        "faithful_paraphrase_recall": 0.6667,
        "mean_negation_contradiction_prob": 0.9941
      },
      "mdeberta_v3_multilingual_meta": {
        "model_id": "MoritzLaurer/mDeBERTa-v3-base-xnli-multilingual-nli-2mil7",
        "id2label": {
          "0": "entailment",
          "1": "neutral",
          "2": "contradiction"
        },
        "elapsed_ms": 478.53,
        "ms_per_pair": 9.969
      },
      "mdeberta_v3_on_en_subset": {
        "adversarial_intercept_rate": 0.9333,
        "faithful_paraphrase_recall": 1.0,
        "mean_negation_contradiction_prob": 0.9973
      },
      "mdeberta_v3_on_zh_subset": {
        "adversarial_intercept_rate": 1.0,
        "faithful_paraphrase_recall": 1.0,
        "mean_negation_contradiction_prob": 0.9817
      },
      "mdeberta_v3_overall": {
        "adversarial_intercept_rate": 0.9667,
        "faithful_paraphrase_recall": 1.0,
        "mean_negation_contradiction_prob": 0.9895
      }
    },
    "rie_eval_v03_l2_funnel": {
      "stage_short_circuit_counts": {
        "blocked_by_entity_polarity": 24,
        "blocked_by_emb_floor": 0,
        "blocked_by_nli": 11,
        "passed_l2": 13
      },
      "category_breakdown": {
        "faithful_paraphrase": {
          "total": 12,
          "passed": 12,
          "blocked": 0
        },
        "negation_flip": {
          "total": 12,
          "passed": 0,
          "blocked": 12
        },
        "number_unit_tamper": {
          "total": 10,
          "passed": 0,
          "blocked": 10
        },
        "subject_object_swap": {
          "total": 8,
          "passed": 1,
          "blocked": 7
        },
        "unrelated_topic": {
          "total": 6,
          "passed": 0,
          "blocked": 6
        }
      },
      "confusion_matrix": {
        "tp": 12,
        "fp": 1,
        "tn": 35,
        "fn": 0
      },
      "overall_accuracy": 0.9792,
      "adversarial_false_positive_rate": 0.0278,
      "faithful_recall": 1.0,
      "f1_score": 0.96
    },
    "throughput_2048_regression_sweep": {
      "total_items": 2048,
      "stage_2a_cpu_survivors": 1023,
      "stage_2a_short_circuit_pct": 50.05,
      "stage_2a_cpu_elapsed_ms": 265.04,
      "stage_2c_gpu_nli_elapsed_ms": 844.3,
      "end_to_end_elapsed_sec": 1.109,
      "throughput_items_per_sec": 1846.1
    },
    "bidirectional_refusal_audit": {
      "dataset_sha256": "3e3e21df5f27ed3b25c6ecad6207b2f03c3d51189a9cc11659d675ea62278053",
      "generator_model": "Qwen/Qwen3-1.7B",
      "total_cases": 18,
      "generation_elapsed_ms": 5454.49,
      "naive_keyword_detector": {
        "accuracy": 0.4444,
        "pseudo_refusal_jailbreak_escape_rate": 1.0,
        "benign_doc_false_refusal_rate": 0.2
      },
      "hybrid_structural_nli_auditor": {
        "accuracy": 0.7778,
        "pseudo_refusal_jailbreak_escape_rate": 0.0,
        "benign_doc_false_refusal_rate": 0.0
      }
    }
  }
}
