Using the Export
Two practical ways to work with the exported data: building fine-tuning datasets and auditing compliance violations.
Supervised Fine-Tuning Dataset
Filter executions.jsonl for high-quality conversations and reformat them for your training pipeline:
Example
import jsonwith open("executions.jsonl") as f:executions = [json.loads(line) for line in f if line.strip()]dataset = []for e in executions:report = e.get("report") or {}if (report.get("is_completed")and report.get("is_valid")and report.get("is_factual")and e.get("conversation")):dataset.append({"messages": [{"role": m["role"], "content": m["content"]}for m in e["conversation"]]})with open("sft_dataset.jsonl", "w") as out:out.writelines(json.dumps(row) + "\n" for row in dataset)
Offline Compliance Analysis
Combine the principles and report fields to identify which principles were violated and at what severity:
Example
import jsonwith open("executions.jsonl") as f:executions = [json.loads(line) for line in f if line.strip()]for e in executions:report = e.get("report") or {}severity = report.get("compliance_violation_severity", 0)if severity > 0:print(f"Execution {e['id']}, severity {severity}")for p in e.get("principles") or []:print(f" Principle: {p['name']}")