Spaces:
Running
Running
File size: 865 Bytes
6b6557c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | """
eval/inspect_rows.py
One-off diagnostic: dump full raw records for specific row ids from both
golden_eval_results.jsonl and golden_sample.csv, to inspect the row_0060/
row_0061 hallucination flagged by LLM-as-Judge.
"""
import json
import csv
TARGET_IDS = {"row_0060", "row_0061"}
print("=== golden_eval_results.jsonl ===")
with open("eval/golden_eval_results.jsonl", encoding="utf-8") as f:
for line in f:
row = json.loads(line)
if row.get("id") in TARGET_IDS:
print(json.dumps(row, indent=2, ensure_ascii=False))
print("---")
print("\n=== golden_sample.csv ===")
with open("eval/golden_sample.csv", encoding="utf-8") as f:
for row in csv.DictReader(f):
if row["id"] in TARGET_IDS:
print(f"{row['id']} | label: {row['label']}")
print(row["text"][:300])
print("---") |