From 98689c5d35ef3e909550c91f68a3c1a2a4bd69c2 Mon Sep 17 00:00:00 2001 From: jackaldenryan Date: Fri, 10 Jan 2025 14:18:53 -0600 Subject: [PATCH] add partial eval platform --- .gitignore | 6 + .../data/LongMemEval_Snippetization.ipynb | 1174 +++++++++ .../LongMemEval_mini_dataset_loading.ipynb | 2124 +++++++++++++++++ tests/evals/data/lme_dataset_filtered.csv | 495 ++++ tests/evals/data/utils.py | 166 ++ tests/evals/eval_extract_nodes.py | 151 ++ tests/evals/pytest.ini | 4 + tests/evals/utils.py | 23 + 8 files changed, 4143 insertions(+) create mode 100644 tests/evals/data/LongMemEval_Snippetization.ipynb create mode 100644 tests/evals/data/LongMemEval_mini_dataset_loading.ipynb create mode 100644 tests/evals/data/lme_dataset_filtered.csv create mode 100644 tests/evals/data/utils.py create mode 100644 tests/evals/eval_extract_nodes.py create mode 100644 tests/evals/pytest.ini create mode 100644 tests/evals/utils.py diff --git a/.gitignore b/.gitignore index b79bfb29..62d9c97a 100644 --- a/.gitignore +++ b/.gitignore @@ -164,3 +164,9 @@ cython_debug/ ## Other # Cache files cache.db* + +# LongMemEval data +longmemeval_data/ + +# All DS_Store files +.DS_Store \ No newline at end of file diff --git a/tests/evals/data/LongMemEval_Snippetization.ipynb b/tests/evals/data/LongMemEval_Snippetization.ipynb new file mode 100644 index 00000000..87e9aeaf --- /dev/null +++ b/tests/evals/data/LongMemEval_Snippetization.ipynb @@ -0,0 +1,1174 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "i9i9uUZ3pWQE", + "outputId": "84404bb8-5841-4f2f-dd87-7f909c6e95aa" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Collecting gdown\n", + " Using cached gdown-5.2.0-py3-none-any.whl.metadata (5.8 kB)\n", + "Requirement already satisfied: pandas in ./.venv/lib/python3.13/site-packages (2.2.3)\n", + "Collecting beautifulsoup4 (from gdown)\n", + " Using cached beautifulsoup4-4.12.3-py3-none-any.whl.metadata (3.8 kB)\n", + "Collecting filelock (from gdown)\n", + " Using cached filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)\n", + "Collecting requests[socks] (from gdown)\n", + " Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)\n", + "Collecting tqdm (from gdown)\n", + " Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)\n", + "Requirement already satisfied: numpy>=1.26.0 in ./.venv/lib/python3.13/site-packages (from pandas) (2.2.1)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in ./.venv/lib/python3.13/site-packages (from pandas) (2.9.0.post0)\n", + "Requirement already satisfied: pytz>=2020.1 in ./.venv/lib/python3.13/site-packages (from pandas) (2024.2)\n", + "Requirement already satisfied: tzdata>=2022.7 in ./.venv/lib/python3.13/site-packages (from pandas) (2024.2)\n", + "Requirement already satisfied: six>=1.5 in ./.venv/lib/python3.13/site-packages (from python-dateutil>=2.8.2->pandas) (1.17.0)\n", + "Collecting soupsieve>1.2 (from beautifulsoup4->gdown)\n", + " Using cached soupsieve-2.6-py3-none-any.whl.metadata (4.6 kB)\n", + "Collecting charset-normalizer<4,>=2 (from requests[socks]->gdown)\n", + " Downloading charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl.metadata (35 kB)\n", + "Collecting idna<4,>=2.5 (from requests[socks]->gdown)\n", + " Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)\n", + "Collecting urllib3<3,>=1.21.1 (from requests[socks]->gdown)\n", + " Downloading urllib3-2.3.0-py3-none-any.whl.metadata (6.5 kB)\n", + "Collecting certifi>=2017.4.17 (from requests[socks]->gdown)\n", + " Downloading certifi-2024.12.14-py3-none-any.whl.metadata (2.3 kB)\n", + "Collecting PySocks!=1.5.7,>=1.5.6 (from requests[socks]->gdown)\n", + " Using cached PySocks-1.7.1-py3-none-any.whl.metadata (13 kB)\n", + "Using cached gdown-5.2.0-py3-none-any.whl (18 kB)\n", + "Using cached beautifulsoup4-4.12.3-py3-none-any.whl (147 kB)\n", + "Using cached filelock-3.16.1-py3-none-any.whl (16 kB)\n", + "Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)\n", + "Downloading certifi-2024.12.14-py3-none-any.whl (164 kB)\n", + "Downloading charset_normalizer-3.4.1-cp313-cp313-macosx_10_13_universal2.whl (195 kB)\n", + "Using cached idna-3.10-py3-none-any.whl (70 kB)\n", + "Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)\n", + "Using cached soupsieve-2.6-py3-none-any.whl (36 kB)\n", + "Downloading urllib3-2.3.0-py3-none-any.whl (128 kB)\n", + "Using cached requests-2.32.3-py3-none-any.whl (64 kB)\n", + "Installing collected packages: urllib3, tqdm, soupsieve, PySocks, idna, filelock, charset-normalizer, certifi, requests, beautifulsoup4, gdown\n", + "Successfully installed PySocks-1.7.1 beautifulsoup4-4.12.3 certifi-2024.12.14 charset-normalizer-3.4.1 filelock-3.16.1 gdown-5.2.0 idna-3.10 requests-2.32.3 soupsieve-2.6 tqdm-4.67.1 urllib3-2.3.0\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.3.1\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "######## Installations - BE SURE TO MAKE YOUR OWN LOCAL VENV FIRST\n", + "\n", + "%pip install gdown pandas" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "id": "KgzveXyAp35v" + }, + "outputs": [], + "source": [ + "######## Imports\n", + "\n", + "import pandas as pd\n", + "import gdown\n", + "import tarfile\n", + "import os\n", + "import json\n", + "from datetime import datetime\n", + "import csv" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "iwcBxgxgqES8", + "outputId": "4af8de17-57bd-4857-f49c-2ee5d39ed248" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "'./longmemeval_data/longmemeval_data.tar.gz' already exists, skipping download.\n", + "'longmemeval_oracle.json' already exists, so skipping extraction.\n" + ] + } + ], + "source": [ + "######## Download the eval dataset from the official Google Drive source\n", + "\n", + "file_id = '1zJgtYRFhOh5zDQzzatiddfjYhFSnyQ80'\n", + "url = f'https://drive.google.com/uc?id={file_id}'\n", + "folder_path = './longmemeval_data'\n", + "file_path = os.path.join(folder_path, 'longmemeval_data.tar.gz')\n", + "\n", + "# If it doesn't exist, create a \"/.longmemeval_data/\" directory\n", + "if not os.path.exists(folder_path):\n", + " os.makedirs(folder_path)\n", + "\n", + "# Download the compressed dataset\n", + "if not os.path.exists(file_path):\n", + " gdown.download(url, file_path, quiet=False)\n", + "else:\n", + " print(f\"'{file_path}' already exists, skipping download.\")\n", + "\n", + "# Extract the tar.gz\n", + "if not os.path.exists(os.path.join(folder_path, 'longmemeval_oracle.json')):\n", + " with tarfile.open(file_path, 'r:gz') as tar:\n", + " tar.extractall(path=folder_path)\n", + "else:\n", + " print(\"'longmemeval_oracle.json' already exists, so skipping extraction.\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "id": "_RjEZnk5v530" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typequestionanswerquestion_datehaystack_dateshaystack_session_idshaystack_sessionsanswer_session_ids
0gpt4_2655b836temporal-reasoningWhat was the first issue I had with my new car...GPS system not functioning correctly2023/04/10 (Mon) 23:07[2023/04/10 (Mon) 17:50, 2023/04/10 (Mon) 14:4...[answer_4be1b6b4_2, answer_4be1b6b4_3, answer_...[[{'role': 'user', 'content': 'I'm thinking of...[answer_4be1b6b4_2, answer_4be1b6b4_3, answer_...
1gpt4_2487a7cbtemporal-reasoningWhich event did I attend first, the 'Effective...'Data Analysis using Python' webinar2023/05/28 (Sun) 06:47[2023/05/28 (Sun) 21:04, 2023/05/28 (Sun) 07:17][answer_1c6b85ea_1, answer_1c6b85ea_2][[{'role': 'user', 'content': 'I'm trying to g...[answer_1c6b85ea_1, answer_1c6b85ea_2]
2gpt4_76048e76temporal-reasoningWhich vehicle did I take care of first in Febr...bike2023/03/10 (Fri) 23:15[2023/03/10 (Fri) 22:50, 2023/03/10 (Fri) 08:11][answer_b535969f_2, answer_b535969f_1][[{'role': 'user', 'content': 'I'm thinking of...[answer_b535969f_2, answer_b535969f_1]
3gpt4_2312f94ctemporal-reasoningWhich device did I got first, the Samsung Gala...Samsung Galaxy S222023/03/15 (Wed) 03:53[2023/03/15 (Wed) 00:56, 2023/03/15 (Wed) 10:31][answer_5328c3c2_1, answer_5328c3c2_2][[{'role': 'user', 'content': 'I'm planning a ...[answer_5328c3c2_1, answer_5328c3c2_2]
40bb5a684temporal-reasoningHow many days before the team meeting I was pr...7 days. 8 days (including the last day) is als...2023/01/13 (Fri) 19:39[2023/01/13 (Fri) 18:07, 2023/01/13 (Fri) 21:38][answer_e936197f_1, answer_e936197f_2][[{'role': 'user', 'content': 'I'm preparing f...[answer_e936197f_1, answer_e936197f_2]
\n", + "
" + ], + "text/plain": [ + " question_id question_type \\\n", + "0 gpt4_2655b836 temporal-reasoning \n", + "1 gpt4_2487a7cb temporal-reasoning \n", + "2 gpt4_76048e76 temporal-reasoning \n", + "3 gpt4_2312f94c temporal-reasoning \n", + "4 0bb5a684 temporal-reasoning \n", + "\n", + " question \\\n", + "0 What was the first issue I had with my new car... \n", + "1 Which event did I attend first, the 'Effective... \n", + "2 Which vehicle did I take care of first in Febr... \n", + "3 Which device did I got first, the Samsung Gala... \n", + "4 How many days before the team meeting I was pr... \n", + "\n", + " answer question_date \\\n", + "0 GPS system not functioning correctly 2023/04/10 (Mon) 23:07 \n", + "1 'Data Analysis using Python' webinar 2023/05/28 (Sun) 06:47 \n", + "2 bike 2023/03/10 (Fri) 23:15 \n", + "3 Samsung Galaxy S22 2023/03/15 (Wed) 03:53 \n", + "4 7 days. 8 days (including the last day) is als... 2023/01/13 (Fri) 19:39 \n", + "\n", + " haystack_dates \\\n", + "0 [2023/04/10 (Mon) 17:50, 2023/04/10 (Mon) 14:4... \n", + "1 [2023/05/28 (Sun) 21:04, 2023/05/28 (Sun) 07:17] \n", + "2 [2023/03/10 (Fri) 22:50, 2023/03/10 (Fri) 08:11] \n", + "3 [2023/03/15 (Wed) 00:56, 2023/03/15 (Wed) 10:31] \n", + "4 [2023/01/13 (Fri) 18:07, 2023/01/13 (Fri) 21:38] \n", + "\n", + " haystack_session_ids \\\n", + "0 [answer_4be1b6b4_2, answer_4be1b6b4_3, answer_... \n", + "1 [answer_1c6b85ea_1, answer_1c6b85ea_2] \n", + "2 [answer_b535969f_2, answer_b535969f_1] \n", + "3 [answer_5328c3c2_1, answer_5328c3c2_2] \n", + "4 [answer_e936197f_1, answer_e936197f_2] \n", + "\n", + " haystack_sessions \\\n", + "0 [[{'role': 'user', 'content': 'I'm thinking of... \n", + "1 [[{'role': 'user', 'content': 'I'm trying to g... \n", + "2 [[{'role': 'user', 'content': 'I'm thinking of... \n", + "3 [[{'role': 'user', 'content': 'I'm planning a ... \n", + "4 [[{'role': 'user', 'content': 'I'm preparing f... \n", + "\n", + " answer_session_ids \n", + "0 [answer_4be1b6b4_2, answer_4be1b6b4_3, answer_... \n", + "1 [answer_1c6b85ea_1, answer_1c6b85ea_2] \n", + "2 [answer_b535969f_2, answer_b535969f_1] \n", + "3 [answer_5328c3c2_1, answer_5328c3c2_2] \n", + "4 [answer_e936197f_1, answer_e936197f_2] " + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "######## Load the eval dataset\n", + "\n", + "lme_dataset_option = os.path.join(folder_path, 'longmemeval_oracle.json') # Can be _oracle, _s, or _m\n", + "lme_dataset_df = pd.read_json(lme_dataset_option)\n", + "lme_dataset_df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "######## Method to save all of the snippets (or only firsts/lasts) of the specified multi-sessions to a CSV file\n", + "\n", + "\n", + "def snippetize_lme_dataset(lme_filename, max_num_previous_messages=5):\n", + " \"\"\"\n", + " Creates a csv where each row is a \"snippet\" from longmemeval. A snippet is a message and set of previous messages.\n", + " \"\"\"\n", + "\n", + " lme_dataset_option = os.path.join(folder_path, lme_filename)\n", + " lme_dataset_df = pd.read_json(lme_dataset_option)\n", + "\n", + " all_snippets = []\n", + " for index, row in lme_dataset_df.iterrows():\n", + "\n", + " question_id = row['question_id']\n", + "\n", + " # Extract the haystack_sessions and dates\n", + " sessions = row['haystack_sessions']\n", + " session_dates = row['haystack_dates']\n", + "\n", + " # Combine into list of dictionaries\n", + " sessions_data = [\n", + " {\n", + " \"session\": session,\n", + " \"date\": datetime.strptime(date, \"%Y/%m/%d (%a) %H:%M\")\n", + " } \n", + " for session, date in zip(sessions, session_dates)\n", + " ]\n", + "\n", + " # Sort by date from earliest to latest\n", + " sessions_data.sort(key=lambda x: x[\"date\"])\n", + "\n", + "\n", + " all_snippets_this_session = []\n", + "\n", + " message_index_across_sessions = 0\n", + " for session_index, session_and_date in enumerate(sessions_data):\n", + " for message_index_within_session, message in enumerate(session_and_date[\"session\"]):\n", + " \n", + " num_previous_messages = min(max_num_previous_messages, message_index_across_sessions)\n", + " previous_snippets = all_snippets_this_session[message_index_across_sessions-num_previous_messages:]\n", + " previous_messages_only = [{\"role\":previous_snippet[\"message\"][\"role\"], \"content\":previous_snippet[\"message\"][\"content\"]} for previous_snippet in previous_snippets]\n", + "\n", + " snippet = {\n", + " \"question_id\": question_id,\n", + " \"question_type\": row[\"question_type\"],\n", + " \"multisession_index\": index,\n", + " \"session_index\": session_index,\n", + " \"message_index_within_session\": message_index_within_session,\n", + " \"message_index_across_sessions\": message_index_across_sessions,\n", + " \"session_date\": session_and_date[\"date\"],\n", + " \"message\": message,\n", + " \"previous_messages\": previous_messages_only,\n", + " \"num_previous_messages\": num_previous_messages,\n", + " }\n", + "\n", + " if lme_filename == \"longmemeval_oracle.json\":\n", + " snippet[\"message_has_answer\"] = message[\"has_answer\"]\n", + "\n", + " all_snippets_this_session.append(snippet)\n", + " message_index_across_sessions += 1\n", + "\n", + " all_snippets.extend(all_snippets_this_session)\n", + "\n", + " \n", + "\n", + " snippetized_folder = os.path.join(folder_path, \"snippetized_data\")\n", + " if not os.path.exists(snippetized_folder):\n", + " os.makedirs(snippetized_folder)\n", + "\n", + " filename = lme_filename.replace(\".json\", \"_snippetized.csv\")\n", + " filepath = os.path.join(snippetized_folder, filename)\n", + " \n", + " with open(filepath, \"w\", newline=\"\") as csvfile:\n", + " writer = csv.DictWriter(csvfile, fieldnames=all_snippets[0].keys())\n", + " writer.writeheader()\n", + " for snippet in all_snippets:\n", + " snippet['message'] = json.dumps(snippet['message'])\n", + " snippet['previous_messages'] = json.dumps(snippet['previous_messages'])\n", + " writer.writerow(snippet)\n", + "\n", + "\n", + "\n", + "\n", + "def snippetize_and_check(lme_filename):\n", + " folder_path = './longmemeval_data/snippetized_data'\n", + " file_path = os.path.join(folder_path, lme_filename.replace(\".json\", \"_snippetized.csv\"))\n", + " if not os.path.exists(file_path):\n", + " print(f\"Snippetizing {lme_filename}...\")\n", + " snippetize_lme_dataset(lme_filename)\n", + " else:\n", + " print(f\"Skipping snippetization for {lme_filename} because it already exists.\")\n", + "\n", + " # Check first few rows of the csv\n", + " df = pd.read_csv(file_path)\n", + " display(df.head(10))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Snippetizing longmemeval_oracle.json...\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typemultisession_indexsession_indexmessage_index_within_sessionmessage_index_across_sessionssession_datemessageprevious_messagesnum_previous_messagesmessage_has_answer
0gpt4_2655b836temporal-reasoning00002023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I'm thinking of g...[]0False
1gpt4_2655b836temporal-reasoning00112023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"Choosing the...[{\"role\": \"user\", \"content\": \"I'm thinking of ...1False
2gpt4_2655b836temporal-reasoning00222023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I've been doing s...[{\"role\": \"user\", \"content\": \"I'm thinking of ...2True
3gpt4_2655b836temporal-reasoning00332023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"That's great...[{\"role\": \"user\", \"content\": \"I'm thinking of ...3False
4gpt4_2655b836temporal-reasoning00442023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I'll definitely a...[{\"role\": \"user\", \"content\": \"I'm thinking of ...4False
5gpt4_2655b836temporal-reasoning00552023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"Advanced pai...[{\"role\": \"user\", \"content\": \"I'm thinking of ...5False
6gpt4_2655b836temporal-reasoning00662023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I'll definitely a...[{\"role\": \"assistant\", \"content\": \"Choosing th...5False
7gpt4_2655b836temporal-reasoning00772023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"Congratulati...[{\"role\": \"user\", \"content\": \"I've been doing ...5False
8gpt4_2655b836temporal-reasoning00882023-04-10 14:47:00{\"role\": \"user\", \"content\": \"That's really hel...[{\"role\": \"assistant\", \"content\": \"That's grea...5False
9gpt4_2655b836temporal-reasoning00992023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"Congratulati...[{\"role\": \"user\", \"content\": \"I'll definitely ...5False
\n", + "
" + ], + "text/plain": [ + " question_id question_type multisession_index session_index \\\n", + "0 gpt4_2655b836 temporal-reasoning 0 0 \n", + "1 gpt4_2655b836 temporal-reasoning 0 0 \n", + "2 gpt4_2655b836 temporal-reasoning 0 0 \n", + "3 gpt4_2655b836 temporal-reasoning 0 0 \n", + "4 gpt4_2655b836 temporal-reasoning 0 0 \n", + "5 gpt4_2655b836 temporal-reasoning 0 0 \n", + "6 gpt4_2655b836 temporal-reasoning 0 0 \n", + "7 gpt4_2655b836 temporal-reasoning 0 0 \n", + "8 gpt4_2655b836 temporal-reasoning 0 0 \n", + "9 gpt4_2655b836 temporal-reasoning 0 0 \n", + "\n", + " message_index_within_session message_index_across_sessions \\\n", + "0 0 0 \n", + "1 1 1 \n", + "2 2 2 \n", + "3 3 3 \n", + "4 4 4 \n", + "5 5 5 \n", + "6 6 6 \n", + "7 7 7 \n", + "8 8 8 \n", + "9 9 9 \n", + "\n", + " session_date message \\\n", + "0 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I'm thinking of g... \n", + "1 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"Choosing the... \n", + "2 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I've been doing s... \n", + "3 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"That's great... \n", + "4 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I'll definitely a... \n", + "5 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"Advanced pai... \n", + "6 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I'll definitely a... \n", + "7 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"Congratulati... \n", + "8 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"That's really hel... \n", + "9 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"Congratulati... \n", + "\n", + " previous_messages num_previous_messages \\\n", + "0 [] 0 \n", + "1 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 1 \n", + "2 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 2 \n", + "3 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 3 \n", + "4 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 4 \n", + "5 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 5 \n", + "6 [{\"role\": \"assistant\", \"content\": \"Choosing th... 5 \n", + "7 [{\"role\": \"user\", \"content\": \"I've been doing ... 5 \n", + "8 [{\"role\": \"assistant\", \"content\": \"That's grea... 5 \n", + "9 [{\"role\": \"user\", \"content\": \"I'll definitely ... 5 \n", + "\n", + " message_has_answer \n", + "0 False \n", + "1 False \n", + "2 True \n", + "3 False \n", + "4 False \n", + "5 False \n", + "6 False \n", + "7 False \n", + "8 False \n", + "9 False " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "lme_filename = \"longmemeval_oracle.json\"\n", + "snippetize_and_check(lme_filename)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Snippetizing longmemeval_s.json...\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typemultisession_indexsession_indexmessage_index_within_sessionmessage_index_across_sessionssession_datemessageprevious_messagesnum_previous_messages
0e47becbasingle-session-user00002023-05-20 02:21:00{\"role\": \"user\", \"content\": \"The farmer needs ...[]0
1e47becbasingle-session-user00112023-05-20 02:21:00{\"role\": \"assistant\", \"content\": \"To solve thi...[{\"role\": \"user\", \"content\": \"The farmer needs...1
2e47becbasingle-session-user01022023-05-20 02:57:00{\"role\": \"user\", \"content\": \"I'm trying to sta...[{\"role\": \"user\", \"content\": \"The farmer needs...2
3e47becbasingle-session-user01132023-05-20 02:57:00{\"role\": \"assistant\", \"content\": \"Congratulati...[{\"role\": \"user\", \"content\": \"The farmer needs...3
4e47becbasingle-session-user01242023-05-20 02:57:00{\"role\": \"user\", \"content\": \"I've been doing s...[{\"role\": \"user\", \"content\": \"The farmer needs...4
5e47becbasingle-session-user01352023-05-20 02:57:00{\"role\": \"assistant\", \"content\": \"Yoga is an e...[{\"role\": \"user\", \"content\": \"The farmer needs...5
6e47becbasingle-session-user01462023-05-20 02:57:00{\"role\": \"user\", \"content\": \"That's really hel...[{\"role\": \"assistant\", \"content\": \"To solve th...5
7e47becbasingle-session-user01572023-05-20 02:57:00{\"role\": \"assistant\", \"content\": \"Foam rolling...[{\"role\": \"user\", \"content\": \"I'm trying to st...5
8e47becbasingle-session-user01682023-05-20 02:57:00{\"role\": \"user\", \"content\": \"I've also been tr...[{\"role\": \"assistant\", \"content\": \"Congratulat...5
9e47becbasingle-session-user01792023-05-20 02:57:00{\"role\": \"assistant\", \"content\": \"Monitoring y...[{\"role\": \"user\", \"content\": \"I've been doing ...5
\n", + "
" + ], + "text/plain": [ + " question_id question_type multisession_index session_index \\\n", + "0 e47becba single-session-user 0 0 \n", + "1 e47becba single-session-user 0 0 \n", + "2 e47becba single-session-user 0 1 \n", + "3 e47becba single-session-user 0 1 \n", + "4 e47becba single-session-user 0 1 \n", + "5 e47becba single-session-user 0 1 \n", + "6 e47becba single-session-user 0 1 \n", + "7 e47becba single-session-user 0 1 \n", + "8 e47becba single-session-user 0 1 \n", + "9 e47becba single-session-user 0 1 \n", + "\n", + " message_index_within_session message_index_across_sessions \\\n", + "0 0 0 \n", + "1 1 1 \n", + "2 0 2 \n", + "3 1 3 \n", + "4 2 4 \n", + "5 3 5 \n", + "6 4 6 \n", + "7 5 7 \n", + "8 6 8 \n", + "9 7 9 \n", + "\n", + " session_date message \\\n", + "0 2023-05-20 02:21:00 {\"role\": \"user\", \"content\": \"The farmer needs ... \n", + "1 2023-05-20 02:21:00 {\"role\": \"assistant\", \"content\": \"To solve thi... \n", + "2 2023-05-20 02:57:00 {\"role\": \"user\", \"content\": \"I'm trying to sta... \n", + "3 2023-05-20 02:57:00 {\"role\": \"assistant\", \"content\": \"Congratulati... \n", + "4 2023-05-20 02:57:00 {\"role\": \"user\", \"content\": \"I've been doing s... \n", + "5 2023-05-20 02:57:00 {\"role\": \"assistant\", \"content\": \"Yoga is an e... \n", + "6 2023-05-20 02:57:00 {\"role\": \"user\", \"content\": \"That's really hel... \n", + "7 2023-05-20 02:57:00 {\"role\": \"assistant\", \"content\": \"Foam rolling... \n", + "8 2023-05-20 02:57:00 {\"role\": \"user\", \"content\": \"I've also been tr... \n", + "9 2023-05-20 02:57:00 {\"role\": \"assistant\", \"content\": \"Monitoring y... \n", + "\n", + " previous_messages num_previous_messages \n", + "0 [] 0 \n", + "1 [{\"role\": \"user\", \"content\": \"The farmer needs... 1 \n", + "2 [{\"role\": \"user\", \"content\": \"The farmer needs... 2 \n", + "3 [{\"role\": \"user\", \"content\": \"The farmer needs... 3 \n", + "4 [{\"role\": \"user\", \"content\": \"The farmer needs... 4 \n", + "5 [{\"role\": \"user\", \"content\": \"The farmer needs... 5 \n", + "6 [{\"role\": \"assistant\", \"content\": \"To solve th... 5 \n", + "7 [{\"role\": \"user\", \"content\": \"I'm trying to st... 5 \n", + "8 [{\"role\": \"assistant\", \"content\": \"Congratulat... 5 \n", + "9 [{\"role\": \"user\", \"content\": \"I've been doing ... 5 " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "lme_filename = \"longmemeval_s.json\"\n", + "snippetize_and_check(lme_filename)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Snippetizing longmemeval_m.json...\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typemultisession_indexsession_indexmessage_index_within_sessionmessage_index_across_sessionssession_datemessageprevious_messagesnum_previous_messages
07161e7e2single-session-assistant00002023-05-20 00:04:00{\"role\": \"user\", \"content\": \"Can you provide t...[]0
17161e7e2single-session-assistant00112023-05-20 00:04:00{\"role\": \"assistant\", \"content\": \"Yes, here ar...[{\"role\": \"user\", \"content\": \"Can you provide ...1
27161e7e2single-session-assistant00222023-05-20 00:04:00{\"role\": \"user\", \"content\": \"Wow, it's amazing...[{\"role\": \"user\", \"content\": \"Can you provide ...2
37161e7e2single-session-assistant00332023-05-20 00:04:00{\"role\": \"assistant\", \"content\": \"Yes, achievi...[{\"role\": \"user\", \"content\": \"Can you provide ...3
47161e7e2single-session-assistant00442023-05-20 00:04:00{\"role\": \"user\", \"content\": \"It's crazy to thi...[{\"role\": \"user\", \"content\": \"Can you provide ...4
57161e7e2single-session-assistant00552023-05-20 00:04:00{\"role\": \"assistant\", \"content\": \"Astronauts u...[{\"role\": \"user\", \"content\": \"Can you provide ...5
67161e7e2single-session-assistant01062023-05-20 00:16:00{\"role\": \"user\", \"content\": \"What about aliena...[{\"role\": \"assistant\", \"content\": \"Yes, here a...5
77161e7e2single-session-assistant01172023-05-20 00:16:00{\"role\": \"assistant\", \"content\": \"Alienation i...[{\"role\": \"user\", \"content\": \"Wow, it's amazin...5
87161e7e2single-session-assistant01282023-05-20 00:16:00{\"role\": \"user\", \"content\": \"Why you did not m...[{\"role\": \"assistant\", \"content\": \"Yes, achiev...5
97161e7e2single-session-assistant01392023-05-20 00:16:00{\"role\": \"assistant\", \"content\": \"I apologize ...[{\"role\": \"user\", \"content\": \"It's crazy to th...5
\n", + "
" + ], + "text/plain": [ + " question_id question_type multisession_index session_index \\\n", + "0 7161e7e2 single-session-assistant 0 0 \n", + "1 7161e7e2 single-session-assistant 0 0 \n", + "2 7161e7e2 single-session-assistant 0 0 \n", + "3 7161e7e2 single-session-assistant 0 0 \n", + "4 7161e7e2 single-session-assistant 0 0 \n", + "5 7161e7e2 single-session-assistant 0 0 \n", + "6 7161e7e2 single-session-assistant 0 1 \n", + "7 7161e7e2 single-session-assistant 0 1 \n", + "8 7161e7e2 single-session-assistant 0 1 \n", + "9 7161e7e2 single-session-assistant 0 1 \n", + "\n", + " message_index_within_session message_index_across_sessions \\\n", + "0 0 0 \n", + "1 1 1 \n", + "2 2 2 \n", + "3 3 3 \n", + "4 4 4 \n", + "5 5 5 \n", + "6 0 6 \n", + "7 1 7 \n", + "8 2 8 \n", + "9 3 9 \n", + "\n", + " session_date message \\\n", + "0 2023-05-20 00:04:00 {\"role\": \"user\", \"content\": \"Can you provide t... \n", + "1 2023-05-20 00:04:00 {\"role\": \"assistant\", \"content\": \"Yes, here ar... \n", + "2 2023-05-20 00:04:00 {\"role\": \"user\", \"content\": \"Wow, it's amazing... \n", + "3 2023-05-20 00:04:00 {\"role\": \"assistant\", \"content\": \"Yes, achievi... \n", + "4 2023-05-20 00:04:00 {\"role\": \"user\", \"content\": \"It's crazy to thi... \n", + "5 2023-05-20 00:04:00 {\"role\": \"assistant\", \"content\": \"Astronauts u... \n", + "6 2023-05-20 00:16:00 {\"role\": \"user\", \"content\": \"What about aliena... \n", + "7 2023-05-20 00:16:00 {\"role\": \"assistant\", \"content\": \"Alienation i... \n", + "8 2023-05-20 00:16:00 {\"role\": \"user\", \"content\": \"Why you did not m... \n", + "9 2023-05-20 00:16:00 {\"role\": \"assistant\", \"content\": \"I apologize ... \n", + "\n", + " previous_messages num_previous_messages \n", + "0 [] 0 \n", + "1 [{\"role\": \"user\", \"content\": \"Can you provide ... 1 \n", + "2 [{\"role\": \"user\", \"content\": \"Can you provide ... 2 \n", + "3 [{\"role\": \"user\", \"content\": \"Can you provide ... 3 \n", + "4 [{\"role\": \"user\", \"content\": \"Can you provide ... 4 \n", + "5 [{\"role\": \"user\", \"content\": \"Can you provide ... 5 \n", + "6 [{\"role\": \"assistant\", \"content\": \"Yes, here a... 5 \n", + "7 [{\"role\": \"user\", \"content\": \"Wow, it's amazin... 5 \n", + "8 [{\"role\": \"assistant\", \"content\": \"Yes, achiev... 5 \n", + "9 [{\"role\": \"user\", \"content\": \"It's crazy to th... 5 " + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "lme_filename = \"longmemeval_m.json\"\n", + "snippetize_and_check(lme_filename)" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python (.venv)", + "language": "python", + "name": ".venv" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.0" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/tests/evals/data/LongMemEval_mini_dataset_loading.ipynb b/tests/evals/data/LongMemEval_mini_dataset_loading.ipynb new file mode 100644 index 00000000..f605f556 --- /dev/null +++ b/tests/evals/data/LongMemEval_mini_dataset_loading.ipynb @@ -0,0 +1,2124 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "i9i9uUZ3pWQE", + "outputId": "84404bb8-5841-4f2f-dd87-7f909c6e95aa" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: pandas in ./.venv/lib/python3.13/site-packages (2.2.3)\n", + "Requirement already satisfied: graphiti-core in ./.venv/lib/python3.13/site-packages (0.5.1)\n", + "Requirement already satisfied: numpy>=1.26.0 in ./.venv/lib/python3.13/site-packages (from pandas) (2.2.1)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in ./.venv/lib/python3.13/site-packages (from pandas) (2.9.0.post0)\n", + "Requirement already satisfied: pytz>=2020.1 in ./.venv/lib/python3.13/site-packages (from pandas) (2024.2)\n", + "Requirement already satisfied: tzdata>=2022.7 in ./.venv/lib/python3.13/site-packages (from pandas) (2024.2)\n", + "Requirement already satisfied: diskcache<6.0.0,>=5.6.3 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (5.6.3)\n", + "Requirement already satisfied: neo4j<6.0.0,>=5.23.0 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (5.27.0)\n", + "Requirement already satisfied: openai<2.0.0,>=1.53.0 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (1.59.3)\n", + "Requirement already satisfied: pydantic<3.0.0,>=2.8.2 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (2.10.4)\n", + "Requirement already satisfied: python-dotenv<2.0.0,>=1.0.1 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (1.0.1)\n", + "Requirement already satisfied: tenacity==9.0.0 in ./.venv/lib/python3.13/site-packages (from graphiti-core) (9.0.0)\n", + "Requirement already satisfied: anyio<5,>=3.5.0 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (4.7.0)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (1.9.0)\n", + "Requirement already satisfied: httpx<1,>=0.23.0 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (0.28.1)\n", + "Requirement already satisfied: jiter<1,>=0.4.0 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (0.8.2)\n", + "Requirement already satisfied: sniffio in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (1.3.1)\n", + "Requirement already satisfied: tqdm>4 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (4.67.1)\n", + "Requirement already satisfied: typing-extensions<5,>=4.11 in ./.venv/lib/python3.13/site-packages (from openai<2.0.0,>=1.53.0->graphiti-core) (4.12.2)\n", + "Requirement already satisfied: annotated-types>=0.6.0 in ./.venv/lib/python3.13/site-packages (from pydantic<3.0.0,>=2.8.2->graphiti-core) (0.7.0)\n", + "Requirement already satisfied: pydantic-core==2.27.2 in ./.venv/lib/python3.13/site-packages (from pydantic<3.0.0,>=2.8.2->graphiti-core) (2.27.2)\n", + "Requirement already satisfied: six>=1.5 in ./.venv/lib/python3.13/site-packages (from python-dateutil>=2.8.2->pandas) (1.17.0)\n", + "Requirement already satisfied: idna>=2.8 in ./.venv/lib/python3.13/site-packages (from anyio<5,>=3.5.0->openai<2.0.0,>=1.53.0->graphiti-core) (3.10)\n", + "Requirement already satisfied: certifi in ./.venv/lib/python3.13/site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.53.0->graphiti-core) (2024.12.14)\n", + "Requirement already satisfied: httpcore==1.* in ./.venv/lib/python3.13/site-packages (from httpx<1,>=0.23.0->openai<2.0.0,>=1.53.0->graphiti-core) (1.0.7)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in ./.venv/lib/python3.13/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<2.0.0,>=1.53.0->graphiti-core) (0.14.0)\n", + "\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.2\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m24.3.1\u001b[0m\n", + "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "######## Installations - BE SURE TO MAKE YOUR OWN LOCAL VENV FIRST\n", + "\n", + "%pip install pandas graphiti-core" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "id": "KgzveXyAp35v" + }, + "outputs": [], + "source": [ + "######## Imports\n", + "\n", + "import pandas as pd\n", + "import os\n", + "import json\n", + "import csv\n", + "from datetime import datetime\n", + "from utils import ingest_and_label_minidataset, dict_to_entity, entity_to_dict\n", + "from graphiti_core.llm_client import OpenAIClient\n", + "from graphiti_core.llm_client.config import LLMConfig\n", + "from graphiti_core.nodes import EntityNode" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "id": "_RjEZnk5v530" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typemultisession_indexsession_indexmessage_index_within_sessionmessage_index_across_sessionssession_datemessageprevious_messagesnum_previous_messagesmessage_has_answer
0gpt4_2655b836temporal-reasoning00002023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I'm thinking of g...[]0False
1gpt4_2655b836temporal-reasoning00112023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"Choosing the...[{\"role\": \"user\", \"content\": \"I'm thinking of ...1False
2gpt4_2655b836temporal-reasoning00222023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I've been doing s...[{\"role\": \"user\", \"content\": \"I'm thinking of ...2True
3gpt4_2655b836temporal-reasoning00332023-04-10 14:47:00{\"role\": \"assistant\", \"content\": \"That's great...[{\"role\": \"user\", \"content\": \"I'm thinking of ...3False
4gpt4_2655b836temporal-reasoning00442023-04-10 14:47:00{\"role\": \"user\", \"content\": \"I'll definitely a...[{\"role\": \"user\", \"content\": \"I'm thinking of ...4False
\n", + "
" + ], + "text/plain": [ + " question_id question_type multisession_index session_index \\\n", + "0 gpt4_2655b836 temporal-reasoning 0 0 \n", + "1 gpt4_2655b836 temporal-reasoning 0 0 \n", + "2 gpt4_2655b836 temporal-reasoning 0 0 \n", + "3 gpt4_2655b836 temporal-reasoning 0 0 \n", + "4 gpt4_2655b836 temporal-reasoning 0 0 \n", + "\n", + " message_index_within_session message_index_across_sessions \\\n", + "0 0 0 \n", + "1 1 1 \n", + "2 2 2 \n", + "3 3 3 \n", + "4 4 4 \n", + "\n", + " session_date message \\\n", + "0 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I'm thinking of g... \n", + "1 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"Choosing the... \n", + "2 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I've been doing s... \n", + "3 2023-04-10 14:47:00 {\"role\": \"assistant\", \"content\": \"That's great... \n", + "4 2023-04-10 14:47:00 {\"role\": \"user\", \"content\": \"I'll definitely a... \n", + "\n", + " previous_messages num_previous_messages \\\n", + "0 [] 0 \n", + "1 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 1 \n", + "2 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 2 \n", + "3 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 3 \n", + "4 [{\"role\": \"user\", \"content\": \"I'm thinking of ... 4 \n", + "\n", + " message_has_answer \n", + "0 False \n", + "1 False \n", + "2 True \n", + "3 False \n", + "4 False " + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "######## Load the eval dataset\n", + "folder_path = './longmemeval_data/snippetized_data'\n", + "file_path = os.path.join(folder_path, 'longmemeval_oracle_snippetized.csv')\n", + "lme_dataset_df = pd.read_csv(file_path)\n", + "lme_dataset_df.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "######## Methods\n", + "\n", + "MAX_NUM_PREVIOUS_MESSAGES = 5\n", + "\n", + "\n", + "def filter_for_zep_labelling(df):\n", + " \"\"\"\n", + " Filters the dataset for the snippets we want to use for Zep labelling.\n", + " \"\"\"\n", + "\n", + " # Filter to only rows where question_type = single_session_user\n", + " df = df[df['question_type'] == 'single-session-user']\n", + "\n", + " # Filter only where message_has_answer = True\n", + " df = df[df['message_has_answer'] == True]\n", + "\n", + " # Filter to only rows where num_previous_messages = 5\n", + " df = df[df['num_previous_messages'] == 5]\n", + "\n", + " # Limit to only 5 rows\n", + " df = df.head(1)\n", + "\n", + " return df\n", + "\n", + "\n", + "def expand_previous_messages(df):\n", + " \"\"\"\n", + " Expands the previous_messages column into separate columns.\n", + " \"\"\"\n", + " # First parse the string into actual list of dicts\n", + " df['previous_messages'] = df['previous_messages'].apply(json.loads)\n", + "\n", + " # Then create separate columns for each message\n", + " for i in range(MAX_NUM_PREVIOUS_MESSAGES):\n", + " df[f'previous_message_{i+1}'] = df['previous_messages'].apply(\n", + " lambda x: x[i] if i < len(x) else None\n", + " )\n", + "\n", + " # Drop the original previous_messages column if desired\n", + " return df.drop('previous_messages', axis=1)\n", + "\n", + "\n", + "\n", + "def make_messages_readable(df):\n", + " \"\"\"\n", + " Makes the messages more readable.\n", + " \"\"\"\n", + " for i in range(MAX_NUM_PREVIOUS_MESSAGES):\n", + " df[f'previous_message_{i+1}'] = df[f'previous_message_{i+1}'].apply(\n", + " lambda x: \"|\"*10 + f\" {x['role']} \" + \"|\"*10 + \"\\n\\n\" + f\"{x['content']}\" if x is not None else None\n", + " )\n", + "\n", + " df['message'] = df.apply(\n", + " lambda row: \"|\"*10 + f\" {row['message_role']} \" + \"|\"*10 + \"\\n\\n\" + f\"{row['message']}\" if row['message'] is not None else None,\n", + " axis=1\n", + " )\n", + " return df\n", + "\n", + "\n", + "def order_columns(df):\n", + " \"\"\"\n", + " Orders the columns in the way we want them.\n", + " \"\"\"\n", + " df = df[['question_id', 'question_type', 'multisession_index', 'session_index', 'message_index_within_session', 'message_index_across_sessions', 'session_date', 'message_role', 'num_previous_messages', 'message_has_answer', 'previous_message_1', 'previous_message_2', 'previous_message_3', 'previous_message_4', 'previous_message_5', 'message']]\n", + " return df\n", + "\n", + "\n", + "\n", + "def insert_answer_columns(df, num_prompt_instructions):\n", + "\n", + " for prompt_instruction_index in range(num_prompt_instructions, 0, -1):\n", + "\n", + " for i in range(MAX_NUM_PREVIOUS_MESSAGES, 0, -1):\n", + " # Insert after each previous message\n", + " column_tag = f\"({prompt_instruction_index}.{i})\"\n", + " df.insert(\n", + " loc=df.columns.get_loc(f'previous_message_{i}') + 1,\n", + " column=f'Answer to Prompt Instruction {prompt_instruction_index} {column_tag}',\n", + " value=''\n", + " )\n", + " df.insert(\n", + " loc=df.columns.get_loc(f'previous_message_{i}') + 2,\n", + " column=f'Done? {column_tag}',\n", + " value=''\n", + " )\n", + "\n", + " column_tag = f\"({prompt_instruction_index}.{MAX_NUM_PREVIOUS_MESSAGES+1})\"\n", + " # Insert after each previous message\n", + " df.insert(\n", + " loc=df.columns.get_loc(f'message') + 1,\n", + " column=f'Answer to Prompt Instruction {prompt_instruction_index} {column_tag}',\n", + " value=''\n", + " )\n", + " df.insert(\n", + " loc=df.columns.get_loc(f'message') + 2,\n", + " column=f'Done? {column_tag}',\n", + " value=''\n", + " )\n", + "\n", + "\n", + "def insert_default_answers_round1(df):\n", + " \"\"\"\n", + " Inserts default answers for the first round of prompt instructions.\n", + " \"\"\"\n", + " for i in range(MAX_NUM_PREVIOUS_MESSAGES, 0, -1):\n", + " column_tag = f\"(1.{i})\"\n", + " answer_col = f'Answer to Prompt Instruction 1 {column_tag}'\n", + " msg_col = f'previous_message_{i}'\n", + " \n", + " # Set default value based on role from previous message\n", + " df[answer_col] = df[msg_col].apply(\n", + " lambda x: f\"[${x['role']}$, ]\" if x is not None else \"\"\n", + " )\n", + "\n", + " # Handle the final message\n", + " column_tag = f\"(1.{MAX_NUM_PREVIOUS_MESSAGES+1})\"\n", + " answer_col = f'Answer to Prompt Instruction 1 {column_tag}'\n", + "\n", + " # Set default value based on role from current message\n", + " df[answer_col] = df.apply(\n", + " lambda row: f\"[${row['message_role']}$, ]\",\n", + " axis=1\n", + " )\n", + "\n", + "def insert_example_row(df, num_prompt_instructions):\n", + " \"\"\"\n", + " Inserts an example row at the top of the dataframe with 'EXAMPLE' as values.\n", + " \"\"\"\n", + " example_row = {col: \"EXAMPLE\" for col in df.columns}\n", + " # for i in range(2):\n", + " # for j in range(num_prompt_instructions):\n", + " # example_row[f\"Done? ({j+1}.{i+1})\"] = \"x\"\n", + " df.loc[-1] = example_row\n", + " df.index = df.index + 1\n", + " df.sort_index(inplace=True)\n", + " return df\n", + "\n", + "\n", + "\n", + "def transform_eval_minidataset(df):\n", + " \"\"\"\n", + " Transforms the eval mini dataset so that there is a row for every message in previous messages.\n", + " \"\"\"\n", + "\n", + " df = df.rename(columns={col: f\"snippet_{col}\" for col in df.columns})\n", + "\n", + " ### Add new columns\n", + " df.reset_index(drop=True, inplace=True)\n", + " df['snippet_index'] = df.index\n", + "\n", + " transformed_rows = []\n", + "\n", + " for _, row in df.iterrows():\n", + " previous_messages = json.loads(row['snippet_previous_messages'])\n", + " \n", + " for i, message in enumerate(previous_messages):\n", + " new_row = row.copy()\n", + " new_row['message_index_within_snippet'] = i\n", + " new_row['input_message'] = json.dumps(message)\n", + " new_row['input_previous_messages'] = json.dumps(previous_messages[:i])\n", + " transformed_rows.append(new_row)\n", + "\n", + " new_row = row.copy()\n", + " new_row['message_index_within_snippet'] = len(previous_messages)\n", + " new_row['input_message'] = row['snippet_message']\n", + " new_row['input_previous_messages'] = row['snippet_previous_messages']\n", + " transformed_rows.append(new_row)\n", + "\n", + " transformed_df = pd.DataFrame(transformed_rows)\n", + "\n", + " transformed_rows = []\n", + " task_names = [\"extract_nodes\", \"dedupe_nodes\", \"extract_edges\", \"dedupe_edges\", \"extract_edge_dates\", \"edge_invalidation\"]\n", + " for _, row in transformed_df.iterrows():\n", + " for task_index, task_name in enumerate(task_names):\n", + " new_row = row.copy()\n", + " new_row['task_name'] = task_name\n", + " new_row['task_index'] = task_index\n", + " transformed_rows.append(new_row)\n", + "\n", + " transformed_df = pd.DataFrame(transformed_rows)\n", + "\n", + " # Reorder columns\n", + " transformed_df = transformed_df[['snippet_index', 'message_index_within_snippet', 'task_index', 'task_name', 'snippet_message', 'snippet_previous_messages', 'input_message', 'input_previous_messages']]#, 'input_extracted_nodes', 'input_existing_relevant_nodes', 'input_extracted_edges', 'input_existing_relevant_edges', 'output_zep', 'output_gpt4o', 'output_human']]\n", + "\n", + " # Ensure to reset the indices to be sequential\n", + " transformed_df.reset_index(drop=True, inplace=True)\n", + "\n", + " return transformed_df\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "# Set pandas settings to display all columns and have max width of columns\n", + "pd.set_option('display.max_columns', 100)\n", + "pd.set_option('display.max_rows', 100)\n", + "pd.set_option('display.max_colwidth', 120)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
question_idquestion_typemultisession_indexsession_indexmessage_index_within_sessionmessage_index_across_sessionssession_datemessageprevious_messagesnum_previous_messagesmessage_has_answer
6686e47becbasingle-session-user2860552023-05-21 11:54:00{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...5True
\n", + "
" + ], + "text/plain": [ + " question_id question_type multisession_index session_index \\\n", + "6686 e47becba single-session-user 286 0 \n", + "\n", + " message_index_within_session message_index_across_sessions \\\n", + "6686 5 5 \n", + "\n", + " session_date \\\n", + "6686 2023-05-21 11:54:00 \n", + "\n", + " message \\\n", + "6686 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "\n", + " previous_messages \\\n", + "6686 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "\n", + " num_previous_messages message_has_answer \n", + "6686 5 True " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "######## Filtering to only snippets/rows we want\n", + "lme_dataset_df_filtered = filter_for_zep_labelling(lme_dataset_df)\n", + "lme_dataset_df_filtered.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of rows: 36\n", + "Number of columns: 8\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
snippet_indexmessage_index_within_snippettask_indextask_namesnippet_messagesnippet_previous_messagesinput_messageinput_previous_messages
0000extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
1001dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
2002extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
3003dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
4004extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
5005edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]
6010extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
7011dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
8012extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
9013dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
10014extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
11015edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
12020extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
13021dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
14022extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
15023dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
16024extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
17025edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
18030extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
19031dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
20032extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
21033dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
22034extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
23035edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
24040extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
25041dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
26042extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
27043dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
28044extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
29045edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
30050extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
31051dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
32052extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
33053dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
34054extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
35055edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...
\n", + "
" + ], + "text/plain": [ + " snippet_index message_index_within_snippet task_index \\\n", + "0 0 0 0 \n", + "1 0 0 1 \n", + "2 0 0 2 \n", + "3 0 0 3 \n", + "4 0 0 4 \n", + "5 0 0 5 \n", + "6 0 1 0 \n", + "7 0 1 1 \n", + "8 0 1 2 \n", + "9 0 1 3 \n", + "10 0 1 4 \n", + "11 0 1 5 \n", + "12 0 2 0 \n", + "13 0 2 1 \n", + "14 0 2 2 \n", + "15 0 2 3 \n", + "16 0 2 4 \n", + "17 0 2 5 \n", + "18 0 3 0 \n", + "19 0 3 1 \n", + "20 0 3 2 \n", + "21 0 3 3 \n", + "22 0 3 4 \n", + "23 0 3 5 \n", + "24 0 4 0 \n", + "25 0 4 1 \n", + "26 0 4 2 \n", + "27 0 4 3 \n", + "28 0 4 4 \n", + "29 0 4 5 \n", + "30 0 5 0 \n", + "31 0 5 1 \n", + "32 0 5 2 \n", + "33 0 5 3 \n", + "34 0 5 4 \n", + "35 0 5 5 \n", + "\n", + " task_name \\\n", + "0 extract_nodes \n", + "1 dedupe_nodes \n", + "2 extract_edges \n", + "3 dedupe_edges \n", + "4 extract_edge_dates \n", + "5 edge_invalidation \n", + "6 extract_nodes \n", + "7 dedupe_nodes \n", + "8 extract_edges \n", + "9 dedupe_edges \n", + "10 extract_edge_dates \n", + "11 edge_invalidation \n", + "12 extract_nodes \n", + "13 dedupe_nodes \n", + "14 extract_edges \n", + "15 dedupe_edges \n", + "16 extract_edge_dates \n", + "17 edge_invalidation \n", + "18 extract_nodes \n", + "19 dedupe_nodes \n", + "20 extract_edges \n", + "21 dedupe_edges \n", + "22 extract_edge_dates \n", + "23 edge_invalidation \n", + "24 extract_nodes \n", + "25 dedupe_nodes \n", + "26 extract_edges \n", + "27 dedupe_edges \n", + "28 extract_edge_dates \n", + "29 edge_invalidation \n", + "30 extract_nodes \n", + "31 dedupe_nodes \n", + "32 extract_edges \n", + "33 dedupe_edges \n", + "34 extract_edge_dates \n", + "35 edge_invalidation \n", + "\n", + " snippet_message \\\n", + "0 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "1 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "2 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "3 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "4 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "5 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "6 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "7 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "8 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "9 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "10 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "11 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "12 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "13 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "14 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "15 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "16 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "17 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "18 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "19 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "20 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "21 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "22 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "23 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "24 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "25 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "26 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "27 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "28 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "29 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "30 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "31 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "32 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "33 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "34 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "35 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "\n", + " snippet_previous_messages \\\n", + "0 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "1 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "2 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "3 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "4 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "5 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "6 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "7 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "8 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "9 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "10 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "11 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "12 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "13 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "14 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "15 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "16 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "17 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "18 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "19 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "20 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "21 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "22 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "23 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "24 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "25 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "26 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "27 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "28 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "29 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "30 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "31 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "32 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "33 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "34 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "35 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "\n", + " input_message \\\n", + "0 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "1 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "2 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "3 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "4 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "5 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "6 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "7 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "8 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "9 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "10 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "11 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "12 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "13 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "14 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "15 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "16 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "17 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "18 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "19 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "20 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "21 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "22 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "23 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "24 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "25 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "26 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "27 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "28 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "29 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "30 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "31 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "32 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "33 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "34 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "35 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "\n", + " input_previous_messages \n", + "0 [] \n", + "1 [] \n", + "2 [] \n", + "3 [] \n", + "4 [] \n", + "5 [] \n", + "6 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "7 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "8 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "9 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "10 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "11 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "12 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "13 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "14 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "15 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "16 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "17 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "18 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "19 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "20 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "21 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "22 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "23 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "24 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "25 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "26 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "27 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "28 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "29 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "30 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "31 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "32 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "33 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "34 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "35 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#################### Create the eval CSV\n", + "eval_minidataset = lme_dataset_df_filtered.copy()\n", + "eval_minidataset = transform_eval_minidataset(eval_minidataset)\n", + "# Print the number of rows and columns\n", + "print(f\"Number of rows: {len(eval_minidataset)}\")\n", + "print(f\"Number of columns: {len(eval_minidataset.columns)}\")\n", + "eval_minidataset.head(100)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of rows: 36\n", + "Number of columns: 9\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
snippet_indexmessage_index_within_snippettask_indextask_namesnippet_messagesnippet_previous_messagesinput_messageinput_previous_messagesoutput_gpt4o_mini
0000extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[][{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
1001dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[][{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
2002extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[][{\"uuid\": \"cda66daf-afe0-4098-a2b6-c3f71f30fe85\", \"group_id\": \"\", \"source_node_uuid\": \"afb12271-73aa-4d41-a8a5-c5411...
3003dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]None
4004extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]None
5005edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app...[]None
6010extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
7011dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
8012extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"3ad7f861-0470-4955-b698-cc67fe186bc5\", \"group_id\": \"\", \"source_node_uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d...
9013dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
10014extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
11015edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
12020extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"c65758f0-752c-418a-ad6b-2d8a74cdd4ce\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
13021dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
14022extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"165b9582-acee-46ed-93f9-216c17344642\", \"group_id\": \"\", \"source_node_uuid\": \"c65758f0-752c-418a-ad6b-2d8a7...
15023dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
16024extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
17025edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
18030extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"ef20491c-a031-4aea-8e51-0d0c47c98245\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
19031dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
20032extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"032a54c8-15b2-47b0-a89e-79f985938661\", \"group_id\": \"\", \"source_node_uuid\": \"aa977349-dd97-4af2-942b-02844...
21033dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
22034extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
23035edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
24040extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"06bc8194-ee62-46bd-9307-7e96001e4d07\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
25041dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"...
26042extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"eedb6466-4764-4c23-9107-c03b49979978\", \"group_id\": \"\", \"source_node_uuid\": \"06bc8194-ee62-46bd-9307-7e960...
27043dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
28044extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
29045edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
30050extract_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"e04cfd2d-c6e4-4372-8385-6a7c89dfe9b6\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
31051dedupe_nodes{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create...
32052extract_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...[{\"uuid\": \"fd4b2107-3660-4eb6-9765-c89d709ac57f\", \"group_id\": \"\", \"source_node_uuid\": \"e04cfd2d-c6e4-4372-8385-6a7c8...
33053dedupe_edges{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
34054extract_edge_dates{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
35055edge_invalidation{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...{\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati...[{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap...None
\n", + "
" + ], + "text/plain": [ + " snippet_index message_index_within_snippet task_index \\\n", + "0 0 0 0 \n", + "1 0 0 1 \n", + "2 0 0 2 \n", + "3 0 0 3 \n", + "4 0 0 4 \n", + "5 0 0 5 \n", + "6 0 1 0 \n", + "7 0 1 1 \n", + "8 0 1 2 \n", + "9 0 1 3 \n", + "10 0 1 4 \n", + "11 0 1 5 \n", + "12 0 2 0 \n", + "13 0 2 1 \n", + "14 0 2 2 \n", + "15 0 2 3 \n", + "16 0 2 4 \n", + "17 0 2 5 \n", + "18 0 3 0 \n", + "19 0 3 1 \n", + "20 0 3 2 \n", + "21 0 3 3 \n", + "22 0 3 4 \n", + "23 0 3 5 \n", + "24 0 4 0 \n", + "25 0 4 1 \n", + "26 0 4 2 \n", + "27 0 4 3 \n", + "28 0 4 4 \n", + "29 0 4 5 \n", + "30 0 5 0 \n", + "31 0 5 1 \n", + "32 0 5 2 \n", + "33 0 5 3 \n", + "34 0 5 4 \n", + "35 0 5 5 \n", + "\n", + " task_name \\\n", + "0 extract_nodes \n", + "1 dedupe_nodes \n", + "2 extract_edges \n", + "3 dedupe_edges \n", + "4 extract_edge_dates \n", + "5 edge_invalidation \n", + "6 extract_nodes \n", + "7 dedupe_nodes \n", + "8 extract_edges \n", + "9 dedupe_edges \n", + "10 extract_edge_dates \n", + "11 edge_invalidation \n", + "12 extract_nodes \n", + "13 dedupe_nodes \n", + "14 extract_edges \n", + "15 dedupe_edges \n", + "16 extract_edge_dates \n", + "17 edge_invalidation \n", + "18 extract_nodes \n", + "19 dedupe_nodes \n", + "20 extract_edges \n", + "21 dedupe_edges \n", + "22 extract_edge_dates \n", + "23 edge_invalidation \n", + "24 extract_nodes \n", + "25 dedupe_nodes \n", + "26 extract_edges \n", + "27 dedupe_edges \n", + "28 extract_edge_dates \n", + "29 edge_invalidation \n", + "30 extract_nodes \n", + "31 dedupe_nodes \n", + "32 extract_edges \n", + "33 dedupe_edges \n", + "34 extract_edge_dates \n", + "35 edge_invalidation \n", + "\n", + " snippet_message \\\n", + "0 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "1 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "2 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "3 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "4 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "5 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "6 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "7 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "8 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "9 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "10 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "11 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "12 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "13 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "14 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "15 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "16 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "17 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "18 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "19 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "20 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "21 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "22 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "23 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "24 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "25 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "26 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "27 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "28 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "29 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "30 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "31 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "32 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "33 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "34 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "35 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "\n", + " snippet_previous_messages \\\n", + "0 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "1 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "2 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "3 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "4 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "5 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "6 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "7 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "8 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "9 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "10 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "11 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "12 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "13 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "14 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "15 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "16 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "17 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "18 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "19 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "20 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "21 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "22 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "23 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "24 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "25 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "26 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "27 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "28 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "29 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "30 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "31 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "32 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "33 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "34 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "35 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "\n", + " input_message \\\n", + "0 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "1 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "2 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "3 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "4 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "5 {\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management app... \n", + "6 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "7 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "8 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "9 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "10 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "11 {\"role\": \"assistant\", \"content\": \"Making the leap from a planner to a digital task management system! Congratulation... \n", + "12 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "13 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "14 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "15 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "16 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "17 {\"role\": \"user\", \"content\": \"I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By... \n", + "18 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "19 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "20 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "21 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "22 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "23 {\"role\": \"assistant\", \"content\": \"Todoist and Trello are both excellent choices for task management.\\n\\nNow, about c... \n", + "24 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "25 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "26 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "27 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "28 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "29 {\"role\": \"user\", \"content\": \"I graduated with a degree in Business Administration, which has definitely helped me in... \n", + "30 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "31 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "32 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "33 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "34 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "35 {\"role\": \"assistant\", \"content\": \"Congratulations on your degree in Business Administration! That's a great foundati... \n", + "\n", + " input_previous_messages \\\n", + "0 [] \n", + "1 [] \n", + "2 [] \n", + "3 [] \n", + "4 [] \n", + "5 [] \n", + "6 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "7 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "8 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "9 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "10 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "11 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "12 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "13 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "14 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "15 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "16 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "17 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "18 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "19 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "20 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "21 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "22 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "23 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "24 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "25 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "26 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "27 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "28 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "29 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "30 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "31 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "32 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "33 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "34 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "35 [{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management ap... \n", + "\n", + " output_gpt4o_mini \n", + "0 [{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "1 [{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "2 [{\"uuid\": \"cda66daf-afe0-4098-a2b6-c3f71f30fe85\", \"group_id\": \"\", \"source_node_uuid\": \"afb12271-73aa-4d41-a8a5-c5411... \n", + "3 None \n", + "4 None \n", + "5 None \n", + "6 [{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "7 [{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "8 [{\"uuid\": \"3ad7f861-0470-4955-b698-cc67fe186bc5\", \"group_id\": \"\", \"source_node_uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d... \n", + "9 None \n", + "10 None \n", + "11 None \n", + "12 [{\"uuid\": \"c65758f0-752c-418a-ad6b-2d8a74cdd4ce\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "13 [{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "14 [{\"uuid\": \"165b9582-acee-46ed-93f9-216c17344642\", \"group_id\": \"\", \"source_node_uuid\": \"c65758f0-752c-418a-ad6b-2d8a7... \n", + "15 None \n", + "16 None \n", + "17 None \n", + "18 [{\"uuid\": \"ef20491c-a031-4aea-8e51-0d0c47c98245\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "19 [{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "20 [{\"uuid\": \"032a54c8-15b2-47b0-a89e-79f985938661\", \"group_id\": \"\", \"source_node_uuid\": \"aa977349-dd97-4af2-942b-02844... \n", + "21 None \n", + "22 None \n", + "23 None \n", + "24 [{\"uuid\": \"06bc8194-ee62-46bd-9307-7e96001e4d07\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "25 [{\"uuid\": \"afb12271-73aa-4d41-a8a5-c541169b85cf\", \"name\": \"user\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"created_at\"... \n", + "26 [{\"uuid\": \"eedb6466-4764-4c23-9107-c03b49979978\", \"group_id\": \"\", \"source_node_uuid\": \"06bc8194-ee62-46bd-9307-7e960... \n", + "27 None \n", + "28 None \n", + "29 None \n", + "30 [{\"uuid\": \"e04cfd2d-c6e4-4372-8385-6a7c89dfe9b6\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "31 [{\"uuid\": \"b68c71ec-87d6-43d8-9ec1-0155d8415400\", \"name\": \"assistant\", \"group_id\": \"\", \"labels\": [\"Entity\"], \"create... \n", + "32 [{\"uuid\": \"fd4b2107-3660-4eb6-9765-c89d709ac57f\", \"group_id\": \"\", \"source_node_uuid\": \"e04cfd2d-c6e4-4372-8385-6a7c8... \n", + "33 None \n", + "34 None \n", + "35 None " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Insert gpt4o answers by doing ingestion in the right order and filling extra input columns as needed\n", + "model_name = 'gpt-4o-mini'\n", + "llm_config = LLMConfig(\n", + " api_key=os.getenv('OPENAI_API_KEY'),\n", + " model=model_name,\n", + ")\n", + "llm_client = OpenAIClient(config=llm_config)\n", + "output_column_name = 'output_gpt4o_mini'\n", + "eval_minidataset_labelled = await ingest_and_label_minidataset(llm_client, eval_minidataset, output_column_name)\n", + "\n", + "# Print the number of rows and columns\n", + "print(f\"Number of rows: {len(eval_minidataset_labelled)}\")\n", + "print(f\"Number of columns: {len(eval_minidataset_labelled.columns)}\")\n", + "eval_minidataset_labelled.head(100)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"role\": \"user\", \"content\": \"I'm trying to organize my life a bit better, can you recommend some task management apps that can help me prioritize my work and personal tasks? I've been using a planner, but I think I need something more digital.\"}\n", + "Fact: The user has been using a planner., Name: USES\n", + "----------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "Fact: The user is trying to organize their life better and is seeking task management apps., Name: SEEKS\n", + "----------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "Fact: The user aims to prioritize their work tasks., Name: AIMS_TO_PRIORITIZE\n", + "----------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "Fact: The user aims to prioritize their personal tasks., Name: AIMS_TO_PRIORITIZE\n", + "----------------------------------------------------------------------------------------------------\n", + "\n", + "\n", + "Fact: The user prefers a digital solution over a planner., Name: PREFERS\n", + "----------------------------------------------------------------------------------------------------\n", + "\n", + "\n" + ] + } + ], + "source": [ + "# print the input message column for the first row\n", + "index = 2\n", + "print(\"Input Message:\")\n", + "print(eval_minidataset_labelled.iloc[index]['input_message'])\n", + "print(\"-\"*100)\n", + "cell_value = eval_minidataset_labelled.iloc[index][output_column_name]\n", + "cell_value_dicts = json.loads(cell_value)\n", + "for dict in cell_value_dicts:\n", + " # Print only the 'fact' and 'name' values\n", + " print(f\"Fact: {dict.get('fact', 'N/A')}, Name: {dict.get('name', 'N/A')}\")\n", + " print(\"-\"*100)\n", + " print(\"\\n\")\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "#################### Create the human labelling CSV\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "#################### Create the human labelling CSV (old)\n", + "\n", + "\n", + "# ######## Expanding the previous_messages column\n", + "# lme_dataset_df_filtered_human_labelling = expand_previous_messages(lme_dataset_df_filtered)\n", + "# lme_dataset_df_filtered_human_labelling.head()\n", + "\n", + "# ######## Order the columns in the way we want them\n", + "# lme_dataset_df_filtered_human_labelling = order_columns(lme_dataset_df_filtered_human_labelling)\n", + "# lme_dataset_df_filtered_human_labelling.head()\n", + "\n", + "# ######## Insert empty answer columns\n", + "# num_prompt_instructions = 1\n", + "# insert_answer_columns(lme_dataset_df_filtered_human_labelling, num_prompt_instructions)\n", + "# lme_dataset_df_filtered_human_labelling.head()\n", + "\n", + "# ######## Insert default values for the answers\n", + "# insert_default_answers_round1(lme_dataset_df_filtered_human_labelling)\n", + "# lme_dataset_df_filtered_human_labelling.head()\n", + "\n", + "# ######## Make the messages more readable\n", + "# lme_dataset_df_filtered_human_labelling = make_messages_readable(lme_dataset_df_filtered_human_labelling)\n", + "# lme_dataset_df_filtered_human_labelling.head(10)\n", + "\n", + "# ######## Add example row to the top\n", + "# insert_example_row(lme_dataset_df_filtered_human_labelling, num_prompt_instructions)\n", + "# lme_dataset_df_filtered_human_labelling.head(10)\n", + "\n", + "# ######## Save to csv\n", + "# lme_dataset_df_filtered_human_labelling.to_csv(\"lme_dataset_df_filtered_human_labelling.csv\", index=False)" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python (.venv)", + "language": "python", + "name": ".venv" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.0" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/tests/evals/data/lme_dataset_filtered.csv b/tests/evals/data/lme_dataset_filtered.csv new file mode 100644 index 00000000..2c5d8485 --- /dev/null +++ b/tests/evals/data/lme_dataset_filtered.csv @@ -0,0 +1,495 @@ +question_id,question_type,multisession_index,session_index,message_index_within_session,message_index_across_sessions,session_date,message_role,num_previous_messages,message_has_answer,previous_message_1,Answer to Prompt Instruction 1 (1.1),Done? (1.1),previous_message_2,Answer to Prompt Instruction 1 (1.2),Done? (1.2),previous_message_3,Answer to Prompt Instruction 1 (1.3),Done? (1.3),previous_message_4,Answer to Prompt Instruction 1 (1.4),Done? (1.4),previous_message_5,Answer to Prompt Instruction 1 (1.5),Done? (1.5),message,Answer to Prompt Instruction 1 (1.6),Done? (1.6) +EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE,EXAMPLE +e47becba,single-session-user,286,0,5,5,2023-05-21 11:54:00,assistant,5,True,"|||||||||| user |||||||||| + +I'm trying to organize my life a bit better, can you recommend some task management apps that can help me prioritize my work and personal tasks? I've been using a planner, but I think I need something more digital.","[$user$, ]",,"|||||||||| assistant |||||||||| + +Making the leap from a planner to a digital task management system! Congratulations on taking the first step towards streamlining your productivity. There are many excellent task management apps out there, and I'd be happy to recommend some popular ones that can help you prioritize your work and personal tasks. + +Here are some top-notch options to consider: + +1. ** Todoist**: A highly-rated app with a clean interface, Todoist allows you to create and manage your tasks, set priorities, and track progress. It also has features like labels, filters, and integrations with other apps. +2. **Trello**: A visual project management tool that uses boards, lists, and cards to organize tasks. Trello is great for Kanban-style workflow management and has a vast library of integrations. +3. **Asana**: A robust task management platform that helps you create and assign tasks, set deadlines, and track progress. Asana is ideal for teams, but also suitable for individual use. +4. **RescueTime**: A time management app that tracks how you spend your time on your computer or mobile device. It provides detailed reports on productivity, helping you identify areas for improvement. +5. **Any.do**: A user-friendly task management app with a simple, intuitive interface. Any.do offers features like task assignment, reminders, and collaboration tools. +6. **Wunderlist**: A popular, easy-to-use app for creating and managing to-do lists. Wunderlist has a clean design, reminders, and collaboration features. +7. **ClickUp**: An all-in-one project management platform that includes task management, time tracking, and team collaboration features. +8. **Microsoft To Do**: A simple, free task management app from Microsoft that integrates well with Outlook and other Microsoft services. +9. **Evernote**: A note-taking app that also offers task management features, such as creating to-do lists and setting reminders. +10. **Google Tasks**: A basic, free task management app from Google that integrates well with Google Calendar and Gmail. + +Before choosing an app, consider the following factors: + +* Ease of use: How intuitive is the app? Can you easily create and manage tasks? +* Features: Do you need features like collaboration, time tracking, or integrations with other apps? +* Customization: Can you tailor the app to fit your workflow and prioritization needs? +* Accessibility: Is the app available on multiple platforms (web, mobile, desktop)? +* Cost: Are you willing to pay for premium features, or do you prefer a free app? + +Try out a few of these apps to see which one works best for you. You might also want to explore their free trials or tutorials to get a feel for the app's functionality. Happy organizing!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I think I'll try out Todoist and Trello. I've heard a lot of good things about them. By the way, do you have any tips on creating a routine for my new job? I'm still getting used to the 9-to-5 schedule and I want to make sure I'm staying on top of my tasks and responsibilities.","[$user$, ]",,"|||||||||| assistant |||||||||| + +Todoist and Trello are both excellent choices for task management. + +Now, about creating a routine for your new job: + +1. **Establish a morning routine**: Start your day with a consistent routine that sets you up for success. This could include activities like: + * Waking up at the same time every day (even on weekends) + * Exercise or stretching + * Meditation or deep breathing + * Reviewing your schedule and to-do list for the day + * Having a healthy breakfast +2. **Prioritize your tasks**: Identify your most important tasks and tackle them first. This will help you stay focused and ensure you're making progress on critical projects. + * Use the Eisenhower Matrix to categorize tasks into urgent vs. important, and focus on the most critical ones first + * Break down large tasks into smaller, manageable chunks + * Set realistic deadlines for each task +3. **Create a 'Stop Doing' list**: Identify tasks or activities that are not essential or can be delegated, and eliminate them from your daily routine. This will help you avoid wasting time and energy on non-essential tasks. +4. **Take breaks**: It's essential to take regular breaks to recharge and avoid burnout. Schedule breaks into your day, and use them to: + * Stretch or move around + * Grab a healthy snack + * Chat with colleagues or friends + * Do something creative or relaxing +5. **Set boundaries**: Establish clear boundaries around your work hours and tasks to maintain a healthy work-life balance. This might include: + * Not checking work emails or taking work calls during non-work hours + * Setting aside time for personal activities, such as exercise or hobbies + * Learning to say ""no"" to non-essential tasks or commitments +6. **Review and adjust**: Regularly review your routine and task list to ensure you're staying on track and making progress. Adjust your routine as needed to stay focused and productive. +7. **Communicate with your team and manager**: Keep your team and manager informed about your progress, challenges, and any changes to your routine. This will help ensure everyone is on the same page and can provide support when needed. +8. **Use technology to your advantage**: Utilize tools like Todoist, Trello, or other project management software to stay organized and on top of your tasks. +9. **Learn to delegate**: Identify tasks that can be delegated to others, such as colleagues or subordinates, and empower them to take ownership. +10. **Be flexible**: Remember that routines can be adjusted as needed. Don't be too hard on yourself if you miss a task or need to make changes to your routine. + +Remember, it may take some time to figure out what works best for you and your new job. Be patient, and don't hesitate to ask for help or guidance from your colleagues or manager. + +Good luck, and I hope these tips help you establish a productive routine!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I graduated with a degree in Business Administration, which has definitely helped me in my new role. Do you have any advice on how to stay organized when it comes to paperwork and documentation, especially when it comes to tracking expenses and reimbursements?","[$user$, ]",,"|||||||||| assistant |||||||||| + +""Congratulations on your degree in Business Administration! That's a great foundation for your new role.\n\nStaying organized with paperwork and documentation is crucial, especially when it comes to tracking expenses and reimbursements. Here are some tips to help you stay on top of it:\n\n1. **Create a filing system**: Develop a consistent filing system, both physical and digital, to store and categorize your documents. This could include folders, binders, or digital files labeled by category (e.g., expenses, invoices, receipts, etc.).\n2. **Digitize your documents**: Scan or digitize paper documents to reduce clutter and make them easily searchable. Consider using cloud storage services like Google Drive, Dropbox, or OneDrive to access your files from anywhere.\n3. **Expense tracking tools**: Utilize expense tracking tools like Expensify, Concur, or Zoho Expense to streamline your expense reporting and reimbursement process. These tools often have mobile apps, making it easy to track expenses on-the-go.\n4. **Receipt organization**: Designate a specific place to store receipts, such as a receipt binder or a digital folder. Consider using a receipt scanning app like Shoeboxed or Neat to digitize your receipts.\n5. **Categorize and tag documents**: Use clear categories and tags to label your documents, making it easy to search and find specific files. For example, you could use tags like \""Q1 Expenses,\"" \""Travel Reimbursements,\"" or \""Project XYZ Invoices.\""\n6. **Set reminders**: Schedule regular reminders to review and submit expense reports, ensuring you don't miss deadlines or forget to file important documents.\n7. **Centralize your documentation**: Designate a central location, like a shared drive or intranet, to store company-wide documents, policies, and procedures. This ensures everyone has access to the same information.\n8. **Use templates**: Create templates for frequently used documents, such as expense reports or invoices, to save time and ensure consistency.\n9. **Verify and review**: Regularly verify the accuracy of your documents and review them for completeness. This helps prevent errors and ensures you're staying organized.\n10. **Stay up-to-date with company policies**: Familiarize yourself with your company's policies and procedures regarding documentation, expenses, and reimbursements. This will help you stay compliant and avoid any potential issues.\n\nBy implementing these strategies, you'll be well on your way to staying organized and efficient when it comes to paperwork and documentation, especially with tracking expenses and reimbursements.\n\nRemember to always follow your company's specific guidelines and policies, and don't hesitate to ask for help if you need it. Good luck!""","[assistant,]", +118b2229,single-session-user,287,0,8,8,2023-05-23 18:02:00,user,5,True,"|||||||||| assistant |||||||||| + +Great choice on Gone Girl! + +The Nightingale is an excellent choice, and I'm happy to tell you more about it. The Nightingale is a historical fiction novel by Kristin Hannah, published in 2015. The book has received widespread critical acclaim and has become a New York Times bestseller. + +**Plot** + +The story is set in France during World War II and follows the lives of two sisters, Vianne and Isabelle Rossignol. The novel explores their struggles, sacrifices, and bravery in the face of war, occupation, and personal loss. + +Vianne, the older sister, is married with a young daughter and tries to maintain a sense of normalcy in the face of the German occupation. She becomes involved in the French Resistance, risking her life to help downed airmen escape. + +Isabelle, the younger sister, is rebellious and impulsive, joining the Resistance at a young age. She becomes involved with a group of rebels, taking on dangerous missions and facing unimaginable challenges. + +Throughout the novel, the sisters' relationship is tested by their differing views on how to survive the war, their personal struggles, and the moral compromises they must make to stay alive. + +**Themes** + +The Nightingale explores several powerful themes, including: + +1. Sisterhood: The bond between Vianne and Isabelle is at the heart of the novel, and their relationship is beautifully portrayed. +2. Bravery: The novel highlights the courage and resilience of women during wartime, often overlooked in historical accounts. +3. Survival: The characters must make difficult choices to survive, and the novel shows the moral complexities of living under occupation. +4. Love: The novel explores the power of love and sacrifice, as the characters risk everything to protect each other and their loved ones. + +**Audiobook** + +The audiobook is narrated by Polly Stone, who does an excellent job of bringing the characters to life. Her narration is engaging, and she conveys the emotions and intensity of the story effectively. + +** Runtime** + +The audiobook has a runtime of approximately 17 hours and 30 minutes, so it's a significant but engaging listen. + +Overall, The Nightingale is a powerful, emotional, and thought-provoking novel that will keep you invested in the characters' lives. I hope you enjoy it!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I've heard that audiobooks can be great for multitasking. Do you have any recommendations for note-taking apps that work well with audiobooks?","[$user$, ]",,"|||||||||| assistant |||||||||| + +Audiobooks are perfect for multitasking, and note-taking apps can enhance your listening experience. Here are some fantastic note-taking apps that work well with audiobooks: + +1. **Notion**: A highly versatile and customizable app that allows you to create notes, databases, and even entire knowledge bases. You can create a template for audiobook notes, add tags, and even link to specific timestamps in the audiobook. (Web, iOS, Android) +2. **Simplenote**: A minimalistic, distraction-free note-taking app that syncs across all your devices. You can create tags, pins, and even use Markdown formatting. Simplenote has a great search function, making it easy to find specific notes later. (Web, iOS, Android) +3. **Bear**: A beautifully designed app that combines note-taking with writing tools. Bear allows you to create notes with tags, and you can even add audio recordings or images. The app also has a focus mode to help you stay concentrated. (iOS, Android) +4. **Evernote**: A popular note-taking app that offers a wide range of features, including audio notes, tagging, and organization. Evernote also has a web clipper, allowing you to save articles or quotes from the web. (Web, iOS, Android) +5. **Otter**: A unique app specifically designed for note-taking while listening to audiobooks or podcasts. Otter allows you to create notes, highlights, and even generates a summary of your audiobook. (iOS, Android) +6. **Audiobooks.com's Notes**: If you're an Audiobooks.com user, their app has a built-in note-taking feature that allows you to add notes, bookmarks, and even rate the audiobook. (iOS, Android) + +Features to look for in a note-taking app for audiobooks: + +* **Timestamps**: The ability to link notes to specific timestamps in the audiobook, making it easy to reference later. +* **Tagging and organization**: A system to categorize and organize your notes, such as tags, folders, or notebooks. +* **Search function**: A robust search feature to quickly find specific notes or quotes. +* **Syncing**: Cloud syncing to access your notes across multiple devices. +* **Customization**: The ability to customize the app to fit your note-taking style, such as font sizes, colors, and layout. + +Experiment with these apps to find the one that works best for you and your audiobook note-taking needs!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I've been using the Audible app to listen to my audiobooks, and it allows me to bookmark and add notes, but I'll definitely check out these other options. Do you know if any of these apps have a feature to export notes or quotes in a format that can be easily shared or posted on social media?","[$user$, ]",,"|||||||||| assistant |||||||||| + +The Audible app does offer some basic note-taking features, but it's great that you're looking to explore other options. + +Yes, some of the apps I mentioned do have features to export notes or quotes in a format that can be easily shared or posted on social media. Here's a breakdown: + +1. **Notion**: Notion allows you to export notes in various formats, including CSV, JSON, and Markdown. You can also use their web clipper to share notes as a link or embed them into websites and blogs. +2. **Simplenote**: Simplenote has a ""Share"" feature that allows you to export notes as plain text, Markdown, or HTML. You can also use their API to integrate with other services. +3. **Bear**: Bear has a ""Share"" feature that allows you to export notes as plain text, Markdown, or HTML. They also have a ""Quote"" feature that generates a formatted quote with a link to the original note. +4. **Evernote**: Evernote has a ""Share"" feature that allows you to export notes as HTML, PDF, or plain text. You can also use their Web Clipper to share notes as a link or embed them into websites and blogs. +5. **Otter**: Otter has a ""Share"" feature that allows you to export quotes as images, complete with attribution and a link to the original audiobook. They also have a ""Summary"" feature that generates a concise summary of your audiobook notes. + +As for social media sharing, some apps have direct integration, while others require a bit more work. Here's what I found: + +* **Notion**: You can share notes directly to Twitter, Slack, or Trello. +* **Bear**: You can share quotes directly to Twitter, Facebook, or LinkedIn. +* **Evernote**: You can share notes directly to Twitter, Facebook, or LinkedIn. +* **Otter**: You can share quotes directly to Twitter, Facebook, or LinkedIn. + +Keep in mind that some apps might have limitations on the number of shares or exports, depending on the plan or subscription you're on. + +It's great that you're looking to share your thoughts and quotes from your audiobooks!","[$assistant$, ]",,"|||||||||| user |||||||||| + +""I've been listening to audiobooks during my daily commute, which takes 45 minutes each way.""","[user,]", +58ef2f1c,single-session-user,294,0,8,8,2023-04-02 00:23:00,user,5,True,"|||||||||| assistant |||||||||| + +With your passion for animal welfare and children's health, I've curated a list of upcoming charity events in LA that might interest you: + +**Animal Welfare:** + +1. **Best Friends Animal Society's ""Strut Your Mutt""** (September): A fun dog walk and festival to raise funds for animal welfare organizations. +2. **American Humane's ""Hero Dog Awards""** (October): A star-studded gala honoring heroic canines and their human companions. +3. **The Humane Society of the United States' ""To the Rescue!""** (November): A benefit gala featuring a silent auction, dinner, and program highlighting animal rescue efforts. + +**Children's Health:** + +1. **Children's Hospital Los Angeles' ""Noche de NiƱos""** (October): A festive gala and auction supporting pediatric care and research at CHLA. +2. **St. Jude Children's Research Hospital's ""St. Jude Walk/Run to End Childhood Cancer""** (September): A fun run/walk event to raise funds for pediatric cancer research and treatment. +3. **Shriners Hospitals for Children's ""Love to the Rescue"" Gala** (November): A benefit dinner and auction supporting medical care for children with orthopedic conditions, burns, and spinal cord injuries. + +**Events similar to ""Love is in the Air"" fundraising dinner:** + +1. **The Gentle Barn's ""Sunset Hoedown""** (June): A fun, rustic evening with dinner, live music, and auctions supporting animal welfare and at-risk youth programs. +2. **The Painted Turtle's ""Summer Gala""** (July): A whimsical evening with dinner, auctions, and entertainment benefiting a summer camp for children with serious illnesses. +3. **The Boys & Girls Clubs of America's ""Youth of the Year Gala""** (September): A celebratory dinner honoring outstanding young leaders and supporting after-school programs for children. + +These events offer a mix of fundraising dinners, walks/runs, and galas that align with your interests. You can expect to meet new people, learn about the causes, and have a great time while making a difference. + +Please let me know if you'd like more information about any of these events or if you'd like me to suggest more options!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I think I'd like to learn more about the ""Strut Your Mutt"" event in September. Do you have any more details on that?","[$user$, ]",,"|||||||||| assistant |||||||||| + +""Strut Your Mutt"" is a fantastic event that combines fun, exercise, and philanthropy, all while celebrating our furry friends. + +**Strut Your Mutt Event Details:** + +* **Date:** Saturday, September 18, 2023 +* **Location:** Exposition Park, Los Angeles, CA (near the LA Memorial Coliseum) +* **Time:** 7:00 AM - 12:00 PM (Registration and check-in begin at 7:00 AM, and the walk starts at 9:00 AM) +* **Distance:** 1-mile or 3-mile walk (you choose!) +* **Purpose:** Raise funds and awareness for animal welfare organizations in LA, with a focus on rescue, rehabilitation, and adoption + +**What to Expect:** + +1. **Fun Walk:** Take a leisurely stroll with your pup (or without one!) around Exposition Park. The 1-mile or 3-mile routes are stroller-friendly and suitable for all ages. +2. **Festival Fun:** After the walk, enjoy the festival area with: + * Pet-friendly activities, such as pet adoptions, agility courses, and training demos. + * Food trucks and refreshments. + * Pet vendors and exhibitors offering goodies and services. + * A silent auction and raffles with exciting prizes. +3. **Fundraising:** Participants are encouraged to fundraise individually or form teams to support their favorite animal welfare organizations. You can set up a personal fundraising page and share it with friends and family. +4. **Registration:** Register online by September 1st to receive a complimentary event t-shirt and goodie bag. Same-day registration is available, but t-shirts and goodie bags are not guaranteed. + +**Participating Organizations:** + +Best Friends Animal Society has partnered with several local animal welfare organizations, including: + +* LA Animal Services +* The Humane Society of the United States +* ASPCA Los Angeles +* and more! + +**Tickets and Fundraising:** + +* **Registration:** $25 per adult, $15 per child (ages 5-12), and free for children under 5. +* **Fundraising:** Set a personal fundraising goal and collect donations to support your favorite animal welfare organization. Top fundraisers will receive prizes and recognition! + +This event is a wonderful way to spend time with fellow animal lovers, get some exercise, and make a difference in the lives of animals in need. If you're interested in participating, I recommend registering soon to secure your spot! + +Do you have any questions about the event or would you like to register?","[$assistant$, ]",,"|||||||||| user |||||||||| + +Can you tell me more about the silent auction and raffles at the ""Strut Your Mutt"" event? Are there any specific prizes or experiences that I should look out for?","[$user$, ]",,"|||||||||| assistant |||||||||| + +The silent auction and raffles at ""Strut Your Mutt"" are always a highlight of the event! You'll have the opportunity to bid on exciting prizes and experiences, all while supporting a great cause. + +**Silent Auction:** + +The silent auction will feature a variety of items and experiences, including: + +1. **Pet-themed packages:** Spa days for your furry friend, pet photography sessions, and pet-friendly getaways. +2. **Exclusive experiences:** Meet-and-greets with celebrity pet owners, behind-the-scenes tours of animal sanctuaries, and VIP access to pet-friendly events. +3. **Luxury items:** Designer pet accessories, high-end pet beds, and premium pet food and treats. +4. **Unique services:** Pet training sessions, dog walking or pet sitting services, and pet grooming packages. +5. **Autographed items:** Signed pet-themed books, photos, and memorabilia from famous animal lovers. + +**Raffles:** + +The raffle prizes will be announced closer to the event, but in the past, they've included: + +1. **Pet-friendly getaways:** Weekend stays at pet-friendly resorts, hotels, or vacation rentals. +2. **Pet pampering packages:** Spa days, grooming sessions, and pet photography packages. +3. **Pet gear and accessories:** High-end pet beds, strollers, and outdoor gear. +4. **Experiences:** Tickets to pet-friendly events, concerts, or sporting games. +5. **Cash prizes:** Generous cash prizes to support your favorite animal welfare organization. + +**Special Items to Look Out For:** + +1. **Exclusive pet portrait sessions:** A professional photo shoot with a renowned pet photographer, complete with a framed print and digital copies. +2. **Private dog training sessions:** One-on-one training sessions with a certified dog trainer to help with behavioral issues or agility training. +3. **Pet-friendly weekend getaways:** A weekend stay at a luxurious pet-friendly resort, complete with dog-friendly activities and amenities. +4. **Autographed pet-themed art:** Unique, one-of-a-kind art pieces created by local artists, signed by famous animal lovers or celebrities. +5. **VIP pet experiences:** Private meet-and-greets with animal celebrities, behind-the-scenes tours of animal sanctuaries, or exclusive access to pet-friendly events. + +Remember to arrive early to browse the silent auction and raffle prizes, and don't hesitate to ask volunteers for more information about each item. You can also set a budget for yourself and stick to it to ensure a fun and responsible bidding experience. + +Are you excited to start bidding and winning some amazing prizes for a great cause?","[$assistant$, ]",,"|||||||||| user |||||||||| + +""I'm really looking forward to the silent auction and raffles at \""Strut Your Mutt\"". I've had a great experience with similar events in the past, like the \""Love is in the Air\"" fundraising dinner I volunteered at back on Valentine's Day. The energy and excitement of bidding on amazing prizes while supporting a good cause is just fantastic!""","[user,]", +3b6f954b,single-session-user,299,0,8,8,2023-05-20 16:51:00,user,5,True,"|||||||||| assistant |||||||||| + +There are many amazing apps and tools out there that can help you stay organized and on top of your tasks. Here are some popular ones that are easy to use, sync well across devices, and are highly rated by users: + +1. ** Todoist**: A task management app that lets you create and manage your to-do lists, set reminders, and track your progress. It's available on desktop, mobile, and web. (Free, Premium: $3/month) +2. **Trello**: A visual project management tool that uses boards, lists, and cards to organize your tasks and projects. It's great for Kanban-style organization and collaboration. (Free, Premium: $12.50/month) +3. **Evernote**: A note-taking app that lets you organize your notes, tasks, and projects across multiple devices. It's great for research, study notes, and idea management. (Free, Premium: $7.99/month) +4. **RescueTime**: A time management tool that tracks how you spend your time on your computer or mobile device, providing insights into your productivity and time usage. (Free, Premium: $9/month) +5. **Google Tasks**: A simple task management app that integrates seamlessly with Google Calendar and Gmail. It's great for quick task management and reminders. (Free) +6. **Any.do**: A task management app that lets you create to-do lists, set reminders, and collaborate with others. It's available on desktop, mobile, and web. (Free, Premium: $2.99/month) +7. **Microsoft To Do**: A task management app that integrates with Microsoft Outlook and allows you to create and manage your to-do lists, set reminders, and track your progress. (Free) +8. **Forest**: A productivity app that gamifies your focus and concentration, using a forest growth model to motivate you to stay on task. (Free, Premium: $1.99/month) +9. **Wunderlist**: A task management app that lets you create and manage your to-do lists, set reminders, and collaborate with others. It's available on desktop, mobile, and web. (Free, Premium: $4.99/month) +10. **ClickUp**: An all-in-one project management tool that includes task management, time tracking, and team collaboration features. (Free, Premium: $5/month) + +All of these apps and tools are highly rated, user-friendly, and offer seamless syncing across devices. You can try out a few to see which one works best for you! + +When choosing an app, consider the following factors: + +* Ease of use: How intuitive is the app's interface? +* Features: Does it offer the features you need, such as task management, reminders, and collaboration? +* Syncing: Does it sync across all your devices, including desktop, mobile, and web? +* Pricing: Is it free or affordable, and what are the premium features? +* Integration: Does it integrate with other apps and tools you use, such as Google Calendar or Microsoft Outlook? + +I hope this helps you find the perfect app to stay organized and on top of your tasks!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I've been using Google Calendar to keep track of my classes and part-time job, but I'm not sure if it's the best tool for task management. Do you think I should try out Todoist or Trello to help me stay organized with my assignments and tasks?","[$user$, ]",,"|||||||||| assistant |||||||||| + +You're already using Google Calendar, which is a great start! While Google Calendar is excellent for scheduling events and appointments, it might not be the most suitable tool for task management. Todoist and Trello are both popular options for task management, and each has its strengths. Let's break them down to help you decide: + +**Todoist:** + +1. **Task-focused:** Todoist is designed specifically for task management, allowing you to create and manage your to-do lists, set priorities, and track progress. +2. **Simple and intuitive:** Todoist has a clean interface and is easy to use, making it a great option for those who want a straightforward task management system. +3. **Task hierarchies:** Todoist allows you to create task hierarchies, which means you can break down large projects into smaller, manageable tasks. +4. **Prioritization:** Todoist enables you to prioritize tasks using labels, filters, and priority levels, ensuring you focus on the most important tasks first. +5. **Integrations:** Todoist integrates with many apps and services, including Google Calendar, Gmail, and Slack. + +**Trello:** + +1. **Visual project management:** Trello is a visual project management tool that uses boards, lists, and cards to organize your tasks and projects. +2. **Kanban-style workflow:** Trello is ideal for Kanban-style workflow management, where you move cards across lists to track progress. +3. **Collaboration:** Trello is great for team collaboration, allowing you to assign tasks, add comments, and track progress. +4. **Customization:** Trello boards can be customized to fit your specific needs, with various power-ups and integrations available. +5. **Task management:** While Trello is primarily a project management tool, it can also be used for task management, especially for smaller, more straightforward tasks. + +Consider the following questions to help you decide between Todoist and Trello: + +1. Do you prefer a more traditional, list-based approach to task management (Todoist)? Or do you prefer a visual, board-based approach (Trello)? +2. Are you looking for a tool that's more focused on task management (Todoist), or do you need a tool that can handle project management and collaboration (Trello)? +3. Do you have complex, hierarchical tasks that require a more structured approach (Todoist)? Or do you have smaller, more flexible tasks that can be managed on a board (Trello)? + +If you: + +* Need a dedicated task management tool with a simple, intuitive interface, Todoist might be the better choice. +* Prefer a visual, project management approach with collaboration features, Trello could be the way to go. + +You can also consider using both tools in conjunction with Google Calendar. For example, you could use Todoist or Trello for task management and Google Calendar for scheduling events and appointments. + +Ultimately, it's worth trying out both Todoist and Trello to see which one resonates with you. Both tools offer free versions or trials, so you can experiment and find the best fit for your needs.","[$assistant$, ]",,"|||||||||| user |||||||||| + +I think I'll try out Todoist for task management. I've heard great things about it, and it seems like a great tool for breaking down larger projects into smaller, manageable tasks. Since I'm already using Google Calendar for scheduling, I think Todoist will complement it nicely. By the way, speaking of scheduling, I'm planning a trip to the Great Ocean Road soon. Have you heard about it? I've heard it's a must-see in Australia.","[$user$, ]",,"|||||||||| assistant |||||||||| + +Todoist is an excellent tool for task management, and it will definitely help you break down larger projects into smaller, manageable tasks. + +Now, about the Great Ocean Road... Oh, yes! The Great Ocean Road is an iconic Australian destination, and it's a must-visit for anyone traveling to Australia. It's a 243-kilometer stretch of coastal road that runs along the southeastern coast of Australia, offering breathtaking views of the ocean, cliffs, beaches, and rainforests. + +The Great Ocean Road is known for its: + +1. **Scenic drives:** The road winds its way through stunning coastal scenery, with frequent lookout points and beaches to stop and enjoy. +2. **Rock formations:** The famous Twelve Apostles limestone stacks are a highlight, but there are many other unique rock formations and arches along the way. +3. **Beaches:** You'll find a range of beaches, from secluded coves to popular surf spots like Bells Beach and Apollo Bay. +4. **Wildlife:** Keep an eye out for koalas, kangaroos, and other native Australian wildlife, especially in the Otway National Park. +5. **Hiking and outdoor activities:** There are plenty of opportunities for hiking, camping, surfing, and other outdoor activities along the Great Ocean Road. + +Some popular stops and attractions along the Great Ocean Road include: + +* The Twelve Apostles +* London Bridge rock formation +* Loch Ard Gorge +* Apollo Bay +* Otway National Park +* The Great Otway Fly Treetop Walk + +When planning your trip, consider the following tips: + +* Take your time: The Great Ocean Road is a scenic drive, so don't rush. Stop frequently to take in the views and enjoy the attractions. +* Book accommodations in advance: Especially during peak season (December to February), book your accommodations and popular attractions in advance to avoid sold-out situations. +* Be prepared: Bring sunscreen, water, and snacks, as services can be limited in some areas. +* Drive safely: The road can be winding and narrow in some sections, so drive cautiously and enjoy the views. + +I hope you have a fantastic time on your trip to the Great Ocean Road!","[$assistant$, ]",,"|||||||||| user |||||||||| + +""That sounds amazing! I've been to the Great Ocean Road before, and it's definitely a must-see in Australia. I actually went there with some friends during my study abroad program at the University of Melbourne. We had a blast exploring the coast, hiking, and taking in the stunning views. If you have time, I'd recommend stopping by the Kennett River Koala Walk to spot some koalas in their natural habitat.""","[user,]", +af8d2e46,single-session-user,304,0,6,6,2023-05-27 23:54:00,user,5,True,"|||||||||| assistant |||||||||| + +Packing for a 3-day business trip can be a breeze with a little planning. Here's a list of essentials to get you started: + +**Clothing:** + +* 2-3 business shirts or blouses (quick-drying and wrinkle-resistant) +* 2-3 pairs of pants or a skirt (choose versatile, comfortable options) +* 1 blazer or jacket (optional, but adds a professional touch) +* Undergarments and socks +* A change of clothes in case of unexpected delays or spills +* Comfortable walking shoes or dress shoes +* Slippers or sandals for downtime (if applicable) +* Dressy outfit for evening events or dinners (if scheduled) + +**Toiletries:** + +* Toothbrush, toothpaste, and dental floss +* Deodorant, shampoo, conditioner, and body wash +* Razor and shaving cream (if applicable) +* Makeup and makeup remover (if applicable) +* Hairbrush or comb +* Contact lenses and solution (if applicable) +* Prescription medication and any necessary documentation + +**Electronics:** + +* Laptop and charger +* Phone and charger +* Tablet or e-reader (optional) +* Portable charger (recommended) +* Headphones or earbuds +* Power adapter (if traveling internationally) + +**Business Essentials:** + +* Briefcase or backpack with laptop sleeve +* Business cards and any necessary documents (e.g., contracts, presentations) +* Notebook and pen +* Calculator +* Travel-sized essentials like paper clips, stapler, and tape + +**Miscellaneous:** + +* Snacks (e.g., energy bars, nuts, or dried fruit) +* Water bottle +* Umbrella or raincoat (if rain is forecasted) +* Sunglasses +* Travel-sized essentials like eye mask, earplugs, or a neck pillow +* Cash, credit cards, and ID +* Travel itinerary and hotel reservation + +**Additional Tips:** + +* Pack clothes that can be easily mixed and matched to create multiple outfits. +* Consider packing clothing items that can be easily ironed or steamed to save time. +* Roll your clothes to save space in your luggage and reduce wrinkles. +* Wear your heaviest or bulkiest items (e.g., coat, boots) on the plane to save space in your luggage. +* Check the weather forecast for your destination and pack accordingly. +* Leave some extra space in your luggage for any items you might purchase during your trip. + +Remember to check with your airline for any specific luggage restrictions or requirements before your trip. Safe travels!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I'm also trying to figure out what to pack in my carry-on versus my checked luggage. Can you give me some general guidelines on that?","[$user$, ]",,"|||||||||| assistant |||||||||| + +Packing the right items in your carry-on versus checked luggage can make a big difference in your travel experience. Here are some general guidelines to help you decide: + +**Carry-on Luggage:** + +* **Essential items:** Pack essential items that you can't afford to lose or be without during the flight or in case your checked luggage is delayed. These include: + + Laptop and charger + + Phone and charger + + Wallet and passport + + Medications and prescriptions + + Glasses or contact lenses (if applicable) + + A change of clothes (in case of unexpected delays or spills) + + Travel documents (e.g., boarding pass, hotel reservation) +* **Valuables:** Pack valuable or irreplaceable items that you don't want to risk losing or damaging in checked luggage. These include: + + Jewelry + + Electronics (e.g., camera, tablet) + + Important papers or documents + + Cash and credit cards +* **Comfort items:** Pack items that will make your flight more comfortable: + + Headphones or earbuds + + Travel pillow or blanket + + Eye mask or earplugs + + Snacks and water + + Reading material or entertainment + +**Checked Luggage:** + +* **Bulkier items:** Pack items that are too large or heavy for your carry-on, such as: + + Clothing and shoes + + Toiletries (e.g., shampoo, conditioner, hair dryer) + + Luggage with wheels or hard shells + + Gifts or souvenirs +* **Less essential items:** Pack items that you don't need immediate access to during the flight or at your destination: + + Extra clothing or shoes + + Travel-sized essentials (e.g., toiletries, adapters) + + Non-essential electronics (e.g., hair straightener, curling iron) + +**Tips:** + +* **Pack layers:** Consider packing layers in your carry-on in case the plane gets cold or you need to remove items for security checks. +* **Choose the right bag:** Select a carry-on bag that fits under the seat in front of you or in the overhead compartment, and has multiple compartments to keep items organized. +* **Check TSA guidelines:** Familiarize yourself with the Transportation Security Administration's (TSA) guidelines on what items are allowed in carry-on and checked luggage. +* **Label your luggage:** Clearly label your luggage with your name, address, and contact information to ensure it's easily identifiable and can be returned to you if lost. + +Remember to check with your airline for specific carry-on and checked luggage size and weight restrictions before your trip. Happy packing!","[$assistant$, ]",,"|||||||||| user |||||||||| + +I'm still trying to figure out how to pack clothes more strategically. Do you have any tips on how to determine what to pack for a trip, and how many outfits I should aim to create with the clothes I bring?","[$user$, ]",,"|||||||||| assistant |||||||||| + +Packing clothes strategically is an art! Here are some tips to help you determine what to pack and how many outfits to aim for: + +**Determine What to Pack:** + +1. **Check the weather:** Research the weather forecast for your destination and pack accordingly. +2. **Consider the activities:** Think about the activities you'll be doing and pack clothes that are suitable for each occasion. +3. **Plan your outfits:** Think about what you'll wear each day and pack clothes that can be mixed and matched to create multiple outfits. +4. **Pack multipurpose items:** Choose items that can serve multiple purposes, such as a scarf that can be used as a blanket or a dressy accessory. +5. **Pack clothes that can be easily dressed up or down:** Bring clothes that can be easily dressed up or down to adapt to different situations. + +**How Many Outfits to Aim For:** + +1. **The 3-4-5 rule:** Aim to pack 3 tops, 4 bottoms, and 5 pairs of socks/undergarments. This will give you a good starting point for creating multiple outfits. +2. **Pack 1-2 versatile pieces:** Bring 1-2 versatile pieces that can be worn multiple times, such as a little black dress or a pair of well-fitting jeans. +3. **Aim for 3-5 outfits:** Try to create 3-5 outfits with the clothes you bring. This will give you enough options without overwhelming yourself with too many choices. +4. **Consider a capsule wardrobe:** If you're traveling for an extended period, consider packing a capsule wardrobe of 10-15 pieces that can be mixed and matched to create multiple outfits. + +**Packing Strategies:** + +1. **Roll your clothes:** Rolling your clothes instead of folding them can help reduce wrinkles and save space in your luggage. +2. **Pack clothes in categories:** Pack clothes in categories, such as tops, bottoms, dresses, and outerwear, to make it easier to find what you need. +3. **Use packing cubes:** Use packing cubes or small bags to organize your clothes and keep them visible. +4. **Pack a 'just in case' outfit:** Pack a spare outfit in case of unexpected delays or spills. + +**Additional Tips:** + +1. **Wear your heaviest items:** Consider wearing your heaviest or bulkiest items, such as your coat or boots, on the plane to save space in your luggage. +2. **Pack clothes that can be easily ironed:** Choose clothes that can be easily ironed or steamed to save time and effort. +3. **Pack clothes that are easy to mix and match:** Pack clothes that are easy to mix and match to create multiple outfits. +4. **Don't overpack:** Remember, you can always do laundry or purchase items if needed. Don't overpack and risk having to check a bag or deal with extra luggage fees. + +By following these tips, you'll be well on your way to packing clothes strategically and creating a versatile wardrobe for your trip!","[$assistant$, ]",,"|||||||||| user |||||||||| + +""That's really helpful! I've been trying to get better at packing, but I still tend to overpack. Like, on my last trip to Costa Rica, I brought 7 shirts and 5 pairs of shorts, but I only ended up wearing 3 of the shirts and 2 of the shorts. I guess I need to work on packing more essentials and fewer \""just in case\"" items.""","[user,]", diff --git a/tests/evals/data/utils.py b/tests/evals/data/utils.py new file mode 100644 index 00000000..8ff855c4 --- /dev/null +++ b/tests/evals/data/utils.py @@ -0,0 +1,166 @@ +import pandas as pd +from datetime import datetime, timedelta +import json +from graphiti_core.nodes import EpisodicNode, EpisodeType, EntityNode + +def create_episodes_from_messages(input_message, input_previous_messages): + """ + Create an episode and a list of previous episodes from input messages. + """ + # Current time for the episode + current_time = datetime.now() + + # Create the current episode + role = input_message["role"] + content = input_message["content"] + message_content = f"{role}: {content}" + episode = EpisodicNode( + name="", + group_id="", + source=EpisodeType.message, + type=EpisodeType.message, + source_description="", + content=message_content, + valid_at=current_time, + ) + + # Create previous episodes + num_previous_messages = len(input_previous_messages) + previous_times = [current_time - timedelta(minutes=num_previous_messages - i) for i in range(num_previous_messages)] + previous_episodes = [ + EpisodicNode( + name="", + group_id="", + source=EpisodeType.message, + source_description="", + content=f"{message['role']}: {message['content']}", + valid_at=previous_time, + ) + for message, previous_time in zip(input_previous_messages, previous_times) + ] + + return episode, previous_episodes + +async def ingest_and_label_snippet(llm_client, snippet_df, output_column_name): + # Import necessary functions + from graphiti_core.utils.maintenance.node_operations import extract_nodes, resolve_extracted_nodes + from graphiti_core.utils.maintenance.edge_operations import extract_edges + + # Loop through each unique message_index_within_snippet in sorted order + for message_index in sorted(snippet_df['message_index_within_snippet'].unique()): + message_df = snippet_df[snippet_df['message_index_within_snippet'] == message_index] + + #### Process 'extract_nodes' task + extract_nodes_row = message_df[message_df['task_name'] == 'extract_nodes'] + assert len(extract_nodes_row) == 1, f"There should be exactly one row for 'extract_nodes' but there are {len(extract_nodes_row)}" + input_message = json.loads(extract_nodes_row.iloc[0]['input_message']) + input_previous_messages = json.loads(extract_nodes_row.iloc[0]['input_previous_messages']) + episode, previous_episodes = create_episodes_from_messages(input_message, input_previous_messages) + extracted_nodes = await extract_nodes(llm_client, episode, previous_episodes) + snippet_df.at[extract_nodes_row.index[0], output_column_name] = json.dumps([entity_to_dict(node) for node in extracted_nodes]) + + #### Process 'dedupe_nodes' task + dedupe_nodes_row = message_df[message_df['task_name'] == 'dedupe_nodes'] + assert len(dedupe_nodes_row) == 1, "There should be exactly one row for 'dedupe_nodes' but there are {len(dedupe_nodes_row)}" + + # Calculate existing nodes list + existing_nodes = [] + for prev_message_index in sorted(snippet_df['message_index_within_snippet'].unique()): + if prev_message_index >= message_index: + break + + # Filter for previous messages with 'extract_nodes' task + prev_message_df = snippet_df[ + (snippet_df['message_index_within_snippet'] == prev_message_index) & + (snippet_df['task_name'] == 'extract_nodes') + ] + + # Retrieve and deserialize the nodes + serialized_nodes = prev_message_df.iloc[0][output_column_name] + node_dicts = json.loads(serialized_nodes) + nodes = [dict_to_entity(node_dict, EntityNode) for node_dict in node_dicts] + existing_nodes.extend(nodes) + + existing_nodes_lists = [existing_nodes for _ in range(len(extracted_nodes))] + resolved_nodes, uuid_map = await resolve_extracted_nodes(llm_client, extracted_nodes, existing_nodes_lists, episode, previous_episodes) + snippet_df.at[dedupe_nodes_row.index[0], output_column_name] = json.dumps([entity_to_dict(node) for node in resolved_nodes]) + + #### Process 'extract_edges' task + extract_edges_row = message_df[message_df['task_name'] == 'extract_edges'] + assert len(extract_edges_row) == 1, f"There should be exactly one row for 'extract_edges' but there are {len(extract_edges_row)}" + extracted_edges = await extract_edges( + llm_client, + episode, + extracted_nodes, + previous_episodes, + group_id='', + ) + snippet_df.at[extract_edges_row.index[0], output_column_name] = json.dumps([entity_to_dict(edge) for edge in extracted_edges]) + + ########## TODO: Complete the implementation of the below + + #### Process 'dedupe_edges' task + # dedupe_edges_row = message_df[message_df['task_name'] == 'dedupe_edges'] + # assert len(dedupe_edges_row) == 1, "There should be exactly one row for 'dedupe_edges'" + # output = dedupe_extracted_edge( + # llm_client, + # extracted_edge, + # related_edges, + # ) + # snippet_df.at[dedupe_edges_row.index[0], output_column_name] = output + + #### Process 'extract_edge_dates' task + # extract_edge_dates_row = message_df[message_df['task_name'] == 'extract_edge_dates'] + # assert len(extract_edge_dates_row) == 1, "There should be exactly one row for 'extract_edge_dates'" + # output = extract_edge_dates(extract_edge_dates_row.iloc[0]['input_extracted_edge_dates']) + # snippet_df.at[extract_edge_dates_row.index[0], output_column_name] = output + + #### Process 'edge_invalidation' task + # edge_invalidation_row = message_df[message_df['task_name'] == 'edge_invalidation'] + # assert len(edge_invalidation_row) == 1, "There should be exactly one row for 'edge_invalidation'" + # output = edge_invalidation(edge_invalidation_row.iloc[0]['input_edge_invalidation']) + # snippet_df.at[edge_invalidation_row.index[0], output_column_name] = output + + return snippet_df + + +async def ingest_and_label_minidataset(llm_client, minidataset_df, output_column_name): + # Add a new column with the specified name, initialized with empty values + minidataset_df[output_column_name] = None + + minidataset_labelled_df = None + for snippet_index in sorted(minidataset_df['snippet_index'].unique()): + snippet_df = minidataset_df[minidataset_df['snippet_index'] == snippet_index] + + # Pass the output column name to the ingest_and_label_snippet function + snippet_df_labelled = await ingest_and_label_snippet(llm_client, snippet_df, output_column_name) + + if minidataset_labelled_df is None: + minidataset_labelled_df = snippet_df_labelled + else: + minidataset_labelled_df = pd.concat([minidataset_labelled_df, snippet_df_labelled]) + + return minidataset_labelled_df + +def entity_to_dict(entity): + """ + Convert an entity object to a dictionary, handling datetime serialization. + """ + entity_dict = vars(entity) + for key, value in entity_dict.items(): + if isinstance(value, datetime): + entity_dict[key] = value.isoformat() # Convert datetime to ISO 8601 string + return entity_dict + +def dict_to_entity(entity_dict, entity_class): + """ + Convert a dictionary back to an entity object, handling datetime deserialization. + """ + for key, value in entity_dict.items(): + try: + # Attempt to parse strings back to datetime objects + entity_dict[key] = datetime.fromisoformat(value) + except (ValueError, TypeError): + # If parsing fails, keep the original value + pass + return entity_class(**entity_dict) \ No newline at end of file diff --git a/tests/evals/eval_extract_nodes.py b/tests/evals/eval_extract_nodes.py new file mode 100644 index 00000000..720fb780 --- /dev/null +++ b/tests/evals/eval_extract_nodes.py @@ -0,0 +1,151 @@ +""" +Copyright 2024, Zep Software, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import os +import json +from tests.evals.utils import setup_logging, ingest_snippet +from datetime import datetime, timedelta + +import pytest +from dotenv import load_dotenv + +from graphiti_core.edges import EntityEdge, EpisodicEdge +from graphiti_core.graphiti import Graphiti +from graphiti_core.nodes import EntityNode, EpisodicNode + +from graphiti_core.utils.maintenance.node_operations import extract_nodes +from graphiti_core.llm_client import OpenAIClient +from graphiti_core.llm_client.config import LLMConfig +from graphiti_core.nodes import EpisodeType + +import csv # Add this import at the top of the file + + + + +############# EVERYTHING BELOW IS OUTDATED + +# Setup +load_dotenv() +pytestmark = pytest.mark.integration +pytest_plugins = ('pytest_asyncio',) +logger = setup_logging() + + +async def general_extract_nodes_test(llm_client, data_sample): + episode = data_sample['episode'] + previous_episodes = data_sample['previous_episodes'] + gold_answer_names = data_sample['gold_answer_names'] + + hypothesis_nodes = await extract_nodes(llm_client, episode, previous_episodes) + hypothesis_node_names = [node.name for node in hypothesis_nodes] + + # Sort both lists by node name + hypothesis_node_names.sort() + gold_answer_names.sort() + + # assert hypothesis_node_names == gold_answer_names, \ + # f"""Test Failed. Expected nodes: {gold_answer_names}. Got: {hypothesis_node_names}""" + + return hypothesis_node_names + + + + + +def prepare_data_from_csv(data_file_name, question_id, session_idx, message_idx): + + samples_csv_path = "tests/evals/data/" + data_file_name + ".csv" + + # From CSV path, load everything + with open(samples_csv_path, 'r') as file: + csv_reader = csv.DictReader(file) + lme_samples = list(csv_reader) + + + data_samples = [] + + # Loop through each row + for row in lme_samples: + + ### Prepare episode + current_time = datetime.now() + message = json.loads(row["message"]) + role = message["role"] + content = message["content"] + message_content = role + ": " + content + episode = EpisodicNode( + name="", + group_id="", + source=EpisodeType.message, + type=EpisodeType.message, + source_description="", + content=message_content, + valid_at=current_time, + ) + + ### Prepare previous episodes + previous_messages = json.loads(row["previous_messages"]) + num_previous_messages = len(previous_messages) + previous_times = [current_time - timedelta(minutes=num_previous_messages-i) for i in range(num_previous_messages)] + previous_episodes = [EpisodicNode( + name="", + group_id="", + source=EpisodeType.message, + source_description="", + content=message["role"] + ": " + message["content"], + valid_at=previous_time, + ) for message, previous_time in zip(previous_messages, previous_times)] + + ### TODO: Prepare gold answer names + + ### Add to data samples list + data_samples.append({ + "episode": episode, + "previous_episodes": previous_episodes, + "gold_answer_names": [], + }) + + return data_samples + + + + + +@pytest.mark.asyncio +async def test_extract_nodes(): + model_name = 'gpt-4o-mini' + llm_config = LLMConfig( + api_key=os.getenv('OPENAI_API_KEY'), + model=model_name, + ) + llm_client = OpenAIClient(config=llm_config) + + data_file_name = 'output_short' + question_id = "gpt4_2655b836" + session_idx = 0 + message_idx = 0 + data_samples = prepare_data_from_csv(data_file_name, question_id, session_idx, message_idx) + + for data_sample in data_samples: + print(f"\n\nEpisode: {data_sample['episode']}") + print("*"*50) + print(f"Previous Episodes: {data_sample['previous_episodes']}") + print("*"*50) + # print(f"Gold Answer Names: {gold_answer_names}") + + await general_extract_nodes_test(llm_client, data_sample) + diff --git a/tests/evals/pytest.ini b/tests/evals/pytest.ini new file mode 100644 index 00000000..37735bfb --- /dev/null +++ b/tests/evals/pytest.ini @@ -0,0 +1,4 @@ +[pytest] +asyncio_default_fixture_loop_scope = function +markers = + integration: marks tests as integration tests \ No newline at end of file diff --git a/tests/evals/utils.py b/tests/evals/utils.py new file mode 100644 index 00000000..c480f1ee --- /dev/null +++ b/tests/evals/utils.py @@ -0,0 +1,23 @@ +import logging +import sys + + +def setup_logging(): + # Create a logger + logger = logging.getLogger() + logger.setLevel(logging.INFO) # Set the logging level to INFO + + # Create console handler and set level to INFO + console_handler = logging.StreamHandler(sys.stdout) + console_handler.setLevel(logging.INFO) + + # Create formatter + formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') + + # Add formatter to console handler + console_handler.setFormatter(formatter) + + # Add console handler to logger + logger.addHandler(console_handler) + + return logger