{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "plaintext" } }, "outputs": [], "source": [ "\n", " import json\n", "\n", " # Load the JSON file\n", " file_path = 'your_file.json'\n", " with open(file_path, 'r') as f:\n", " data = json.load(f)\n", "\n", " # The structure contains:\n", " # - data[0]: The evaluation question\n", " # - data[1-3]: Three evaluation rounds with different complexity levels\n", " # - data[4]: Final analysis and summary\n", " # - data[5]: Full chat history\n", "\n", " # Extract evaluation results\n", " question = data[0]\n", " evaluations = []\n", "\n", " for item in data[1:4]: # The three evaluation rounds\n", " eval_info = {\n", " 'sub_aspect': item['Sub-aspect'],\n", " 'tool': item['Tool'],\n", " 'thought': item['Thought'],\n", " 'average_score': item['eval_results']['score'][0],\n", " 'detailed_results': item['eval_results']['score'][1]\n", " }\n", " evaluations.append(eval_info)\n", "\n", " # Extract individual video scores\n", " for eval_round in evaluations:\n", " print(f\"\\n{eval_round['sub_aspect']}:\")\n", " for video in eval_round['detailed_results']:\n", " print(f\" {video['prompt']}: {video['video_results']:.4f}\")\n", "\n", " # Get final analysis (if present)\n", " if isinstance(data[4], dict) and 'Analysis' in data[4]:\n", " final_analysis = data[4]['Analysis']\n", " summary = data[4]['Summary']" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }