import json def export_json(answer, evidence, weights): data = { "answer": answer, "evidence": evidence, "mote_weights": weights } file_path = "esg_output.json" with open(file_path, "w") as f: json.dump(data, f, indent=4) return file_path