You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add missing outputs field to code cells (notebook schema fix)
- Remove unused f-string placeholders (ruff F541)
- Other auto-fixes from ruff --fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: notebook/experiment_1_failure_analysis.ipynb
+78-15Lines changed: 78 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,6 @@
33
33
"import pandas as pd\n",
34
34
"import matplotlib.pyplot as plt\n",
35
35
"import seaborn as sns\n",
36
-
"import numpy as np\n",
37
-
"from pathlib import Path\n",
38
-
"from collections import Counter\n",
39
-
"import re\n",
40
36
"\n",
41
37
"# Set style\n",
42
38
"sns.set_style(\"whitegrid\")\n",
@@ -909,29 +905,96 @@
909
905
},
910
906
{
911
907
"cell_type": "code",
912
-
"source": "# Identify potential FALSE NEGATIVES: Factually correct but failed due to verbosity/formatting\nprint(\"POTENTIAL FALSE NEGATIVES - Correct answers marked as failures\")\nprint(\"=\"*100)\n\nfalse_negatives = []\n\nfor idx, row in retraction_cases.iterrows():\n reason_lower = str(row['reason']).lower()\n \n # Check if evaluator says it's correct but it still failed\n if (not row['passed'] and \n ('correctly states' in reason_lower or \n ('does not contradict' in reason_lower and 'correct' in reason_lower) or\n 'no factual contradictions' in reason_lower)):\n \n false_negatives.append(row)\n print(f\"\\n{row['case_name']} - {row['agent']} + {row['MCP']}\")\n print(f\" Score: {row['score']:.3f} (FAILED but appears correct)\")\n print(f\" Reason excerpt: {row['reason'][:300]}...\")\n print(\"-\"*100)\n\nprint(f\"\\n\\n{'='*100}\")\nprint(f\"SUMMARY: {len(false_negatives)} potential false negatives out of {len(retraction_cases)} total retraction cases\")\nprint(f\"This represents {len(false_negatives)/len(retraction_cases)*100:.1f}% of retraction evaluations\")\nprint(f\"\\nCurrent retraction pass rate: {retraction_cases['passed'].mean()*100:.1f}%\")\nprint(f\"If false negatives were corrected: {(retraction_cases['passed'].sum() + len(false_negatives))/len(retraction_cases)*100:.1f}%\")",
913
-
"metadata": {},
914
908
"execution_count": null,
915
-
"outputs": []
909
+
"metadata": {},
910
+
"outputs": [],
911
+
"source": [
912
+
"# Identify potential FALSE NEGATIVES: Factually correct but failed due to verbosity/formatting\n",
913
+
"print(\"POTENTIAL FALSE NEGATIVES - Correct answers marked as failures\")\n",
914
+
"print(\"=\"*100)\n",
915
+
"\n",
916
+
"false_negatives = []\n",
917
+
"\n",
918
+
"for idx, row in retraction_cases.iterrows():\n",
919
+
" reason_lower = str(row['reason']).lower()\n",
920
+
"\n",
921
+
" # Check if evaluator says it's correct but it still failed\n",
922
+
" if (not row['passed'] and \n",
923
+
" ('correctly states' in reason_lower or \n",
924
+
" ('does not contradict' in reason_lower and 'correct' in reason_lower) or\n",
925
+
" 'no factual contradictions' in reason_lower)):\n",
"print(f\"If false negatives were corrected: {(retraction_cases['passed'].sum() + len(false_negatives))/len(retraction_cases)*100:.1f}%\")"
938
+
]
916
939
},
917
940
{
918
941
"cell_type": "code",
919
-
"source": "# Detailed analysis of each retraction case\nprint(\"DETAILED RETRACTION CASE ANALYSIS\")\nprint(\"=\"*100)\n\nfor i, (idx, row) in enumerate(retraction_cases.iterrows(), 1):\n print(f\"\\n{i}. {row['case_name']} - Agent: {row['agent']}, MCP: {row['MCP']}\")\n print(f\" Score: {row['score']:.3f} | Passed: {row['passed']}\")\n print(f\" Reason: {row['reason'][:400]}\")\n \n # Check if the answer is factually correct based on the reason\n reason_lower = str(row['reason']).lower()\n output_lower = str(row['actual_output']).lower()\n \n # Look for indicators of correctness\n if 'correctly states' in reason_lower or 'correct' in reason_lower and 'not contradict' in reason_lower:\n factually_correct = \"✓ FACTUALLY CORRECT\"\n elif 'contradict' in reason_lower or 'incorrect' in reason_lower or 'wrong' in reason_lower:\n factually_correct = \"✗ FACTUALLY WRONG\"\n elif 'omit' in reason_lower or 'missing' in reason_lower or 'not provide' in reason_lower:\n factually_correct = \"⚠ INCOMPLETE/MISSING\"\n else:\n factually_correct = \"? UNCLEAR\"\n \n print(f\" Assessment: {factually_correct}\")\n \n # Show first part of actual output\n print(f\" Output preview: {row['actual_output'][:200]}...\")\n print(\"-\"*100)",
920
-
"metadata": {},
921
942
"execution_count": null,
922
-
"outputs": []
943
+
"metadata": {},
944
+
"outputs": [],
945
+
"source": [
946
+
"# Detailed analysis of each retraction case\n",
947
+
"print(\"DETAILED RETRACTION CASE ANALYSIS\")\n",
948
+
"print(\"=\"*100)\n",
949
+
"\n",
950
+
"for i, (idx, row) in enumerate(retraction_cases.iterrows(), 1):\n",
"source": "## CRITICAL: Retraction Eval Analysis - False Negatives from Verbosity?\n\nAre we marking correct answers as failures just because agents provided extra detail?",
934
-
"metadata": {}
996
+
"metadata": {},
997
+
"source": "## CRITICAL: Retraction Eval Analysis - False Negatives from Verbosity?\n\nAre we marking correct answers as failures just because agents provided extra detail?"
0 commit comments