From 8c698d6dfb428cc1fc7afd2b68dde4faace29978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Thu, 30 Oct 2025 19:40:39 +0100 Subject: [PATCH] improvements async --- benchmarks/locomo/benchmark_results.json | 4316 +++++++++++----------- benchmarks/locomo/run_benchmark.py | 5 +- memory/entity_resolver.py | 517 ++- memory/temporal_semantic_memory.py | 986 ++--- pyproject.toml | 3 +- tests/conftest.py | 13 +- uv.lock | 102 +- 7 files changed, 2771 insertions(+), 3171 deletions(-) diff --git a/benchmarks/locomo/benchmark_results.json b/benchmarks/locomo/benchmark_results.json index 408b16f8..af47506c 100644 --- a/benchmarks/locomo/benchmark_results.json +++ b/benchmarks/locomo/benchmark_results.json @@ -1,2338 +1,2228 @@ { - "overall_accuracy": 60.0, - "total_correct": 6, - "total_questions": 10, + "overall_accuracy": 26.0, + "total_correct": 13, + "total_questions": 50, "conversation_results": [ { "sample_id": "conv-26", "metrics": { - "accuracy": 60.0, - "correct": 6, - "total": 10, + "accuracy": 26.0, + "correct": 13, + "total": 50, "category_stats": { - "1": { - "correct": 2, - "total": 3 - }, - "2": { - "correct": 3, - "total": 6 - }, "3": { "correct": 1, - "total": 1 + "total": 7 + }, + "1": { + "correct": 1, + "total": 19 + }, + "2": { + "correct": 11, + "total": 24 } }, "detailed_results": [ { - "question": "What is Caroline's relationship status?", - "correct_answer": "Single", + "question": "Would Caroline still want to pursue counseling as a career if she hadn't received support growing up?", + "correct_answer": "Likely no", "predicted_answer": "I don't know", - "reasoning": "The context does not provide any information about Caroline's current relationship status. It mentions a tough breakup in the past, but there is no indication of whether she is currently in a relationship or single.", + "reasoning": "Items 0\u20132 state that Caroline is interested in and researching counseling to help others with similar challenges, but they provide no information about whether she received support growing up or how a lack of support would have affected her career motivation. Therefore, the counterfactual cannot be answered from the given context.", + "category": 3, + "retrieved_memories": [ + { + "id": "bc68a8e2-73de-4a2b-a296-b889e6e0bede", + "text": "Caroline is interested in pursuing a career in counseling or mental health so she can support people with similar issues.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.4034510767670415, + "activation": 0.8448369225568052, + "semantic_similarity": 0.0, + "recency": 4.409250226466841e-40, + "frequency": 2.0 + }, + { + "id": "27373bd4-58ac-4e3f-814c-45ca3fb29f4a", + "text": "Caroline has been researching counseling and mental health as a career to help people who have experienced similar challenges to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.38781677113871443, + "activation": 0.7927225704623815, + "semantic_similarity": 0.0, + "recency": 6.454096386043482e-38, + "frequency": 2.0 + }, + { + "id": "12ed2fc9-65d8-4cf9-937f-5548672e8ad9", + "text": "On 2023-07-12, Caroline started looking into counseling and mental\u2011health career options to help others on their personal journeys.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-12T16:33:00+00:00", + "weight": 0.37023839950561677, + "activation": 0.734127998352056, + "semantic_similarity": 0.0, + "recency": 2.964926245314209e-37, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not convey the same meaning as the correct answer 'Likely no'. It expresses uncertainty rather than the expected negative response, so they are not equivalent." + }, + { + "question": "What career path has Caroline decided to persue?", + "correct_answer": "counseling or mental health for Transgender people", + "predicted_answer": "I don\u2019t know.", + "reasoning": "Item 1 and 2 show Caroline is interested in and researching counseling/mental health, and item 0 says she\u2019s exploring options, but none state she has made a definite decision on a career path.", "category": 1, "retrieved_memories": [ { - "id": "0b5694e4-7c0b-422c-bed4-588d92fb067f", - "text": "Caroline has known her current friends for four years, having moved from her home country around 2019-06-09.", + "id": "c56cff23-c869-4b69-ab1e-ca6e768c2b9b", + "text": "Caroline plans to continue her education and explore career options, expressing excitement about these next steps.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.39910753672674126, + "activation": 0.8303584557558041, + "semantic_similarity": 0.0, + "recency": 4.40925330709472e-40, + "frequency": 2.0 + }, + { + "id": "bc68a8e2-73de-4a2b-a296-b889e6e0bede", + "text": "Caroline is interested in pursuing a career in counseling or mental health so she can support people with similar issues.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.38599095559066643, + "activation": 0.7866365186355548, + "semantic_similarity": 0.0, + "recency": 4.409253306701784e-40, + "frequency": 2.0 + }, + { + "id": "27373bd4-58ac-4e3f-814c-45ca3fb29f4a", + "text": "Caroline has been researching counseling and mental health as a career to help people who have experienced similar challenges to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.37738919094865414, + "activation": 0.7579639698288472, + "semantic_similarity": 0.0, + "recency": 6.454100895045491e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don\u2019t know.' does not provide the correct career path (counseling or mental health for Transgender people), so it is not equivalent." + }, + { + "question": "When did Melanie go camping in June?", + "correct_answer": "The week before 27 June 2023", + "predicted_answer": "I don't know", + "reasoning": "None of the provided context items mention a camping trip in June. Item 0 is August 23, 2023; item 1 is July 8\u20139, 2023; and item 2 says \u201clast week\u201d without a specific date. Therefore, there is no information about a June camping trip.", + "category": 2, + "retrieved_memories": [ + { + "id": "f279b6c9-c6bf-41b2-a0f5-910e095b9920", + "text": "Melanie went camping with her kids on 2023-08-23, explored the forest, hiked, and had a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T00:00:00+00:00", + "weight": 0.38955792542319917, + "activation": 0.7985264180773306, + "semantic_similarity": 0.0, + "recency": 1.845447155648818e-35, + "frequency": 2.0 + }, + { + "id": "59bc760e-185f-46fc-baf0-d9d894871c09", + "text": "Melanie went camping with her family during the weekend of July 8\u20139, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-08T00:00:00+00:00", + "weight": 0.3827045340957964, + "activation": 0.7756817803193213, + "semantic_similarity": 0.0, + "recency": 1.8550131681986396e-37, + "frequency": 2.0 + }, + { + "id": "a3e155a9-36b4-49e6-b450-53ad02e14c68", + "text": "Melanie took her family camping in the mountains last week.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-20T10:37:00+00:00", + "weight": 0.3698156899158863, + "activation": 0.7327189663862878, + "semantic_similarity": 0.0, + "recency": 3.2050029115715386e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not provide the information that Melanie went camping the week before 27 June 2023, so it is not equivalent to the correct answer." + }, + { + "question": "When did Caroline go to the LGBTQ conference?", + "correct_answer": "10 July 2023", + "predicted_answer": "2023-07-10", + "reasoning": "Context 0 explicitly states she attended an LGBTQ conference on 2023-07-10, and Context 1 corroborates the same date. Context 2 is about a different event (a counseling workshop) and is not relevant.", + "category": 2, + "retrieved_memories": [ + { + "id": "6aeafc72-1f98-4e7e-994d-26d83105cecd", + "text": "Caroline attended an LGBTQ conference on 2023-07-10, describing it as special and welcoming.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-10T16:33:00+00:00", + "weight": 0.4040848092462066, + "activation": 0.8469493641540222, + "semantic_similarity": 0.0, + "recency": 2.4274779679729867e-37, + "frequency": 2.0 + }, + { + "id": "650fe33d-7b81-4ff7-b3f0-1a54ba21e48b", + "text": "At the LGBTQ conference on 2023-07-10, Caroline met and connected with people who have experienced similar gender\u2011identity journeys.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-10T16:33:00+00:00", + "weight": 0.40125966668128965, + "activation": 0.8375322222709656, + "semantic_similarity": 0.0, + "recency": 2.427477967821271e-37, + "frequency": 2.0 + }, + { + "id": "78e6378d-91b1-4c1e-8599-be9a9ff13d06", + "text": "Caroline attended an LGBTQ+ counseling workshop on Friday, June 23, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-23T10:37:00+00:00", + "weight": 0.401134443283081, + "activation": 0.8371148109436035, + "semantic_similarity": 0.0, + "recency": 4.3263131629732905e-38, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer '2023-07-10' represents the same date as the correct answer '10 July 2023', just in a different format, so they are equivalent." + }, + { + "question": "When did Caroline meet up with her friends, family, and mentors?", + "correct_answer": "The week before 9 June 2023", + "predicted_answer": "I don't know", + "reasoning": "Item 0 only states that friends, family, and mentors are Caroline\u2019s sources of motivation, without any timing. Item 1 gives when she has known her friends (since around 2019-06-09) but not a specific meet-up date, nor anything about family or mentors. Item 2 mentions meeting young LGBTQ individuals on July 17, 2023, which concerns mentees, not her friends, family, or mentors. Therefore, the context does not specify when she met up with her friends, family, and mentors.", + "category": 2, + "retrieved_memories": [ + { + "id": "0aa11340-9afa-4c43-9782-98757ac9efe6", + "text": "Caroline identified her friends, family, and mentors as her sources of motivation.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5928971016147087, - "activation": 0.738161846289745, - "semantic_similarity": 0.7381618257592838, - "recency": 1.1144095709452762e-38, + "weight": 0.3834184169769287, + "activation": 0.7780613899230957, + "semantic_similarity": 0.0, + "recency": 1.109005990087586e-38, "frequency": 2.0 }, { - "id": "43224c50-a69d-4d79-bda5-98253119a520", - "text": "Caroline expressed appreciation for her friendship with Melanie.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.5855437934744278, - "activation": 0.725906290831977, - "semantic_similarity": 0.7259063540827823, - "recency": 1.0781237162542037e-35, - "frequency": 2.0 - }, - { - "id": "1e910def-a7cb-4593-be18-99c833176fa3", - "text": "Caroline's gender transition and artistic expression have altered her relationships: some close friends continue to support her, while a few could not handle the changes; overall she feels happier and her relationships now feel more genuine.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.581743502522861, - "activation": 0.719572463048328, - "semantic_similarity": 0.7195725453612087, - "recency": 1.5153148641642148e-34, - "frequency": 2.0 - }, - { - "id": "7f5db464-eed6-4af6-b3bc-820f94193202", - "text": "Caroline feels lucky to have Melanie as a friend who reminds her of happy moments and supports her during life's struggles.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.5294705960529247, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6841769541775008, - "recency": 1.078119636786517e-35, - "frequency": 2.0 - }, - { - "id": "de8d33ff-fe15-4f25-80f8-c534bc9ceb05", - "text": "Melanie and Caroline consider that they can always be there for each other, indicating a mutual supportive relationship.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.5256005666944299, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6712768563158512, - "recency": 7.796889739732441e-33, - "frequency": 2.0 - }, - { - "id": "ad619ec1-c081-4fab-bb8f-707d8eed6fc0", - "text": "Caroline mentioned a tough breakup in the past and expressed thankfulness for her friends, family, and mentors who have supported her.", + "id": "eb08c29e-5e83-4c46-8660-25f9259d29c5", + "text": "Caroline has known her current group of friends for four years, since moving from her home country around 2019-06-09.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5232549537202421, - "activation": 0.590529477031796, - "semantic_similarity": 0.6536537020356776, - "recency": 1.1144053544427697e-38, + "weight": 0.3780273914337158, + "activation": 0.7600913047790527, + "semantic_similarity": 0.0, + "recency": 1.109005990061913e-38, "frequency": 2.0 }, { - "id": "aa36595e-58ca-42dc-b50d-8c785526bbf3", - "text": "Melanie's support has been meaningful to Caroline; Caroline feels grateful for Melanie's support throughout her journey and values being able to share and help others.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.520671892248089, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6548479414947148, - "recency": 7.796889740120575e-33, - "frequency": 2.0 - }, - { - "id": "5e2c78a6-b363-44f7-a74b-23b7b61980f9", - "text": "Caroline has been looking into counseling or mental health work since her last conversation with Melanie, expressing passion for helping people, describing the work as tough but rewarding.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-06T20:18:00+00:00", - "weight": 0.5166050086282288, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6412916627618478, - "recency": 1.6608494086599004e-37, - "frequency": 2.0 - }, - { - "id": "98c08619-7bb3-467c-a87e-027ee4b31021", - "text": "Both Caroline and Melanie affirmed their commitment to continue supporting each other, spreading love, acceptance, and hope, and to motivate each other through life's challenges.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5154365483453377, - "activation": 0.590529477031796, - "semantic_similarity": 0.6275923507859963, - "recency": 1.1144053548684114e-38, - "frequency": 2.0 - }, - { - "id": "60fa2ddb-d241-4067-910e-ad8b864ac31b", - "text": "Melanie said that Caroline has always been there for her, and she appreciates their friendship.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.5153598866708379, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6371412562372113, - "recency": 1.0781196367128996e-35, - "frequency": 2.0 - }, - { - "id": "d20a1038-61b6-4baa-9d6a-7d3a729434af", - "text": "Caroline expressed gratitude for the love and support she has received throughout her transition and aims to give a voice to the trans community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5147455739355009, - "activation": 0.590529477031796, - "semantic_similarity": 0.6252891027532071, - "recency": 1.1144053547845722e-38, - "frequency": 2.0 - }, - { - "id": "71e5a874-ce13-49df-a1a2-8f9fa377324c", - "text": "Caroline commented on Melanie's purple shoes, asking whether they are intended for walking or running.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.5136131344114743, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6313187487059991, - "recency": 2.9793470414229446e-37, - "frequency": 2.0 - }, - { - "id": "73850c77-935b-45c3-9a68-3552e0f85121", - "text": "Caroline emphasizes that mental health is a priority and advises Melanie to take care of herself.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.5120275116131798, - "activation": 0.5807250326655816, - "semantic_similarity": 0.626033339378351, - "recency": 2.9793470416780796e-37, - "frequency": 2.0 - }, - { - "id": "50dd73e8-e477-4c45-b052-b3eae96a1a6a", - "text": "Melanie expressed pride in Caroline's work and said she is proud to be part of the difference Caroline is making.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5110527232495037, - "activation": 0.590529477031796, - "semantic_similarity": 0.6129796004665498, - "recency": 1.1144053547510302e-38, - "frequency": 2.0 - }, - { - "id": "006df526-f850-48a9-a2f3-a13799f0391c", - "text": "Melanie states that the conversation with Caroline has been great for her mental health and she intends to continue the positive practices.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.5098334678141485, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6187198600482468, - "recency": 2.9793470418677586e-37, - "frequency": 2.0 - }, - { - "id": "d4afd073-6eda-41ec-b138-8fc46c23bc23", - "text": "Caroline has not yet tried pottery but is interested in trying new art forms and may try pottery sometime in the future.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5093245191024905, - "activation": 0.5756579704386624, - "semantic_similarity": 0.6220904265696393, - "recency": 1.5153019395586813e-34, - "frequency": 2.0 - }, - { - "id": "c7ffecc3-a614-401d-9f62-a23753c7ca5f", - "text": "Melanie has been reading a book that Caroline recommended a while ago and has been painting to keep busy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5082040688672157, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6132885302251372, - "recency": 3.177913671815118e-33, - "frequency": 2.0 - }, - { - "id": "ff8318fb-cbb5-4f95-a985-da11cfb910df", - "text": "Caroline painted a piece after visiting an LGBTQ center, intending to capture the community's unity and strength; she shared this painting with Melanie on July 17, 2023.", + "id": "dacb9dd9-745d-43ea-91ba-8b339634222e", + "text": "Caroline met and supported several amazing young LGBTQ individuals through her mentorship program as of July 17, 2023.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.5053548330296247, - "activation": 0.5807250326655816, - "semantic_similarity": 0.6037910774331675, - "recency": 4.870691184975256e-37, + "weight": 0.37261128492985035, + "activation": 0.7420376164328345, + "semantic_similarity": 0.0, + "recency": 4.847092383734418e-37, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not provide the information that Caroline met up with her friends, family, and mentors the week before 9 June 2023, so it is not equivalent to the correct answer." + }, + { + "question": "When did Caroline go to the LGBTQ support group?", + "correct_answer": "7 May 2023", + "predicted_answer": "2023-05-07", + "reasoning": "I used context items 0 and 2, both of which explicitly state that the LGBTQ support group took place on 2023-05-07. Context item 1 is about the name of an activist group and is not relevant to the date of the support group.", + "category": 2, + "retrieved_memories": [ + { + "id": "1e8a9e7c-5863-4905-a51b-5cb6d54b3d98", + "text": "Caroline attended an LGBTQ support group on 2023-05-07 and described the experience as powerful.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-07T13:56:00+00:00", + "weight": 0.4058046774805987, + "activation": 0.8526822582686624, + "semantic_similarity": 0.0, + "recency": 3.989648288417692e-40, "frequency": 2.0 }, { - "id": "f62cd380-3b68-4116-b0b3-787ce4c96eac", - "text": "Caroline advised Melanie to research and find an adoption agency or lawyer, gather necessary documents such as references, financial information, and medical checks, and to prepare emotionally because the waiting period can be hard.", + "id": "2ad708a1-5d1d-4eb7-bba5-c4fcd0edea17", + "text": "The activist group Caroline joined is called 'Connected LGBTQ Activists'.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.39966558066000774, + "activation": 0.8322186022000259, + "semantic_similarity": 0.0, + "recency": 6.7201768177400585e-37, + "frequency": 2.0 + }, + { + "id": "4a4b6853-9827-4768-9d65-e4d9b773e8a1", + "text": "During the LGBTQ support group on 2023-05-07, Caroline heard inspiring transgender stories, which made her feel happy and thankful for the support.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-07T13:56:00+00:00", + "weight": 0.39841789151483464, + "activation": 0.8280596383827821, + "semantic_similarity": 0.0, + "recency": 3.989648288020648e-40, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer 2023-05-07 represents the same date as the correct answer 7 May 2023, just in a different format, so they are equivalent." + }, + { + "question": "What activities does Melanie partake in?", + "correct_answer": "pottery, camping, painting, swimming", + "predicted_answer": "Playing games, eating good food, hanging out with family, and painting.", + "reasoning": "From context 0, Melanie participated in a family gathering where they played games, ate good food, and hung out together. From context 2, she uses painting as an activity. I did not include context 1 because it mentions only that she would start thinking about activities for a future trip, not that she currently partakes in them.", + "category": 1, + "retrieved_memories": [ + { + "id": "f5b06217-19e9-4833-a8be-f0ef73e80b38", + "text": "Melanie described a recent family gathering where they played games, ate good food, and hung out together.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.3740292415601471, + "activation": 0.7467641385338237, + "semantic_similarity": 0.0, + "recency": 1.109006696940515e-38, + "frequency": 2.0 + }, + { + "id": "ea2fceb6-cf7c-44fc-befb-847d2bc3b58e", + "text": "Melanie said she would start thinking about possible activities for their upcoming trip.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.37393401861190795, + "activation": 0.7464467287063599, + "semantic_similarity": 0.0, + "recency": 1.072896763250883e-35, + "frequency": 2.0 + }, + { + "id": "47cfe483-0e40-4ad7-a233-ed7a14ce0f68", + "text": "Melanie uses painting as a fun way to express her feelings, be creative, and relax after a long day.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.3691351532936096, + "activation": 0.7304505109786987, + "semantic_similarity": 0.0, + "recency": 4.4092489877331334e-40, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer only includes painting, whereas the correct answer lists pottery, camping, painting, and swimming. The other activities mentioned (playing games, eating good food, hanging out with family) are not in the correct answer, so the answers are not equivalent." + }, + { + "question": "When did Caroline go to a pride parade during the summer?", + "correct_answer": "The week before 3 July 2023", + "predicted_answer": "June 24, 2023, and August 11, 2023.", + "reasoning": "Item 0 states she attended a pride parade on June 24, 2023, and item 1 states she attended a pride parade on August 11, 2023. Item 2 mentions an LGBT pride event around June 15, 2023, but does not specify it was a parade, so I did not use it for the parade dates.", + "category": 2, + "retrieved_memories": [ + { + "id": "e92f48a8-24a9-4365-b894-d9683769b3d7", + "text": "Caroline attended a pride parade approximately three weeks earlier on June 24, 2023, participated actively, and felt accepted, happy, proud, grateful, and inspired by the community.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-24T13:51:00+00:00", + "weight": 0.3971421182155609, + "activation": 0.8238070607185364, + "semantic_similarity": 0.0, + "recency": 4.846164682182654e-38, + "frequency": 2.0 + }, + { + "id": "ed71c015-c527-4a3f-89a8-e0dc28ea28c1", + "text": "Caroline attended a pride parade on Friday, August 11, 2023, experiencing high energy, love, and feeling proud, reinforcing the importance of standing up for equality.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-11T14:24:00+00:00", + "weight": 0.3929653857370985, + "activation": 0.8098846191236618, + "semantic_similarity": 0.0, + "recency": 5.902105110069633e-36, + "frequency": 2.0 + }, + { + "id": "10d92dc2-6be4-4d26-819b-8a3ac334739b", + "text": "Caroline and her mentee attended an LGBT pride event in June 2023 (approximately June 15) and had a great time.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-15T00:00:00+00:00", + "weight": 0.3865090191364288, + "activation": 0.7883633971214294, + "semantic_similarity": 0.0, + "recency": 1.8598191867234676e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The correct answer specifies the week before 3 July 2023 (approximately late June 2023). The predicted answer lists two dates, June 24, 2023 and August 11, 2023, which do not correspond to that week and include an unrelated August date. Therefore they are not equivalent." + }, + { + "question": "What is Caroline's identity?", + "correct_answer": "Transgender woman", + "predicted_answer": "An artist.", + "reasoning": "Items 0 and 1 state Caroline loves creating art and uses painting for self-expression, indicating her identity as an artist. Item 2 shows she advocates for the LGBTQ+ community but doesn\u2019t specify her own LGBTQ+ identity.", + "category": 1, + "retrieved_memories": [ + { + "id": "59ca2a4a-70bb-41db-983a-0749b7aea9a1", + "text": "Caroline has been trying abstract painting recently as a form of self\u2011expression.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5012917682997061, - "activation": 0.5807250326655816, - "semantic_similarity": 0.5902475283334387, - "recency": 3.177913672068922e-33, + "weight": 0.3623806767236787, + "activation": 0.707935589078929, + "semantic_similarity": 0.0, + "recency": 3.162526584909896e-33, "frequency": 2.0 }, { - "id": "a8b8baac-87de-4f41-b0c5-b32f2870f1d6", - "text": "Caroline is inspired by her work that makes a difference for the LGBTQ+ community, believing that helping create a more loving world is amazing, and this inspiration motivates her to keep making art.", + "id": "ecbe1bf6-7f69-40ac-afc4-e7e58e03f4bc", + "text": "Caroline loves creating art and uses painting as a form of self-expression.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.501231271249604, - "activation": 0.5756579704386624, - "semantic_similarity": 0.5951129337266843, - "recency": 1.5153019392219583e-34, + "event_date": "2023-08-23T15:31:00+00:00", + "weight": 0.36224655472497563, + "activation": 0.7074885157499188, + "semantic_similarity": 0.0, + "recency": 1.9687026639614273e-35, + "frequency": 2.0 + }, + { + "id": "cb96376b-7a1e-479e-a6a1-c09864dd44b0", + "text": "Caroline uses her art to speak up for the LGBTQ+ community and promote acceptance.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-14T14:24:00+00:00", + "weight": 0.36213961243629605, + "activation": 0.7071320414543202, + "semantic_similarity": 0.0, + "recency": 7.966992705400764e-36, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer \"An artist\" does not convey the same information as the correct answer \"Transgender woman\"; they are unrelated and not equivalent." + }, + { + "question": "When is Melanie's daughter's birthday?", + "correct_answer": "13 August", + "predicted_answer": "August 13", + "reasoning": "Item 0 states she celebrated her daughter\u2019s birthday with a concert on the evening of August 13, 2023, and item 2 also references a photo from the daughter\u2019s birthday concert on August 13, 2023. These both indicate the birthday is on August 13. Item 1 about her marriage is not relevant.", + "category": 2, + "retrieved_memories": [ + { + "id": "a52890c5-9f42-4ea1-b805-28a9614c2106", + "text": "Melanie celebrated her daughter's birthday with a concert on the evening of August 13, 2023, featuring music, joy, a warm summer breeze, and she observed her children's smiles.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-13T14:24:00+00:00", + "weight": 0.3795457268302782, + "activation": 0.7651524227675942, + "semantic_similarity": 0.0, + "recency": 7.208830647550485e-36, + "frequency": 2.0 + }, + { + "id": "db2171ee-ecd6-4c14-be2b-f73b8206aaf0", + "text": "Melanie has been married for five years, with the marriage beginning around 2018-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2018-06-09T19:55:00+00:00", + "weight": 0.36590120243731755, + "activation": 0.7196706747910585, + "semantic_similarity": 0.0, + "recency": 5.530457207804919e-118, + "frequency": 2.0 + }, + { + "id": "b8915b50-897e-4193-bf50-a43cd09b6b6f", + "text": "Melanie shared a photograph taken at her daughter's birthday concert on August 13, 2023, showing everyone having a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-13T14:24:00+00:00", + "weight": 0.35794946551322937, + "activation": 0.6931648850440979, + "semantic_similarity": 0.0, + "recency": 7.208830646607696e-36, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer 'August 13' conveys the same date as the correct answer '13 August', just with month and day swapped in order, so they are equivalent." + }, + { + "question": "When did Caroline attend a pride parade in August?", + "correct_answer": "The Friday before 14 August 2023", + "predicted_answer": "August 11, 2023", + "reasoning": "Items 0 and 2 explicitly state that Caroline attended a pride parade on Friday, August 11, 2023. Item 1 refers to June 24, 2023, which is not in August, so it was not used for the answer.", + "category": 2, + "retrieved_memories": [ + { + "id": "ed71c015-c527-4a3f-89a8-e0dc28ea28c1", + "text": "Caroline attended a pride parade on Friday, August 11, 2023, experiencing high energy, love, and feeling proud, reinforcing the importance of standing up for equality.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-11T14:24:00+00:00", + "weight": 0.4069359387793582, + "activation": 0.8564531292645273, + "semantic_similarity": 0.0, + "recency": 5.902111884952574e-36, + "frequency": 2.0 + }, + { + "id": "e92f48a8-24a9-4365-b894-d9683769b3d7", + "text": "Caroline attended a pride parade approximately three weeks earlier on June 24, 2023, participated actively, and felt accepted, happy, proud, grateful, and inspired by the community.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-24T13:51:00+00:00", + "weight": 0.4008032619953156, + "activation": 0.8360108733177185, + "semantic_similarity": 0.0, + "recency": 4.846170243569312e-38, + "frequency": 2.0 + }, + { + "id": "f0610bb9-a915-4520-ac6e-f95ee704c8b0", + "text": "The crowd at the pride parade on August 11, 2023, celebrating love and acceptance, inspired Caroline to keep fighting for LGBTQ rights.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-11T14:24:00+00:00", + "weight": 0.3998436778876978, + "activation": 0.8328122596256593, + "semantic_similarity": 0.0, + "recency": 5.902111883073962e-36, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The Friday before 14 August 2023 falls on 11 August 2023, which matches the predicted answer." + }, + { + "question": "When did Caroline give a speech at a school?", + "correct_answer": "The week before 9 June 2023", + "predicted_answer": "At a school event.", + "reasoning": "Item 2 states she \u201cgave a talk at a school event,\u201d which is the only timing-related detail. Items 0 and 1 describe her feelings and content but not when it occurred. No specific date is given in the context.", + "category": 2, + "retrieved_memories": [ + { + "id": "296a4c2c-2b81-4971-bb68-da2db6b44649", + "text": "Caroline felt powerful while delivering her talk at the school event.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-02T19:55:00+00:00", + "weight": 0.39078829762970607, + "activation": 0.802627658765687, + "semantic_similarity": 0.0, + "recency": 5.5071644483790796e-39, + "frequency": 2.0 + }, + { + "id": "ecddbb67-bbd0-4064-8cfb-ac4f3f5556c6", + "text": "Caroline shared details of her personal journey, struggles, and personal development since coming out during the school talk.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-02T19:55:00+00:00", + "weight": 0.3872858405113237, + "activation": 0.7909528017044124, + "semantic_similarity": 0.0, + "recency": 5.5071644482643484e-39, + "frequency": 2.0 + }, + { + "id": "9b1d384d-7c35-4925-a71e-2cc7f60fda85", + "text": "Caroline gave a talk at a school event about her transgender journey and encouraged students to get involved in the LGBTQ community.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-02T19:55:00+00:00", + "weight": 0.37994907319849336, + "activation": 0.7664969106616445, + "semantic_similarity": 0.0, + "recency": 5.5071644482005655e-39, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'At a school event' does not provide the specific timing 'The week before 9 June 2023', so it does not match the correct answer." + }, + { + "question": "When did Caroline join a new activist group?", + "correct_answer": "The Tuesday before 20 July 2023", + "predicted_answer": "Tuesday, July 18, 2023", + "reasoning": "I used context item 0, which explicitly states that Caroline joined a new LGBTQ activist group on Tuesday, July 18, 2023. The other items describe the group's name and Caroline\u2019s involvement but do not provide the join date.", + "category": 2, + "retrieved_memories": [ + { + "id": "7ad904ba-8899-4d20-84f6-0f2f5a536b10", + "text": "Caroline joined a new LGBTQ activist group on Tuesday, July 18, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-18T20:56:00+00:00", + "weight": 0.4041307720023858, + "activation": 0.8471025733412861, + "semantic_similarity": 0.0, + "recency": 5.502022724463322e-37, + "frequency": 2.0 + }, + { + "id": "2ad708a1-5d1d-4eb7-bba5-c4fcd0edea17", + "text": "The activist group Caroline joined is called 'Connected LGBTQ Activists'.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.4036061648853021, + "activation": 0.8453538829510072, + "semantic_similarity": 0.0, + "recency": 6.720185731026149e-37, + "frequency": 2.0 + }, + { + "id": "1c7af606-21b5-448c-a951-c5e46b267864", + "text": "Caroline is giving her voice to the LGBTQ activist group and believes she is making a real difference.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.3710437369968738, + "activation": 0.7368124566562461, + "semantic_similarity": 0.0, + "recency": 6.720185730917184e-37, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The Tuesday before 20\u202fJuly\u202f2023 falls on 18\u202fJuly\u202f2023, which is exactly the date given in the predicted answer." + }, + { + "question": "Where did Caroline move from 4 years ago?", + "correct_answer": "Sweden", + "predicted_answer": "Her home country.", + "reasoning": "I used context items 0 and 1, which both state that Caroline moved from her home country about four years ago (around 2019-06-09). Item 2 is about the start of her transition and does not address where she moved from. The specific country name isn\u2019t provided in the context.", + "category": 1, + "retrieved_memories": [ + { + "id": "3b03a48d-ac8f-400f-a851-85b09f6eac34", + "text": "Caroline moved from her home country approximately four years ago on 2019-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2019-06-09T19:55:00+00:00", + "weight": 0.41854463423921584, + "activation": 0.895148780797386, + "semantic_similarity": 0.0, + "recency": 3.931060242314667e-102, + "frequency": 2.0 + }, + { + "id": "eb08c29e-5e83-4c46-8660-25f9259d29c5", + "text": "Caroline has known her current group of friends for four years, since moving from her home country around 2019-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.40089412483257436, + "activation": 0.8363137494419146, + "semantic_similarity": 0.0, + "recency": 1.109005002980283e-38, + "frequency": 2.0 + }, + { + "id": "a07530e7-c894-43f3-87f0-ef0a42410f67", + "text": "Caroline began her gender transition three years ago on 2020-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2020-06-09T19:55:00+00:00", + "weight": 0.35979542790624064, + "activation": 0.6993180930208023, + "semantic_similarity": 0.0, + "recency": 3.0880742708320015e-86, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'Her home country' is vague and does not explicitly state Sweden, which is the specific correct answer. Therefore it is not equivalent." + }, + { + "question": "What fields would Caroline be likely to pursue in her educaton?", + "correct_answer": "Psychology, counseling certification", + "predicted_answer": "Counseling and mental health.", + "reasoning": "I used items 1 and 2, which explicitly state she\u2019s interested in and researching careers in counseling and mental health. Item 0 only notes she plans to continue her education but doesn\u2019t specify fields.", + "category": 3, + "retrieved_memories": [ + { + "id": "c56cff23-c869-4b69-ab1e-ca6e768c2b9b", + "text": "Caroline plans to continue her education and explore career options, expressing excitement about these next steps.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.388637101650238, + "activation": 0.7954570055007935, + "semantic_similarity": 0.0, + "recency": 4.409246792846243e-40, + "frequency": 2.0 + }, + { + "id": "bc68a8e2-73de-4a2b-a296-b889e6e0bede", + "text": "Caroline is interested in pursuing a career in counseling or mental health so she can support people with similar issues.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.3828573623725624, + "activation": 0.7761912079085415, + "semantic_similarity": 0.0, + "recency": 4.409246792672802e-40, + "frequency": 2.0 + }, + { + "id": "27373bd4-58ac-4e3f-814c-45ca3fb29f4a", + "text": "Caroline has been researching counseling and mental health as a career to help people who have experienced similar challenges to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.3698649287223816, + "activation": 0.732883095741272, + "semantic_similarity": 0.0, + "recency": 6.454091360097052e-38, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer 'Counseling and mental health' covers the same domains as the correct answer 'Psychology, counseling certification'. 'Counseling' corresponds to the counseling certification, and 'mental health' is synonymous with the field of psychology. Hence the content is equivalent." + }, + { + "question": "Would Caroline likely have Dr. Seuss books on her bookshelf?", + "correct_answer": "Yes, since she collects classic children's books", + "predicted_answer": "I don't know.", + "reasoning": "Context 0 and 1 say Caroline is building a library of many children\u2019s books, including classics, multicultural, and educational titles, but they don\u2019t mention any specific authors or titles. Context 2 is unrelated. Without an explicit mention of Dr. Seuss, I can\u2019t conclude whether she has those books.", + "category": 3, + "retrieved_memories": [ + { + "id": "1fe174fd-ee2e-4eb5-a6c5-c3bffce73ade", + "text": "Caroline is creating a library of children's books to use when she has kids in the future.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-06T20:18:00+00:00", + "weight": 0.3728039794324651, + "activation": 0.7426799314415505, + "semantic_similarity": 0.0, + "recency": 1.6528092670814785e-37, + "frequency": 2.0 + }, + { + "id": "d5fc4716-2506-4a87-a623-008614704be7", + "text": "Caroline owns a collection of many children's books, including classics, multicultural stories, and educational titles.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-06T20:18:00+00:00", + "weight": 0.35614968428319416, + "activation": 0.6871656142773138, + "semantic_similarity": 0.0, + "recency": 1.652809266978179e-37, + "frequency": 2.0 + }, + { + "id": "f2076461-bd79-437b-8c90-9377427205da", + "text": "Melanie has been reading a book that Caroline recommended and is painting to keep busy.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.34546213204120013, + "activation": 0.6515404401373338, + "semantic_similarity": 0.0, + "recency": 3.162529447030671e-33, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know.' does not match the correct answer 'Yes, since she collects classic children's books'; it fails to provide the affirmative response and justification." + }, + { + "question": "Would Melanie be considered an ally to the transgender community?", + "correct_answer": "Yes, she is supportive", + "predicted_answer": "I don't know", + "reasoning": "Context item 0 only says Caroline plans to keep Melanie updated about a transgender conference, which doesn\u2019t indicate Melanie\u2019s views or support. Items 1 and 2 describe Caroline\u2019s involvement and intentions, not Melanie\u2019s. There\u2019s no explicit information confirming whether Melanie supports or advocates for the transgender community.", + "category": 3, + "retrieved_memories": [ + { + "id": "de9d34a8-55f3-45db-b73d-354f8ae9fae9", + "text": "Caroline intends to keep Melanie updated about her upcoming transgender conference.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-03T13:36:00+00:00", + "weight": 0.3646806452249361, + "activation": 0.7156021507497871, + "semantic_similarity": 0.0, + "recency": 1.1907235923904181e-37, + "frequency": 2.0 + }, + { + "id": "2ad708a1-5d1d-4eb7-bba5-c4fcd0edea17", + "text": "The activist group Caroline joined is called 'Connected LGBTQ Activists'.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.3608906256090909, + "activation": 0.702968752030303, + "semantic_similarity": 0.0, + "recency": 6.720192088021457e-37, + "frequency": 2.0 + }, + { + "id": "c7c6406f-4566-4718-8c0f-ce3d1e33a887", + "text": "Caroline intends to work specifically with trans people, helping them accept themselves and supporting their mental health.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.36067790134480116, + "activation": 0.7022596711493373, + "semantic_similarity": 0.0, + "recency": 6.454100856672026e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer says \"I don't know,\" which does not affirm that Melanie is supportive, whereas the correct answer is \"Yes, she is supportive.\" They are not equivalent." + }, + { + "question": "What is Caroline's relationship status?", + "correct_answer": "Single", + "predicted_answer": "I don't know", + "reasoning": "None of the provided context items mention Caroline\u2019s relationship status. Item 0 discusses how long she has known her friends; item 1 mentions a photo from a meetup with Melanie; item 2 states Melanie\u2019s reaction to Caroline\u2019s interview success. None provide information about her relationship status.", + "category": 1, + "retrieved_memories": [ + { + "id": "eb08c29e-5e83-4c46-8660-25f9259d29c5", + "text": "Caroline has known her current group of friends for four years, since moving from her home country around 2019-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.36660952021507986, + "activation": 0.7220317340502663, + "semantic_similarity": 0.0, + "recency": 1.1090073951361696e-38, + "frequency": 2.0 + }, + { + "id": "623f45ac-fb55-4b51-a7ad-6f7a798b5d6a", + "text": "Caroline shared a photo taken during a meetup with Melanie last week.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-02T19:55:00+00:00", + "weight": 0.36578636310574686, + "activation": 0.7192878770191563, + "semantic_similarity": 0.0, + "recency": 5.50716774207872e-39, + "frequency": 2.0 + }, + { + "id": "6a7a8078-ca53-4d6a-b3d7-44bdc8b37d84", + "text": "Melanie felt happy for Caroline after hearing about the interview success.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-21T09:55:00+00:00", + "weight": 0.3616610053676667, + "activation": 0.7055366845588891, + "semantic_similarity": 0.0, + "recency": 7.02077243151849e-33, "frequency": 2.0 } ], "is_correct": false, "correctness_reasoning": "The predicted answer 'I don't know' does not state that Caroline is single, so it does not match the correct answer." }, - { - "question": "When is Melanie planning on going camping?", - "correct_answer": "June 2023", - "predicted_answer": "I don't know", - "reasoning": "The context does not provide specific information about any future camping plans for Melanie. It mentions past camping trips and her family's enjoyment of camping, but there is no indication of when they are planning to go camping next.", - "category": 2, - "retrieved_memories": [ - { - "id": "d6fa6c91-b0b0-48c3-8dc6-a2981abaae82", - "text": "On 2023-07-15, Melanie and her family went on a camping trip in the forest.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.6385532224646773, - "activation": 0.81425535891285, - "semantic_similarity": 0.8142553826360744, - "recency": 3.976579229693862e-37, - "frequency": 2.0 - }, - { - "id": "1bcbab0e-f708-46f3-9191-4b591598a2df", - "text": "Melanie went camping with her family on the weekend of July 1\u20132, 2023, which was two weekends before the conversation date of July 17, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-01T14:31:00+00:00", - "weight": 0.6341995563735137, - "activation": 0.806999302744782, - "semantic_similarity": 0.8069992185002633, - "recency": 9.833400746436395e-38, - "frequency": 2.0 - }, - { - "id": "757040fe-bd93-4ed8-bbe2-731b6b33fb56", - "text": "Melanie went camping with her children a few weeks before September 13, 2023 (approximately on August 23, 2023), during which they explored the forest, hiked, and had a blast.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-23T00:09:00+00:00", - "weight": 0.610266205211061, - "activation": 0.767110319985189, - "semantic_similarity": 0.767110364051681, - "recency": 1.8555264197290307e-35, - "frequency": 2.0 - }, - { - "id": "8a78111e-a82b-478f-93d5-5256f4727402", - "text": "Melanie took her family camping in the mountains during the week prior to June 27, 2023 (last week), providing a nice time together.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-20T10:37:00+00:00", - "weight": 0.5694267831878538, - "activation": 0.65140428713028, - "semantic_similarity": 0.746684990162566, - "recency": 3.2204808252609967e-38, - "frequency": 2.0 - }, - { - "id": "fa88ef2c-bf7a-4349-9898-21d90bd4cda0", - "text": "Melanie's family looks forward to an annual summer camping trip, which they consider the highlight of their summer, as of July 20, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-20T20:56:00+00:00", - "weight": 0.5663847277711936, - "activation": 0.65140428713028, - "semantic_similarity": 0.7365448054403654, - "recency": 6.752627520291924e-37, - "frequency": 2.0 - }, - { - "id": "33bfbe46-a1b7-4119-8110-33f78643abe5", - "text": "During a family camping trip in August 2022, Melanie's family observed the Perseid meteor shower, made wishes, and felt awe while lying under a clear, star\u2011filled sky.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2022-08-12T20:56:00+00:00", - "weight": 0.5624554345902368, - "activation": 0.65140428713028, - "semantic_similarity": 0.7234471615038428, - "recency": 9.475486416300536e-52, - "frequency": 2.0 - }, - { - "id": "60116c77-ad6d-4038-a91e-ab7621a2f94f", - "text": "Melanie suggested doing a family outing this summer, proposing a group activity during the 2023 summer season.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-21T13:50:00+00:00", - "weight": 0.5620544578312987, - "activation": 0.65140428713028, - "semantic_similarity": 0.7221105723073825, - "recency": 3.607205789759941e-38, - "frequency": 2.0 - }, - { - "id": "2c65ccf4-14ae-4519-9a27-7af35209c634", - "text": "Melanie had a quiet weekend on July 8\u20139, 2023, the weekend immediately after the family camping trip, to relax and unplug.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-08T14:31:00+00:00", - "weight": 0.5614518383638576, - "activation": 0.65140428713028, - "semantic_similarity": 0.7201018407492454, - "recency": 1.980188230602638e-37, - "frequency": 2.0 - }, - { - "id": "dbc74f58-282c-441c-9b8a-9b729c6b0f15", - "text": "Melanie enjoys camping trips with her family because nature provides peace, serenity, and opportunities to bond over stories, campfires, birdsong, and fresh air, which refreshes her soul and helps her reset and recharge.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-20T18:55:00+00:00", - "weight": 0.5538515296521284, - "activation": 0.65140428713028, - "semantic_similarity": 0.6947674783768145, - "recency": 6.627240762789156e-33, - "frequency": 2.0 - }, - { - "id": "be729e0b-7a37-4fef-98c1-5da6390b128a", - "text": "Melanie painted a lake sunrise painting last year (2022-05-08), and the artwork is special to her.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2022-05-08T13:56:00+00:00", - "weight": 0.5442424851154435, - "activation": 0.65140428713028, - "semantic_similarity": 0.6627373299211983, - "recency": 6.233149802321527e-56, - "frequency": 2.0 - }, - { - "id": "1e8079c8-e0bf-4634-a94f-a3cc14de2542", - "text": "Melanie posted a recent picture taken on October 19, 2023, showing her children enjoying the Grand Canyon, which she described as a nice way to relax after the roadtrip.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-19T18:55:00+00:00", - "weight": 0.5442232136177595, - "activation": 0.65140428713028, - "semantic_similarity": 0.6626730915955849, - "recency": 5.996575421476561e-33, - "frequency": 2.0 - }, - { - "id": "f9c087ae-d272-4bfb-b111-fc538fd577fd", - "text": "On 2023-07-14, Melanie took her kids to a pottery workshop where they all made their own pots; the activity was fun and therapeutic, and the kids loved it, being excited to get their hands dirty and create something with clay.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-14T13:51:00+00:00", - "weight": 0.543724684777126, - "activation": 0.65140428713028, - "semantic_similarity": 0.6610113287934735, - "recency": 3.598129503171291e-37, - "frequency": 2.0 - }, - { - "id": "64621ccc-3569-43ab-bcbc-300752e4cba9", - "text": "On the weekend of 2023-07-08, Melanie and her kids painted a nature-inspired artwork together, which they described as their latest work.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-08T13:51:00+00:00", - "weight": 0.5436108257052754, - "activation": 0.65140428713028, - "semantic_similarity": 0.6606317985539714, - "recency": 1.9746953406449577e-37, - "frequency": 2.0 - }, - { - "id": "6cd22599-91e4-4777-8cea-136df2061405", - "text": "Melanie is currently swamped with caring for her kids and managing work responsibilities.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.541549458385559, - "activation": 0.65140428713028, - "semantic_similarity": 0.6537605741549166, - "recency": 4.430534817106696e-40, - "frequency": 2.0 - }, - { - "id": "e460bf87-7ca8-40cb-bb49-3750d164c90d", - "text": "Melanie spent August 24, 2023, volunteering with her family at a homeless shelter, observing neglected individuals and feeling that they made a positive difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-24T13:33:00+00:00", - "weight": 0.5405761492521944, - "activation": 0.65140428713028, - "semantic_similarity": 0.6505162103770347, - "recency": 2.1684094851390347e-35, - "frequency": 2.0 - }, - { - "id": "6ce7be9f-ef63-4d9f-9bce-fd223d501ee8", - "text": "Melanie finds peace through creativity and family support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.5396226296575926, - "activation": 0.65140428713028, - "semantic_similarity": 0.6473378117283618, - "recency": 3.976548088225122e-37, - "frequency": 2.0 - }, - { - "id": "c1db0587-badf-4875-9b80-a3e2ad5a64ee", - "text": "Melanie shared a photograph of her family camping at the beach, stating that the experience brings her family closer together.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-06T20:18:00+00:00", - "weight": 0.5386915029894479, - "activation": 0.65140428713028, - "semantic_similarity": 0.6442340561678795, - "recency": 1.660782919341833e-37, - "frequency": 2.0 - }, - { - "id": "99533d0b-08a4-4bfb-ae6f-82ff14200c83", - "text": "Melanie has been married for five years, meaning she married her husband around 2018-06-09.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2018-06-09T19:55:00+00:00", - "weight": 0.5374705262130155, - "activation": 0.65140428713028, - "semantic_similarity": 0.6401641335797715, - "recency": 5.5571651502913045e-118, - "frequency": 2.0 - }, - { - "id": "6b0289f7-0dbc-4a51-8628-16d23a5991c1", - "text": "Melanie feels inspired by the autumn season and is planning to create several new paintings in the near future, as expressed on August 25, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-25T13:33:00+00:00", - "weight": 0.5371921049278133, - "activation": 0.65140428713028, - "semantic_similarity": 0.6392360626290977, - "recency": 2.3964631018378227e-35, - "frequency": 2.0 - }, - { - "id": "fb45c7ac-8079-4af6-bcf2-6ae9dd3ea1d4", - "text": "Melanie recently completed a landscape painting, which she shared during the conversation on August 25, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-25T13:33:00+00:00", - "weight": 0.5361437921894194, - "activation": 0.65140428713028, - "semantic_similarity": 0.6357416868344515, - "recency": 2.3964631016491878e-35, - "frequency": 2.0 - } - ], - "is_correct": false, - "correctness_reasoning": "The predicted answer 'I don't know' does not provide the required information 'June 2023' and therefore is not equivalent to the correct answer." - }, - { - "question": "When did Caroline give a speech at a school?", - "correct_answer": "The week before 9 June 2023", - "predicted_answer": "2023-06-02", - "reasoning": "The context explicitly states that Caroline delivered a school event talk about her transgender journey on 2023-06-02.", - "category": 2, - "retrieved_memories": [ - { - "id": "e4502529-fc39-465d-82b7-d56d0e56fde6", - "text": "Caroline delivered a school event talk about her transgender journey and encouraged students to get involved in the LGBTQ community; the event took place last week on 2023-06-02.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-02T19:55:00+00:00", - "weight": 0.6057134820306492, - "activation": 0.759522452382897, - "semantic_similarity": 0.759522487719267, - "recency": 5.534217638137463e-39, - "frequency": 2.0 - }, - { - "id": "95f094d7-70ed-4438-8026-da6e3dd6a571", - "text": "During the school event on 2023-06-02, Caroline felt powerful sharing her struggles and personal development since coming out, and observed that the audience related to her story and were inspired to become better allies.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-02T19:55:00+00:00", - "weight": 0.5996411386976285, - "activation": 0.749401882326492, - "semantic_similarity": 0.7494019133322697, - "recency": 5.534217636465764e-39, - "frequency": 2.0 - }, - { - "id": "ec88eee3-ba37-427f-9bf4-e0995d5fc61a", - "text": "On Friday, June 23, 2023, Caroline attended an LGBTQ+ counseling workshop where professionals discussed various therapeutic methods for working with transgender people and demonstrated passion for creating safe spaces for individuals like her.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-23T10:37:00+00:00", - "weight": 0.5552226440478177, - "activation": 0.6753710299288, - "semantic_similarity": 0.6753711168972591, - "recency": 4.3475615065288293e-38, - "frequency": 2.0 - }, - { - "id": "4dc1b6d9-cb36-4156-91eb-6e633ac75d64", - "text": "Caroline shared a photograph taken when she and Melanie met up last week; the photo was taken on 2023-06-02.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-02T19:55:00+00:00", - "weight": 0.5172251325700236, - "activation": 0.6076179619063176, - "semantic_similarity": 0.6164658133270943, - "recency": 5.534211300014424e-39, - "frequency": 2.0 - }, - { - "id": "c5161f91-693c-48a1-a288-ad149f8fc765", - "text": "Caroline attended an LGBTQ conference on 2023-07-10, two days before the reference date, where she met and connected with people who have experienced similar journeys, found the environment welcoming, felt totally accepted, and expressed gratitude for the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-10T16:33:00+00:00", - "weight": 0.5129628609491097, - "activation": 0.54029682394304, - "semantic_similarity": 0.6695793792206591, - "recency": 2.4393975389592374e-37, - "frequency": 2.0 - }, - { - "id": "22612de6-dda7-4df8-af30-5d488b1bdc10", - "text": "On 2023-07-14, Caroline attended a council meeting for adoption; she found it inspiring and emotional, observed many people wanting to create loving homes for children in need, and felt even more determined to adopt.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-14T13:51:00+00:00", - "weight": 0.5005418695471089, - "activation": 0.54029682394304, - "semantic_similarity": 0.628176074547323, - "recency": 3.5984424466313127e-37, - "frequency": 2.0 - }, - { - "id": "006df526-f850-48a9-a2f3-a13799f0391c", - "text": "Melanie states that the conversation with Caroline has been great for her mental health and she intends to continue the positive practices.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4926971599924729, - "activation": 0.54029682394304, - "semantic_similarity": 0.6020270426985361, - "recency": 2.9794868813890685e-37, - "frequency": 2.0 - }, - { - "id": "a10ae2d0-45de-4fbb-8c37-9762142b5158", - "text": "As of July 17, 2023, Caroline is mentoring a transgender teen who shares her own gender identity, and together they are working on building confidence and developing positive coping strategies.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.4920764235358188, - "activation": 0.5054853867820114, - "semantic_similarity": 0.6347693583373847, - "recency": 4.870900738597122e-37, - "frequency": 2.0 - }, - { - "id": "50dd73e8-e477-4c45-b052-b3eae96a1a6a", - "text": "Melanie expressed pride in Caroline's work and said she is proud to be part of the difference Caroline is making.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.49152321091146134, - "activation": 0.54029682394304, - "semantic_similarity": 0.5981138790951646, - "recency": 1.11445329739746e-38, - "frequency": 2.0 - }, - { - "id": "63dd0bce-9e94-439c-a66b-2348579d05dc", - "text": "Caroline attended an LGBTQ+ pride parade, observed a happy crowd, felt a sense of belonging, and recognized significant growth in the LGBTQ+ community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-26T13:36:00+00:00", - "weight": 0.4902385241685657, - "activation": 0.54029682394304, - "semantic_similarity": 0.5938315899521791, - "recency": 5.941992552736401e-38, - "frequency": 2.0 - }, - { - "id": "5f5ec14c-8715-4770-988a-6aa1fe4176f0", - "text": "Caroline attended an LGBTQ support group on 2023-05-07, finding the experience powerful.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-07T13:56:00+00:00", - "weight": 0.48909858660060834, - "activation": 0.49128755869399277, - "semantic_similarity": 0.639041063308035, - "recency": 4.009247628467812e-40, - "frequency": 2.0 - }, - { - "id": "f72607f8-5bf9-482e-ba74-f5ac97c15ac7", - "text": "The LGBTQ community experience showed Caroline how important it is to fight for trans rights and spread awareness.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-10T16:33:00+00:00", - "weight": 0.48869952969070274, - "activation": 0.54029682394304, - "semantic_similarity": 0.5887016083593024, - "recency": 2.4393975388943084e-37, - "frequency": 2.0 - }, - { - "id": "a4f20608-0fb6-4235-b47b-b64482d3e648", - "text": "Caroline stated her goal is to give kids a loving home, expressed gratitude for support from friends and mentors, and said she feels hopeful and optimistic about turning her adoption dream into reality.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.4880850435147672, - "activation": 0.54029682394304, - "semantic_similarity": 0.5866533211061841, - "recency": 2.418389539846299e-39, - "frequency": 2.0 - }, - { - "id": "88e28f0b-51b1-45bb-860b-4b1a734d3462", - "text": "Caroline reflected that volunteering reminded her of her own past struggles and feeling alone, and she was glad to share her story and offer support, feeling she could make a difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-28T15:19:00+00:00", - "weight": 0.4854217191260243, - "activation": 0.54029682394304, - "semantic_similarity": 0.5777755731437075, - "recency": 3.2590704712838855e-35, - "frequency": 2.0 - }, - { - "id": "05f1dcaa-6f99-46b5-87e9-d2efa64e01cd", - "text": "Caroline joined a mentorship program for LGBTQ youth on the weekend of July 15\u201316, 2023, aiming to support and empower young members of the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T14:31:00+00:00", - "weight": 0.4852769317696861, - "activation": 0.4948453757498368, - "semantic_similarity": 0.6227443968157836, - "recency": 3.987956229570448e-37, - "frequency": 2.0 - }, - { - "id": "c7ffecc3-a614-401d-9f62-a23753c7ca5f", - "text": "Melanie has been reading a book that Caroline recommended a while ago and has been painting to keep busy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.4846367597711927, - "activation": 0.54029682394304, - "semantic_similarity": 0.5751590419609356, - "recency": 3.178062826735761e-33, - "frequency": 2.0 - }, - { - "id": "3f797cf0-1c31-4f25-8815-0791293e3bcd", - "text": "During her transition and journey toward self-acceptance, Caroline received invaluable help and encouragement from friends, family, and people she looked up to, which boosted her through tough times and helped her discover her true self.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.4830354920709111, - "activation": 0.54029682394304, - "semantic_similarity": 0.5698214829599971, - "recency": 7.797255689131378e-33, - "frequency": 2.0 - }, - { - "id": "f3fd8e60-f94c-4dad-9a29-358228690663", - "text": "Caroline plans to attend a transgender conference later this month, expressing excitement to meet community members and learn more about advocacy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-03T13:36:00+00:00", - "weight": 0.48275036326470055, - "activation": 0.4959545664604603, - "semantic_similarity": 0.6132133110885414, - "recency": 1.1965703607295037e-37, - "frequency": 2.0 - }, - { - "id": "1a905e0b-4767-4a9e-b3ad-bc32d0657ab2", - "text": "Caroline says that her own personal journey and the support she received significantly improved her life; observing the benefits of counseling and support groups motivated her to care more about mental health, understand herself better, and create a safe, inviting environment for others to grow.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.48258318586340954, - "activation": 0.54029682394304, - "semantic_similarity": 0.5683137956016583, - "recency": 6.485792193876516e-38, - "frequency": 2.0 - }, - { - "id": "c15fad08-4a6a-4c55-9d80-696705c085c2", - "text": "Caroline and her mentee attended an LGBT pride event on June 17, 2023, where they experienced a supportive and loving atmosphere.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-17T14:31:00+00:00", - "weight": 0.481936534162537, - "activation": 0.47851202244483465, - "semantic_similarity": 0.6279430914302889, - "recency": 2.425078680378972e-38, - "frequency": 2.0 - } - ], - "is_correct": true, - "correctness_reasoning": "The predicted answer '2023-06-02' is exactly one week before 9 June 2023, matching the correct answer 'The week before 9 June 2023'." - }, { "question": "When did Melanie run a charity race?", "correct_answer": "The sunday before 25 May 2023", - "predicted_answer": "May 20, 2023", - "reasoning": "The context explicitly states that Melanie ran a charity race for mental health on Saturday, May 20, 2023. This provides a clear and direct answer to the question.", + "predicted_answer": "Saturday, May 20, 2023.", + "reasoning": "I used context item 1, which explicitly states the date of the charity race as Saturday, May 20, 2023. Items 0 and 2 discuss reactions and reflections but do not mention the date.", "category": 2, "retrieved_memories": [ { - "id": "96406bc5-690f-4f4e-ad4b-968a6648bbf1", - "text": "Melanie ran a charity race for mental health on Saturday, May 20, 2023, which she found rewarding and which made her think about the importance of taking care of one's mind.", + "id": "c568bba4-2786-4b35-a624-757ab4bd9678", + "text": "Caroline expressed pride in Melanie for taking part in the charity race.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-25T13:14:00+00:00", + "weight": 0.3885051619561066, + "activation": 0.7950172065203553, + "semantic_similarity": 0.0, + "recency": 2.4065661652145563e-39, + "frequency": 2.0 + }, + { + "id": "7fb1e463-ddb6-4aad-a855-e5ac3acb9d07", + "text": "Melanie ran a charity race for mental health on Saturday, May 20, 2023, and found it rewarding and thought\u2011provoking, which made her reflect on the importance of self\u2011care.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-05-20T13:14:00+00:00", - "weight": 0.6080577995801428, - "activation": 0.76342961897166, - "semantic_similarity": 0.7634297129621495, - "recency": 1.4667843256884606e-39, + "weight": 0.37939539639340036, + "activation": 0.7646513213113347, + "semantic_similarity": 0.0, + "recency": 1.4596561637519633e-39, "frequency": 2.0 }, { - "id": "e460bf87-7ca8-40cb-bb49-3750d164c90d", - "text": "Melanie spent August 24, 2023, volunteering with her family at a homeless shelter, observing neglected individuals and feeling that they made a positive difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-24T13:33:00+00:00", - "weight": 0.5461861669634696, - "activation": 0.660310308327966, - "semantic_similarity": 0.6603102482169325, - "recency": 2.168534390799205e-35, - "frequency": 2.0 - }, - { - "id": "487ca766-c480-4748-ac1a-0362311fc948", - "text": "Melanie recently purchased new shoes, which are purple in color and intended for running.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.5379265600532386, - "activation": 0.646544314405968, - "semantic_similarity": 0.6465442191048271, - "recency": 2.9793993782823916e-37, - "frequency": 2.0 - }, - { - "id": "52c9bd89-9bd2-410a-9dd6-3e1ba3369b5d", - "text": "Caroline thanked Melanie for her encouraging words, said the support means a lot, and pledged to do her best to ensure any adopted children have a safe and loving home.", + "id": "30c218c6-e315-4865-8a53-c3089cc4f2e5", + "text": "Melanie thanked Caroline and said the charity race was thought\u2011provoking.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.5074708823773078, - "activation": 0.610743695177328, - "semantic_similarity": 0.5808259127470313, - "recency": 2.4183089332937094e-39, - "frequency": 2.0 - }, - { - "id": "312a4401-94ce-4509-94c4-f7f4481fcf83", - "text": "Melanie said she is carving out daily me-time that includes running, reading, or playing her violin, activities that refresh her and help her stay present for her family.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.5043215443688921, - "activation": 0.610743695177328, - "semantic_similarity": 0.5703281193856459, - "recency": 2.418308933545545e-39, - "frequency": 2.0 - }, - { - "id": "1b99342d-486f-4f1a-b1a1-1b0d94f3ded3", - "text": "Melanie stated that her husband and kids keep her motivated.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5010528954816535, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6419280716098056, - "recency": 1.1144119147535568e-38, - "frequency": 2.0 - }, - { - "id": "d6fa6c91-b0b0-48c3-8dc6-a2981abaae82", - "text": "On 2023-07-15, Melanie and her family went on a camping trip in the forest.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.5002171240450245, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6391421668210422, - "recency": 3.976761380451225e-37, - "frequency": 2.0 - }, - { - "id": "6ce7be9f-ef63-4d9f-9bce-fd223d501ee8", - "text": "Melanie finds peace through creativity and family support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.49682061678436584, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6278204759521799, - "recency": 3.976761379816073e-37, - "frequency": 2.0 - }, - { - "id": "35ea25a2-0e9d-4e01-ae30-7655ca3d4c44", - "text": "The concert Melanie attended on 2023-08-13 featured performer Matt Patterson, whose voice and songs she described as amazing and talented.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-13T14:24:00+00:00", - "weight": 0.495634289319396, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6238660510689472, - "recency": 7.243978255284424e-36, - "frequency": 2.0 - }, - { - "id": "d8d3b55e-b418-4ea0-886a-d4c0f8feef62", - "text": "Melanie shared a picture taken on 2023-08-13 showing many people having a blast at the concert, reminding her of the importance of cultivating a loving and accepting environment for her children.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-13T14:24:00+00:00", - "weight": 0.4955201613237674, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6234856244168518, - "recency": 7.243978255577915e-36, - "frequency": 2.0 - }, - { - "id": "99533d0b-08a4-4bfb-ae6f-82ff14200c83", - "text": "Melanie has been married for five years, meaning she married her husband around 2018-06-09.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2018-06-09T19:55:00+00:00", - "weight": 0.49343939367036094, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6165497322388304, - "recency": 5.557442803148722e-118, - "frequency": 2.0 - }, - { - "id": "6cd22599-91e4-4777-8cea-136df2061405", - "text": "Melanie is currently swamped with caring for her kids and managing work responsibilities.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.4929780369843564, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6150118766188151, - "recency": 4.430739346790953e-40, - "frequency": 2.0 - }, - { - "id": "50dd73e8-e477-4c45-b052-b3eae96a1a6a", - "text": "Melanie expressed pride in Caroline's work and said she is proud to be part of the difference Caroline is making.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.49254514957772355, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6135689185967056, - "recency": 1.1144161503627e-38, - "frequency": 2.0 - }, - { - "id": "757040fe-bd93-4ed8-bbe2-731b6b33fb56", - "text": "Melanie went camping with her children a few weeks before September 13, 2023 (approximately on August 23, 2023), during which they explored the forest, hiked, and had a blast.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-23T00:09:00+00:00", - "weight": 0.49111653757489904, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6088068785872908, - "recency": 1.855604365068456e-35, - "frequency": 2.0 - }, - { - "id": "f9c087ae-d272-4bfb-b111-fc538fd577fd", - "text": "On 2023-07-14, Melanie took her kids to a pottery workshop where they all made their own pots; the activity was fun and therapeutic, and the kids loved it, being excited to get their hands dirty and create something with clay.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-14T13:51:00+00:00", - "weight": 0.4909032205325806, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6080958217795625, - "recency": 3.598322500348928e-37, - "frequency": 2.0 - }, - { - "id": "e21e9110-0c25-415b-a959-a21eb72d8a4b", - "text": "Melanie once fed a horse a carrot.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-23T15:31:00+00:00", - "weight": 0.4908149382345375, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6078015474527522, - "recency": 1.9783006598182982e-35, - "frequency": 2.0 - }, - { - "id": "a18b044a-2586-45b9-93d1-3360db92e821", - "text": "Melanie uses painting as a fun way to express her feelings, get creative, and relax after a long day.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.49081204805059286, - "activation": 0.610743695177328, - "semantic_similarity": 0.5252964649913149, - "recency": 4.430756193083742e-40, - "frequency": 2.0 - }, - { - "id": "64621ccc-3569-43ab-bcbc-300752e4cba9", - "text": "On the weekend of 2023-07-08, Melanie and her kids painted a nature-inspired artwork together, which they described as their latest work.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-08T13:51:00+00:00", - "weight": 0.49078994519644037, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6077182373257619, - "recency": 1.974793753559377e-37, - "frequency": 2.0 - }, - { - "id": "54526f1d-bc1e-4eb1-96e9-d0bbe6c3e56e", - "text": "Melanie celebrated her daughter's birthday with a concert on the evening of 2023-08-13, featuring music, joy, and a warm summer breeze; she observed her kids' smiles and expressed thankfulness for these special moments.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-13T14:24:00+00:00", - "weight": 0.4906547525976461, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6072675953297808, - "recency": 7.243978254990933e-36, - "frequency": 2.0 - }, - { - "id": "6fb4ae9a-e9aa-4284-ae34-c5a157b98fcc", - "text": "Melanie stated that her family is her biggest motivation and support, giving her strength to keep going.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-14T18:55:00+00:00", - "weight": 0.48920699159952397, - "activation": 0.5282482466623728, - "semantic_similarity": 0.6024417253360405, - "recency": 3.637288558995905e-33, + "weight": 0.37907205137395794, + "activation": 0.76357350457986, + "semantic_similarity": 0.0, + "recency": 2.4065661650418155e-39, "frequency": 2.0 } ], "is_correct": false, - "correctness_reasoning": "The correct answer specifies \"the Sunday before 25 May 2023,\" which is 21 May 2023. The predicted answer gives May 20, 2023 (a Saturday), so they are not equivalent." + "correctness_reasoning": "The correct answer specifies the Sunday before 25 May 2023, which is 21 May 2023. The predicted answer gives Saturday, 20 May 2023, which is a different day, so they are not equivalent." }, { - "question": "When did Caroline go to the LGBTQ support group?", - "correct_answer": "7 May 2023", - "predicted_answer": "2023-05-07", - "reasoning": "The context explicitly states that Caroline attended an LGBTQ support group on 2023-05-07, providing a clear answer to the question.", + "question": "What did Melanie paint recently?", + "correct_answer": "sunset", + "predicted_answer": "A horse painting.", + "reasoning": "Item 0 explicitly says she created a horse painting recently. Item 2 mentions a painting from last week (which could be recent but is less directly tied to \u201crecently\u201d) and focuses on inspiration rather than subject. Item 1 lacks timing details.", + "category": 1, + "retrieved_memories": [ + { + "id": "1562d91b-8358-42ea-9d94-748f46a499db", + "text": "Melanie shared a photo of a horse painting she created recently.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T15:31:00+00:00", + "weight": 0.3895082294940948, + "activation": 0.7983607649803162, + "semantic_similarity": 0.0, + "recency": 1.9687022595229384e-35, + "frequency": 2.0 + }, + { + "id": "e54b687e-8c75-4e9f-8479-208b2a49ac8a", + "text": "Melanie created an abstract painting and shared it.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.3887945365546507, + "activation": 0.7959817885155023, + "semantic_similarity": 0.0, + "recency": 3.162525934754531e-33, + "frequency": 2.0 + }, + { + "id": "b9f441cf-00d4-4f87-a828-cfda1abfea34", + "text": "Melanie shared a painting she created last week, inspired by sunsets, with calming colors.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-06T10:31:00+00:00", + "weight": 0.3856785178184509, + "activation": 0.7855950593948364, + "semantic_similarity": 0.0, + "recency": 1.5704639019310304e-33, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'A horse painting' does not match the correct answer 'sunset'; they refer to different subjects, so they are not equivalent." + }, + { + "question": "In what ways is Caroline participating in the LGBTQ community?", + "correct_answer": "Joining activist group, going to pride parades, participating in an art show, mentoring program", + "predicted_answer": "She\u2019s joined the Connected LGBTQ Activists group, lends her voice to their advocacy, and uses her art to speak up for the community and promote acceptance.", + "reasoning": "I used item 0 to note she joined the activist group, item 1 to show she uses her art to advocate and promote acceptance, and item 2 to state she\u2019s giving her voice to the group. These directly describe her participation; there are no other relevant items in the context.", + "category": 1, + "retrieved_memories": [ + { + "id": "2ad708a1-5d1d-4eb7-bba5-c4fcd0edea17", + "text": "The activist group Caroline joined is called 'Connected LGBTQ Activists'.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.4003899335861224, + "activation": 0.8346331119537412, + "semantic_similarity": 0.0, + "recency": 6.720191728421265e-37, + "frequency": 2.0 + }, + { + "id": "cb96376b-7a1e-479e-a6a1-c09864dd44b0", + "text": "Caroline uses her art to speak up for the LGBTQ+ community and promote acceptance.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-14T14:24:00+00:00", + "weight": 0.3987769424915331, + "activation": 0.8292564749717771, + "semantic_similarity": 0.0, + "recency": 7.967010831132049e-36, + "frequency": 2.0 + }, + { + "id": "1c7af606-21b5-448c-a951-c5e46b267864", + "text": "Caroline is giving her voice to the LGBTQ activist group and believes she is making a real difference.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.3963842900762389, + "activation": 0.8212809669207964, + "semantic_similarity": 0.0, + "recency": 6.7201917280477665e-37, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer mentions joining an activist group and using art, which correspond to two items (activist group, art show) from the correct answer, but it does not mention participation in pride parades or a mentoring program. Therefore it does not fully match the correct answer." + }, + { + "question": "Where has Melanie camped?", + "correct_answer": "beach, mountains, forest", + "predicted_answer": "In the mountains.", + "reasoning": "Item 0 states she took her family camping in the mountains, and item 2 refers to it as a mountain camping trip. Item 1 mentions the camping trip and activities but does not specify the location, so it wasn\u2019t used to determine where she camped.", + "category": 1, + "retrieved_memories": [ + { + "id": "a3e155a9-36b4-49e6-b450-53ad02e14c68", + "text": "Melanie took her family camping in the mountains last week.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-20T10:37:00+00:00", + "weight": 0.3810712406358493, + "activation": 0.7702374687861645, + "semantic_similarity": 0.0, + "recency": 3.205003138677861e-38, + "frequency": 2.0 + }, + { + "id": "f279b6c9-c6bf-41b2-a0f5-910e095b9920", + "text": "Melanie went camping with her kids on 2023-08-23, explored the forest, hiked, and had a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T00:00:00+00:00", + "weight": 0.3723195632385826, + "activation": 0.7410652107952753, + "semantic_similarity": 0.0, + "recency": 1.8454472858831227e-35, + "frequency": 2.0 + }, + { + "id": "c213873d-124e-4263-87e9-bb1170423c67", + "text": "During the mountain camping trip, Melanie's family went on a hike.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-20T10:37:00+00:00", + "weight": 0.3714528811843924, + "activation": 0.7381762706146414, + "semantic_similarity": 0.0, + "recency": 3.2050031380880883e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer only mentions \"mountains\" while the correct answer includes \"beach, mountains, forest\". It does not cover all the locations, so it is not equivalent." + }, + { + "question": "How many times has Melanie gone to the beach in 2023?", + "correct_answer": 2, + "predicted_answer": "I don't know", + "reasoning": "Item 0 says Melanie went camping on July 8\u20139, 2023, but doesn\u2019t mention the beach. Item 1 is about reading a book in 2022. Item 2 is about her marriage since 2018. None of the provided context mentions any trips to the beach in 2023, so the number cannot be determined from the given information.", + "category": 1, + "retrieved_memories": [ + { + "id": "59bc760e-185f-46fc-baf0-d9d894871c09", + "text": "Melanie went camping with her family during the weekend of July 8\u20139, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-08T00:00:00+00:00", + "weight": 0.3702540230902451, + "activation": 0.7341800769674837, + "semantic_similarity": 0.0, + "recency": 1.8550168216657072e-37, + "frequency": 2.0 + }, + { + "id": "ae4d3b8d-c0b4-4b46-bd35-2b086a131cc5", + "text": "On 2022-07-12, Melanie read a book that reminded her to always pursue her dreams.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2022-07-12T16:33:00+00:00", + "weight": 0.3558258053168178, + "activation": 0.686086017722726, + "semantic_similarity": 0.0, + "recency": 4.1712409665945694e-53, + "frequency": 2.0 + }, + { + "id": "db2171ee-ecd6-4c14-be2b-f73b8206aaf0", + "text": "Melanie has been married for five years, with the marriage beginning around 2018-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2018-06-09T19:55:00+00:00", + "weight": 0.3554140152160531, + "activation": 0.6847133840535102, + "semantic_similarity": 0.0, + "recency": 5.530467814828731e-118, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not state the correct answer of 2, so it is not equivalent." + }, + { + "question": "What types of pottery have Melanie and her kids made?", + "correct_answer": "bowls, cup", + "predicted_answer": "Pots (including a cup) and a plate.", + "reasoning": "I used item 1, which says they each made their own pots, including a cup, and item 2, which says Melanie made a pottery plate. Item 0 doesn\u2019t specify a type, so it didn\u2019t add detail.", + "category": 1, + "retrieved_memories": [ + { + "id": "789ced0e-c74d-4aa0-85a5-dacb967c3417", + "text": "Melanie finished another pottery project.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.38920234675421395, + "activation": 0.79734115584738, + "semantic_similarity": 0.0, + "recency": 1.0728963393623516e-35, + "frequency": 2.0 + }, + { + "id": "efe08615-6069-4d6b-936e-6774bb24a47e", + "text": "Melanie took her children to a pottery workshop on Friday, July 14, 2023, where they each made their own pots, including a cup, and found the activity fun and therapeutic.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-14T13:51:00+00:00", + "weight": 0.38346448243836906, + "activation": 0.7782149414612304, + "semantic_similarity": 0.0, + "recency": 3.5808545786280813e-37, + "frequency": 2.0 + }, + { + "id": "0f5465f1-3ab7-4bf0-99bd-6be3fb69702e", + "text": "Melanie made a pottery plate in a pottery class on 2023-08-24 and expressed that she loves pottery because it is relaxing and creative.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-24T13:33:00+00:00", + "weight": 0.3752714820287074, + "activation": 0.7509049400956914, + "semantic_similarity": 0.0, + "recency": 2.1579987655436593e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer mentions pots (including a cup) and a plate, which does not match the required bowls and cup. It adds a plate and replaces bowls with pots, so the content is not equivalent." + }, + { + "question": "What kind of art does Caroline make?", + "correct_answer": "abstract art", + "predicted_answer": "Painting", + "reasoning": "Item 0 explicitly states Caroline uses painting as a form of self-expression, indicating she makes paintings. Items 1 and 2 give background (duration and inspiration) but don't specify the type of art.", + "category": 1, + "retrieved_memories": [ + { + "id": "ecbe1bf6-7f69-40ac-afc4-e7e58e03f4bc", + "text": "Caroline loves creating art and uses painting as a form of self-expression.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T15:31:00+00:00", + "weight": 0.40007186978841314, + "activation": 0.8335728992947106, + "semantic_similarity": 0.0, + "recency": 1.9687030628835035e-35, + "frequency": 2.0 + }, + { + "id": "5970822b-a5b8-4f04-970b-aaef341659d5", + "text": "Caroline has been creating art since she was about 17 years old.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-09-13T00:09:00+00:00", + "weight": 0.39674192210263054, + "activation": 0.8224730736754352, + "semantic_similarity": 0.0, + "recency": 1.50796658585485e-34, + "frequency": 2.0 + }, + { + "id": "b8849ebd-a870-4b5d-a470-1f1408497290", + "text": "Caroline was inspired by the poetry reading posters to create her own artwork.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.38698611590142606, + "activation": 0.7899537196714204, + "semantic_similarity": 0.0, + "recency": 3.162527225453333e-33, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "Painting refers to a medium, while abstract art refers to a style; they are not the same, so the predicted answer does not match the correct answer." + }, + { + "question": "What books has Melanie read?", + "correct_answer": "\"Nothing is Impossible\", \"Charlotte's Web\"", + "predicted_answer": "Charlotte's Web. She also read an unspecified book on 2022-07-12 and another recommended by Caroline, but their titles are unknown.", + "reasoning": "- From item 2, Melanie recalled loving reading \u201cCharlotte\u2019s Web,\u201d so that is a known book she has read.\n- Item 0 mentions she read a book on 2022-07-12 but does not name it, so I can\u2019t specify the title.\n- Item 1 says she has been reading a book recommended by Caroline but gives no title, so I also can\u2019t name it.", + "category": 1, + "retrieved_memories": [ + { + "id": "ae4d3b8d-c0b4-4b46-bd35-2b086a131cc5", + "text": "On 2022-07-12, Melanie read a book that reminded her to always pursue her dreams.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2022-07-12T16:33:00+00:00", + "weight": 0.3661403746353914, + "activation": 0.7204679154513046, + "semantic_similarity": 0.0, + "recency": 4.1712368834006574e-53, + "frequency": 2.0 + }, + { + "id": "f2076461-bd79-437b-8c90-9377427205da", + "text": "Melanie has been reading a book that Caroline recommended and is painting to keep busy.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.3598651331904296, + "activation": 0.6995504439680987, + "semantic_similarity": 0.0, + "recency": 3.16252847407352e-33, + "frequency": 2.0 + }, + { + "id": "17eb1bce-2528-474c-9877-2dbeb8fe58eb", + "text": "Melanie recalled that she loved reading the book \"Charlotte's Web\" when she was a child.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-06T20:18:00+00:00", + "weight": 0.3501349568246366, + "activation": 0.6671165227487886, + "semantic_similarity": 0.0, + "recency": 1.652808758243928e-37, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer only mentions Charlotte's Web and does not include the other required title, \"Nothing is Impossible\". Therefore it does not match the correct answer." + }, + { + "question": "When did Melanie read the book \"nothing is impossible\"?", + "correct_answer": 2022, + "predicted_answer": "I don't know", + "reasoning": "The context does not mention a book titled \u201cnothing is impossible.\u201d Item 0 notes that on 2022-07-12 Melanie read a book that reminded her to pursue her dreams, but it doesn\u2019t specify the title, so we can\u2019t conclude it\u2019s the same book. The other items are unrelated.", "category": 2, "retrieved_memories": [ { - "id": "5f5ec14c-8715-4770-988a-6aa1fe4176f0", - "text": "Caroline attended an LGBTQ support group on 2023-05-07, finding the experience powerful.", + "id": "ae4d3b8d-c0b4-4b46-bd35-2b086a131cc5", + "text": "On 2022-07-12, Melanie read a book that reminded her to always pursue her dreams.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-07T13:56:00+00:00", - "weight": 0.6796956536236841, - "activation": 0.882826116169278, - "semantic_similarity": 0.8828260625763358, - "recency": 4.009011402269459e-40, + "event_date": "2022-07-12T16:33:00+00:00", + "weight": 0.3507559000544667, + "activation": 0.6691863335148891, + "semantic_similarity": 0.0, + "recency": 4.171243318098449e-53, "frequency": 2.0 }, { - "id": "3a2f0dfc-4fc1-4986-9474-ce54481550a3", - "text": "Caroline joined a new LGBTQ activist group called Connected LGBTQ Activists on Tuesday, July 18, 2023.", + "id": "f2076461-bd79-437b-8c90-9377427205da", + "text": "Melanie has been reading a book that Caroline recommended and is painting to keep busy.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-18T20:56:00+00:00", - "weight": 0.6497555047258308, - "activation": 0.832925821331913, - "semantic_similarity": 0.832925861087523, - "recency": 5.528718569948636e-37, + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.3358624892398728, + "activation": 0.6195416307995759, + "semantic_similarity": 0.0, + "recency": 3.162533352606885e-33, "frequency": 2.0 }, { - "id": "72855141-35e9-47cd-92aa-5d1ffb89ae3a", - "text": "The LGBTQ support group made Caroline feel accepted and gave her courage to embrace herself.", + "id": "db2171ee-ecd6-4c14-be2b-f73b8206aaf0", + "text": "Melanie has been married for five years, with the marriage beginning around 2018-06-09.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.6274170101632144, - "activation": 0.795695054274503, - "semantic_similarity": 0.7956949796028784, - "recency": 4.43064281101677e-40, + "event_date": "2018-06-09T19:55:00+00:00", + "weight": 0.3328075950501093, + "activation": 0.6093586501670311, + "semantic_similarity": 0.0, + "recency": 5.530470931504487e-118, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not provide the year 2022, so it is not equivalent to the correct answer." + }, + { + "question": "When did Melanie go camping in July?", + "correct_answer": "two weekends before 17 July 2023", + "predicted_answer": "During the weekend of July 8\u20139, 2023.", + "reasoning": "I used context item 0, which specifies a July camping trip on the weekend of July 8\u20139, 2023. Item 1 refers to August 23, not July, and item 2 lacks a specific date and does not indicate July.", + "category": 2, + "retrieved_memories": [ + { + "id": "59bc760e-185f-46fc-baf0-d9d894871c09", + "text": "Melanie went camping with her family during the weekend of July 8\u20139, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-08T00:00:00+00:00", + "weight": 0.3954033819081419, + "activation": 0.8180112730271397, + "semantic_similarity": 0.0, + "recency": 1.8550152396504902e-37, "frequency": 2.0 }, { - "id": "c5161f91-693c-48a1-a288-ad149f8fc765", - "text": "Caroline attended an LGBTQ conference on 2023-07-10, two days before the reference date, where she met and connected with people who have experienced similar journeys, found the environment welcoming, felt totally accepted, and expressed gratitude for the community.", + "id": "f279b6c9-c6bf-41b2-a0f5-910e095b9920", + "text": "Melanie went camping with her kids on 2023-08-23, explored the forest, hiked, and had a blast.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-10T16:33:00+00:00", - "weight": 0.600047675078097, - "activation": 0.7062608929354224, - "semantic_similarity": 0.7938980239915674, - "recency": 2.4392508031077425e-37, + "event_date": "2023-08-23T00:00:00+00:00", + "weight": 0.3933308997748116, + "activation": 0.8111029992493721, + "semantic_similarity": 0.0, + "recency": 1.8454492160489734e-35, "frequency": 2.0 }, { - "id": "ec88eee3-ba37-427f-9bf4-e0995d5fc61a", - "text": "On Friday, June 23, 2023, Caroline attended an LGBTQ+ counseling workshop where professionals discussed various therapeutic methods for working with transgender people and demonstrated passion for creating safe spaces for individuals like her.", + "id": "a3e155a9-36b4-49e6-b450-53ad02e14c68", + "text": "Melanie took her family camping in the mountains last week.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-23T10:37:00+00:00", - "weight": 0.598690975861133, - "activation": 0.7062608929354224, - "semantic_similarity": 0.789375693268354, - "recency": 4.3472950109126337e-38, + "event_date": "2023-06-20T10:37:00+00:00", + "weight": 0.37908433166397615, + "activation": 0.7636144388799205, + "semantic_similarity": 0.0, + "recency": 3.205006490256024e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The correct answer specifies \"two weekends before 17 July 2023,\" which refers to the weekend of 1\u20132 July 2023 (the second weekend prior to the 17th). The predicted answer gives the weekend of 8\u20139 July 2023, which is only one weekend before the 17th, so the answers are not equivalent." + }, + { + "question": "How long ago was Caroline's 18th birthday?", + "correct_answer": "10 years ago", + "predicted_answer": "I don\u2019t know.", + "reasoning": "The context provides dates for when Caroline moved (2019-06-09) and when she started guitar (2018-08-28, five years ago), and notes she began creating art at about 17, but it never states her birthdate or the date she turned 18. Without a date for when she was 17 or her current age, we cannot determine how long ago her 18th birthday was.", + "category": 2, + "retrieved_memories": [ + { + "id": "5970822b-a5b8-4f04-970b-aaef341659d5", + "text": "Caroline has been creating art since she was about 17 years old.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-09-13T00:09:00+00:00", + "weight": 0.3801309159359113, + "activation": 0.7671030531197043, + "semantic_similarity": 0.0, + "recency": 1.5079656123859377e-34, "frequency": 2.0 }, { - "id": "63dd0bce-9e94-439c-a66b-2348579d05dc", - "text": "Caroline attended an LGBTQ+ pride parade, observed a happy crowd, felt a sense of belonging, and recognized significant growth in the LGBTQ+ community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-26T13:36:00+00:00", - "weight": 0.5832675302614079, - "activation": 0.7062608929354224, - "semantic_similarity": 0.7379642079359373, - "recency": 5.941635134168808e-38, - "frequency": 2.0 - }, - { - "id": "f72607f8-5bf9-482e-ba74-f5ac97c15ac7", - "text": "The LGBTQ community experience showed Caroline how important it is to fight for trans rights and spread awareness.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-10T16:33:00+00:00", - "weight": 0.5811890862685835, - "activation": 0.7062608929354224, - "semantic_similarity": 0.7310360612931892, - "recency": 2.439250805417151e-37, - "frequency": 2.0 - }, - { - "id": "453f811d-9535-42e7-8784-7a0eb35362ba", - "text": "During the June 17, 2023 LGBT pride event, Caroline recalls that the best moment was seeing her mentee's face light up upon witnessing the community's support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-17T14:31:00+00:00", - "weight": 0.5757488452699021, - "activation": 0.7062608929354224, - "semantic_similarity": 0.7129019246309181, - "recency": 2.4249328050903984e-38, - "frequency": 2.0 - }, - { - "id": "c8ae7b11-e6b1-4360-9c03-7a265411447f", - "text": "The group Connected LGBTQ Activists, which Caroline joined, is composed of diverse members investing in positive changes, holds regular meetings, and plans events and campaigns to support each other, as described on July 20, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-20T20:56:00+00:00", - "weight": 0.5706201879423725, - "activation": 0.6663406570655304, - "semantic_similarity": 0.7357266360757113, - "recency": 6.752783785716208e-37, - "frequency": 2.0 - }, - { - "id": "05f1dcaa-6f99-46b5-87e9-d2efa64e01cd", - "text": "Caroline joined a mentorship program for LGBTQ youth on the weekend of July 15\u201316, 2023, aiming to support and empower young members of the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T14:31:00+00:00", - "weight": 0.5674557696440229, - "activation": 0.6089139880927572, - "semantic_similarity": 0.7826052440539858, - "recency": 3.9877163420957654e-37, - "frequency": 2.0 - }, - { - "id": "c15fad08-4a6a-4c55-9d80-696705c085c2", - "text": "Caroline and her mentee attended an LGBT pride event on June 17, 2023, where they experienced a supportive and loving atmosphere.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-17T14:31:00+00:00", - "weight": 0.5674245686658036, - "activation": 0.6096885261040705, - "semantic_similarity": 0.7817267027819415, - "recency": 2.424932805009003e-38, - "frequency": 2.0 - }, - { - "id": "22612de6-dda7-4df8-af30-5d488b1bdc10", - "text": "On 2023-07-14, Caroline attended a council meeting for adoption; she found it inspiring and emotional, observed many people wanting to create loving homes for children in need, and felt even more determined to adopt.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-14T13:51:00+00:00", - "weight": 0.5658305569267591, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6798409634871081, - "recency": 3.5982259920890336e-37, - "frequency": 2.0 - }, - { - "id": "aa36595e-58ca-42dc-b50d-8c785526bbf3", - "text": "Melanie's support has been meaningful to Caroline; Caroline feels grateful for Melanie's support throughout her journey and values being able to share and help others.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.5543802248372177, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6416731898553034, - "recency": 7.796786674122317e-33, - "frequency": 2.0 - }, - { - "id": "3f797cf0-1c31-4f25-8815-0791293e3bcd", - "text": "During her transition and journey toward self-acceptance, Caroline received invaluable help and encouragement from friends, family, and people she looked up to, which boosted her through tough times and helped her discover her true self.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.5483398419787363, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6215385803270321, - "recency": 7.796786674402086e-33, - "frequency": 2.0 - }, - { - "id": "88e28f0b-51b1-45bb-860b-4b1a734d3462", - "text": "Caroline reflected that volunteering reminded her of her own past struggles and feeling alone, and she was glad to share her story and offer support, feeling she could make a difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-28T15:19:00+00:00", - "weight": 0.5473932926751475, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6183834159817357, - "recency": 3.258874434261174e-35, - "frequency": 2.0 - }, - { - "id": "1a905e0b-4767-4a9e-b3ad-bc32d0657ab2", - "text": "Caroline says that her own personal journey and the support she received significantly improved her life; observing the benefits of counseling and support groups motivated her to care more about mental health, understand herself better, and create a safe, inviting environment for others to grow.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5473810399227539, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6183425734737571, - "recency": 6.485402065039465e-38, - "frequency": 2.0 - }, - { - "id": "a4f20608-0fb6-4235-b47b-b64482d3e648", - "text": "Caroline stated her goal is to give kids a loving home, expressed gratitude for support from friends and mentors, and said she feels hopeful and optimistic about turning her adoption dream into reality.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.54652741823091, - "activation": 0.7062608929354224, - "semantic_similarity": 0.6154971678342778, - "recency": 2.4182440707207888e-39, - "frequency": 2.0 - }, - { - "id": "50dd73e8-e477-4c45-b052-b3eae96a1a6a", - "text": "Melanie expressed pride in Caroline's work and said she is proud to be part of the difference Caroline is making.", + "id": "eb08c29e-5e83-4c46-8660-25f9259d29c5", + "text": "Caroline has known her current group of friends for four years, since moving from her home country around 2019-06-09.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5463333678377977, - "activation": 0.7062608929354224, - "semantic_similarity": 0.61485033319057, - "recency": 1.1143862616477157e-38, + "weight": 0.36625793978477394, + "activation": 0.7208597992825798, + "semantic_similarity": 0.0, + "recency": 1.1090047027826934e-38, "frequency": 2.0 }, { - "id": "45907243-354f-45f5-9bd6-61199272b94e", - "text": "Caroline is organizing an LGBTQ art show scheduled for September 2023 (specifically around September 25, 2023) to exhibit her paintings and promote understanding and acceptance within the community.", + "id": "4efedc9a-a336-49b1-94f4-375fd888b6f2", + "text": "Caroline started playing acoustic guitar around 2018-08-28, five years ago, and uses it to express emotions and escape.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-25T13:33:00+00:00", - "weight": 0.5424624381226976, - "activation": 0.5546027376588833, - "semantic_similarity": 0.7536053894167751, - "recency": 5.3197997659606686e-34, + "event_date": "2018-08-28T15:19:00+00:00", + "weight": 0.36312609197562346, + "activation": 0.7104203065854116, + "semantic_similarity": 0.0, + "recency": 1.6173085032063291e-114, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don\u2019t know.' does not state that Caroline's 18th birthday was 10 years ago, so it is not equivalent to the correct answer." + }, + { + "question": "Who supports Caroline when she has a negative experience?", + "correct_answer": "Her mentors, family, and friends", + "predicted_answer": "Her support system.", + "reasoning": "Item 0 states that Caroline received helpful support and realized the importance of having a support system. The context does not name a specific person, so the best-supported answer is that her support system supports her.", + "category": 1, + "retrieved_memories": [ + { + "id": "4f939db0-b897-49cc-9d05-db6e1c74eea7", + "text": "Caroline previously struggled with mental health, received helpful support, and realized the importance of having a support system for others.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-12T16:33:00+00:00", + "weight": 0.3837761342525482, + "activation": 0.7792537808418274, + "semantic_similarity": 0.0, + "recency": 2.9649260839110204e-37, "frequency": 2.0 }, { - "id": "d34361a2-3e61-4679-8516-7de3a31de2a8", - "text": "Caroline volunteered at an LGBTQ+ youth center, found it gratifying to talk to similar young people, and it reminded her of how essential it is to be kind and show support.", + "id": "bc68a8e2-73de-4a2b-a296-b889e6e0bede", + "text": "Caroline is interested in pursuing a career in counseling or mental health so she can support people with similar issues.", "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-28T15:19:00+00:00", - "weight": 0.5378260542978969, - "activation": 0.5650087143483379, - "semantic_similarity": 0.7277447999779849, - "recency": 3.2588642110786975e-35, + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.3738807587481465, + "activation": 0.7462691958271551, + "semantic_similarity": 0.0, + "recency": 4.409249985871881e-40, + "frequency": 2.0 + }, + { + "id": "0dd690fb-a226-4bb3-923b-8f35d64dde98", + "text": "Caroline believes that her own life journey and the support she received made a huge difference in her well\u2011being.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.36851524114608764, + "activation": 0.7283841371536255, + "semantic_similarity": 0.0, + "recency": 6.454096034175689e-38, "frequency": 2.0 } ], "is_correct": true, - "correctness_reasoning": "The predicted answer 2023-05-07 represents the same date as 7 May 2023, just in ISO format, so it is equivalent to the correct answer." + "correctness_reasoning": "The predicted answer \"Her support system\" refers to the people who provide support, which includes mentors, family, and friends as listed in the correct answer. Thus it conveys the same content in a broader form." + }, + { + "question": "When did Melanie go to the museum?", + "correct_answer": "5 July 2023", + "predicted_answer": "Yesterday", + "reasoning": "Item 1 states Melanie took her children to a museum yesterday. Item 0 only notes a picture was viewed, with no date. Item 2 is about a camping trip on 2023-08-23 and is unrelated to the museum visit\u2019s timing.", + "category": 2, + "retrieved_memories": [ + { + "id": "732c00a6-44fc-45e0-8015-f88f0d1632ef", + "text": "Caroline viewed a picture that Melanie shared of the museum visit with her kids.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-06T20:18:00+00:00", + "weight": 0.3668973927765309, + "activation": 0.7229913092551029, + "semantic_similarity": 0.0, + "recency": 1.6528113008167184e-37, + "frequency": 2.0 + }, + { + "id": "cef24409-ecaf-4f2b-9d16-9f374e4c66e9", + "text": "Melanie took her children to a museum yesterday, spending time with them and enjoying their excitement at the dinosaur exhibit.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-05T20:18:00+00:00", + "weight": 0.3558546607960458, + "activation": 0.6861822026534861, + "semantic_similarity": 0.0, + "recency": 1.4955255098416373e-37, + "frequency": 2.0 + }, + { + "id": "f279b6c9-c6bf-41b2-a0f5-910e095b9920", + "text": "Melanie went camping with her kids on 2023-08-23, explored the forest, hiked, and had a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T00:00:00+00:00", + "weight": 0.34598302793300517, + "activation": 0.653276759776684, + "semantic_similarity": 0.0, + "recency": 1.8454518216691754e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer \"Yesterday\" does not match the specific date \"5 July 2023\"; they are not equivalent." + }, + { + "question": "When did Melanie go to the pottery workshop?", + "correct_answer": "The Friday before 15 July 2023", + "predicted_answer": "Friday, July 14, 2023", + "reasoning": "Context item 0 explicitly states that Melanie took her children to a pottery workshop on Friday, July 14, 2023. Items 1 and 2 discuss other pottery-related updates without mentioning the date of the workshop, so they were not used.", + "category": 2, + "retrieved_memories": [ + { + "id": "efe08615-6069-4d6b-936e-6774bb24a47e", + "text": "Melanie took her children to a pottery workshop on Friday, July 14, 2023, where they each made their own pots, including a cup, and found the activity fun and therapeutic.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-14T13:51:00+00:00", + "weight": 0.38909876696158363, + "activation": 0.7969958898719455, + "semantic_similarity": 0.0, + "recency": 3.580852465352537e-37, + "frequency": 2.0 + }, + { + "id": "789ced0e-c74d-4aa0-85a5-dacb967c3417", + "text": "Melanie finished another pottery project.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.3887716376049302, + "activation": 0.7959054586831008, + "semantic_similarity": 0.0, + "recency": 1.0728957059290157e-35, + "frequency": 2.0 + }, + { + "id": "4f53d7b8-a128-48cf-af5f-02869c396525", + "text": "Melanie expressed excitement about future possibilities in pottery.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-03T13:36:00+00:00", + "weight": 0.3836335549841391, + "activation": 0.7787785166137972, + "semantic_similarity": 0.0, + "recency": 1.190721259603924e-37, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The Friday before 15 July 2023 is 14 July 2023, which matches the predicted answer \"Friday, July 14, 2023\". Therefore the answers are equivalent." + }, + { + "question": "When did Caroline and Melanie go to a pride fesetival together?", + "correct_answer": 2022, + "predicted_answer": "2022", + "reasoning": "I used context item 0, which explicitly states they attended a Pride festival together in 2022. Items 1 and 2 discuss other events (a school awareness event and a charity race) and do not mention the festival date.", + "category": 2, + "retrieved_memories": [ + { + "id": "af8180ca-e0a8-41b5-8252-77f85986e022", + "text": "Caroline and Melanie attended a Pride festival together in 2022, describing it as a blast with supportive friends.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2022-08-17T13:50:00+00:00", + "weight": 0.3739254043146731, + "activation": 0.7464180143822436, + "semantic_similarity": 0.0, + "recency": 1.509416212098467e-51, + "frequency": 2.0 + }, + { + "id": "e3fed70e-c0c8-4ab0-8bd6-3c142d3c1c64", + "text": "Melanie expressed pride and support for Caroline's effort to spread LGBTQ awareness at the school event.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.36565908836302435, + "activation": 0.7188636278767478, + "semantic_similarity": 0.0, + "recency": 1.109005840438538e-38, + "frequency": 2.0 + }, + { + "id": "c568bba4-2786-4b35-a624-757ab4bd9678", + "text": "Caroline expressed pride in Melanie for taking part in the charity race.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-25T13:14:00+00:00", + "weight": 0.3651260733604431, + "activation": 0.717086911201477, + "semantic_similarity": 0.0, + "recency": 2.4065684315101577e-39, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer '2022' exactly matches the correct answer '2022', so they are equivalent." }, { "question": "When did Melanie paint a sunrise?", "correct_answer": 2022, - "predicted_answer": "2022-05-08", - "reasoning": "The context explicitly states that Melanie painted a lake sunrise painting last year on 2022-05-08. This directly answers the question about when she painted a sunrise.", + "predicted_answer": "I don\u2019t know.", + "reasoning": "None of the context items mention Melanie painting a sunrise. Item 0 is about a painting inspired by sunsets (not sunrise). Item 1 is a landscape still-life dated 2023-08-25 with no sunrise mentioned. Item 2 notes an abstract painting with no details about a sunrise. Therefore, the date of a sunrise painting is not provided.", "category": 2, "retrieved_memories": [ { - "id": "be729e0b-7a37-4fef-98c1-5da6390b128a", - "text": "Melanie painted a lake sunrise painting last year (2022-05-08), and the artwork is special to her.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2022-05-08T13:56:00+00:00", - "weight": 0.649579216254692, - "activation": 0.832632040004971, - "semantic_similarity": 0.8326320141773355, - "recency": 6.233113001978623e-56, - "frequency": 2.0 - }, - { - "id": "74c1a0a2-91c5-4724-8b8e-84d3d2a1492f", - "text": "Melanie created a painting on 2023-10-06 that was inspired by sunsets; the colors of the painting make her feel calm.", + "id": "b9f441cf-00d4-4f87-a828-cfda1abfea34", + "text": "Melanie shared a painting she created last week, inspired by sunsets, with calming colors.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-10-06T10:31:00+00:00", - "weight": 0.6319213512865487, - "activation": 0.803202224064072, - "semantic_similarity": 0.8032022802244235, - "recency": 1.578038526900449e-33, + "weight": 0.38807059043856246, + "activation": 0.7935686347952082, + "semantic_similarity": 0.0, + "recency": 1.5704663602215603e-33, "frequency": 2.0 }, { - "id": "7d96e021-b14a-4ecd-adb2-3036aeac918a", - "text": "Melanie recently painted a horse, creating a painting that she shared in a photo.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-23T15:31:00+00:00", - "weight": 0.5858844971979617, - "activation": 0.726474090008383, - "semantic_similarity": 0.7264742339848227, - "recency": 1.9781976575661012e-35, - "frequency": 2.0 - }, - { - "id": "fb45c7ac-8079-4af6-bcf2-6ae9dd3ea1d4", - "text": "Melanie recently completed a landscape painting, which she shared during the conversation on August 25, 2023.", + "id": "bbe0dfe4-be5f-4837-9843-75d21004333b", + "text": "Melanie painted a landscape still\u2011life artwork on 2023-08-25, describing it as recent and expressing that painting landscapes and still life are her favorite art forms.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-08-25T13:33:00+00:00", - "weight": 0.5676932504481701, - "activation": 0.6661056320039769, - "semantic_similarity": 0.7262052028232568, - "recency": 2.3964478024196726e-35, + "weight": 0.38185437416596346, + "activation": 0.7728479138865448, + "semantic_similarity": 0.0, + "recency": 2.3849584307008766e-35, "frequency": 2.0 }, { - "id": "64621ccc-3569-43ab-bcbc-300752e4cba9", - "text": "On the weekend of 2023-07-08, Melanie and her kids painted a nature-inspired artwork together, which they described as their latest work.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-08T13:51:00+00:00", - "weight": 0.5674790675852099, - "activation": 0.6661056320039769, - "semantic_similarity": 0.7254912599467229, - "recency": 1.9746827385360728e-37, - "frequency": 2.0 - }, - { - "id": "92a5a070-fa23-4903-ad73-660b7940181b", - "text": "In her sunset\u2011inspired painting, Melanie intentionally used peaceful blue streaks to convey tranquility, noting that the color blue calms her and that she wanted a serene vibe combined with vibrant colors.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-06T10:31:00+00:00", - "weight": 0.5589249296518987, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6969774668356853, - "recency": 1.5780265930621085e-33, - "frequency": 2.0 - }, - { - "id": "b1a619f5-f467-428e-a84f-e6a48bee33e5", - "text": "Melanie and her children completed another collaborative painting, similar to a previous work, on July 17, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.5537432899118439, - "activation": 0.6661056320039769, - "semantic_similarity": 0.679705334368836, - "recency": 4.870446048270206e-37, - "frequency": 2.0 - }, - { - "id": "eb32a52f-791a-42dc-8476-a542e84d2a71", - "text": "Melanie's favorite artistic activities are painting landscapes and still life, which she appreciates for their depiction of nature, as she mentioned on August 25, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-25T13:33:00+00:00", - "weight": 0.552060742248721, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6740968421584266, - "recency": 2.3964396354115454e-35, - "frequency": 2.0 - }, - { - "id": "ca9d8d15-1560-4823-936d-79be60dfb4f9", - "text": "Melanie has been involved in art for seven years and has recently identified painting and pottery as her primary muses.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5478093718537007, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6599256075083587, - "recency": 1.515227697180664e-34, - "frequency": 2.0 - }, - { - "id": "f9c087ae-d272-4bfb-b111-fc538fd577fd", - "text": "On 2023-07-14, Melanie took her kids to a pottery workshop where they all made their own pots; the activity was fun and therapeutic, and the kids loved it, being excited to get their hands dirty and create something with clay.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-14T13:51:00+00:00", - "weight": 0.5477892165130516, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6598584230395286, - "recency": 3.598106543018016e-37, - "frequency": 2.0 - }, - { - "id": "c7ffecc3-a614-401d-9f62-a23753c7ca5f", - "text": "Melanie has been reading a book that Caroline recommended a while ago and has been painting to keep busy.", + "id": "e54b687e-8c75-4e9f-8479-208b2a49ac8a", + "text": "Melanie created an abstract painting and shared it.", "context": "Conversation session between Caroline and Melanie", "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5473645916854543, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6584430069475373, - "recency": 3.177755324011146e-33, - "frequency": 2.0 - }, - { - "id": "ff8318fb-cbb5-4f95-a985-da11cfb910df", - "text": "Caroline painted a piece after visiting an LGBTQ center, intending to capture the community's unity and strength; she shared this painting with Melanie on July 17, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.5463288420862615, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6549905082835616, - "recency": 4.8704460485521115e-37, - "frequency": 2.0 - }, - { - "id": "6ce7be9f-ef63-4d9f-9bce-fd223d501ee8", - "text": "Melanie finds peace through creativity and family support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.5458624279050149, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6534357943460729, - "recency": 3.976522710008435e-37, - "frequency": 2.0 - }, - { - "id": "33bfbe46-a1b7-4119-8110-33f78643abe5", - "text": "During a family camping trip in August 2022, Melanie's family observed the Perseid meteor shower, made wishes, and felt awe while lying under a clear, star\u2011filled sky.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2022-08-12T20:56:00+00:00", - "weight": 0.5424828580079306, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6421705613557918, - "recency": 9.475391120595462e-52, - "frequency": 2.0 - }, - { - "id": "6b0289f7-0dbc-4a51-8628-16d23a5991c1", - "text": "Melanie feels inspired by the autumn season and is planning to create several new paintings in the near future, as expressed on August 25, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-25T13:33:00+00:00", - "weight": 0.5421374526811097, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6410192102663889, - "recency": 2.3964396346432544e-35, - "frequency": 2.0 - }, - { - "id": "8064be3c-0593-4421-b4b5-b3aadffaebfc", - "text": "Melanie also produced an abstract painting and says she loves how art allows her to release her emotions.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5409897524410486, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6371935427995187, - "recency": 3.1777553241325774e-33, - "frequency": 2.0 - }, - { - "id": "d8d3b55e-b418-4ea0-886a-d4c0f8feef62", - "text": "Melanie shared a picture taken on 2023-08-13 showing many people having a blast at the concert, reminding her of the importance of cultivating a loving and accepting environment for her children.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-13T14:24:00+00:00", - "weight": 0.5392727580067038, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6314702280183694, - "recency": 7.243571021106428e-36, - "frequency": 2.0 - }, - { - "id": "e3463e52-1b17-4a7a-b548-e5ccde5a4e2a", - "text": "Melanie created a pottery plate in her pottery class on August 24, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-24T13:33:00+00:00", - "weight": 0.539217989521479, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6312876664009535, - "recency": 2.168395641871343e-35, - "frequency": 2.0 - }, - { - "id": "99533d0b-08a4-4bfb-ae6f-82ff14200c83", - "text": "Melanie has been married for five years, meaning she married her husband around 2018-06-09.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2018-06-09T19:55:00+00:00", - "weight": 0.5364959624660652, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6222142428829073, - "recency": 5.557090313333293e-118, - "frequency": 2.0 - }, - { - "id": "d6fa6c91-b0b0-48c3-8dc6-a2981abaae82", - "text": "On 2023-07-15, Melanie and her family went on a camping trip in the forest.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T13:51:00+00:00", - "weight": 0.5359886032130999, - "activation": 0.6661056320039769, - "semantic_similarity": 0.6205230453730228, - "recency": 3.976522710500861e-37, - "frequency": 2.0 - } - ], - "is_correct": true, - "correctness_reasoning": "The predicted answer '2022-05-08' includes the year 2022, which matches the correct answer. The extra specificity does not contradict the required information, so the answers are equivalent." - }, - { - "question": "What fields would Caroline be likely to pursue in her educaton?", - "correct_answer": "Psychology, counseling certification", - "predicted_answer": "Counseling and mental health", - "reasoning": "The context provides multiple statements indicating Caroline's interest in pursuing a career in counseling and mental health. She has been actively researching these fields, plans to specialize in working with transgender individuals, and has expressed a desire to help others who have faced similar challenges. Therefore, it is clear that these are the fields she is likely to pursue in her education.", - "category": 3, - "retrieved_memories": [ - { - "id": "5819027e-8dda-4d6c-aecf-696e998337c2", - "text": "Caroline plans to continue her education and explore career options, expressing excitement about the prospect.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.6333278909006648, - "activation": 0.805546402931213, - "semantic_similarity": 0.8055465667376696, - "recency": 4.430686961864207e-40, - "frequency": 2.0 - }, - { - "id": "eeb4a464-dc3f-4123-a16e-bfa95dedf0ea", - "text": "Caroline has recently been researching a career in counseling and mental health because she wants to help people who have experienced similar challenges to her own.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5878932463286886, - "activation": 0.729822131416549, - "semantic_similarity": 0.7298220230124131, - "recency": 6.485474681344336e-38, - "frequency": 2.0 - }, - { - "id": "c759737b-8fff-4941-8c74-c832339e7595", - "text": "Caroline is actively researching and considering career options in counseling and mental health because she believes it is important for people to have someone to talk to and wants to help make that happen.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.582146898172474, - "activation": 0.720244824886322, - "semantic_similarity": 0.7202448356885913, - "recency": 2.9793410177962352e-37, - "frequency": 2.0 - }, - { - "id": "280b9bd7-1ed9-4a8a-b169-89af4775ae9b", - "text": "Caroline is keen on becoming a counselor or working in mental health so she can support people who face similar issues.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.5574724976051302, - "activation": 0.6444371223449705, - "semantic_similarity": 0.7138045363387968, - "recency": 4.43068163950985e-40, - "frequency": 2.0 - }, - { - "id": "bf146ef5-5001-4773-af33-8ab30c2b167f", - "text": "Caroline plans to specialize in working with transgender individuals, aiming to help them accept themselves and support their mental health.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5190508116640551, - "activation": 0.5838577051332392, - "semantic_similarity": 0.646311667080278, - "recency": 6.485466888248173e-38, - "frequency": 2.0 - }, - { - "id": "05f1dcaa-6f99-46b5-87e9-d2efa64e01cd", - "text": "Caroline joined a mentorship program for LGBTQ youth on the weekend of July 15\u201316, 2023, aiming to support and empower young members of the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T14:31:00+00:00", - "weight": 0.5110870124043192, - "activation": 0.5761958599090576, - "semantic_similarity": 0.6274275147720062, - "recency": 3.987756193524277e-37, - "frequency": 2.0 - }, - { - "id": "a10ae2d0-45de-4fbb-8c37-9762142b5158", - "text": "As of July 17, 2023, Caroline is mentoring a transgender teen who shares her own gender identity, and together they are working on building confidence and developing positive coping strategies.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.5098787746974163, - "activation": 0.5761958599090576, - "semantic_similarity": 0.6234000557489967, - "recency": 4.870656422564771e-37, - "frequency": 2.0 - }, - { - "id": "1a905e0b-4767-4a9e-b3ad-bc32d0657ab2", - "text": "Caroline says that her own personal journey and the support she received significantly improved her life; observing the benefits of counseling and support groups motivated her to care more about mental health, understand herself better, and create a safe, inviting environment for others to grow.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.509216984880943, - "activation": 0.5838577051332392, - "semantic_similarity": 0.6135322444699044, - "recency": 6.485466888090481e-38, - "frequency": 2.0 - }, - { - "id": "72855141-35e9-47cd-92aa-5d1ffb89ae3a", - "text": "The LGBTQ support group made Caroline feel accepted and gave her courage to embrace herself.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.5076642422722653, - "activation": 0.6444371223449705, - "semantic_similarity": 0.5477770185625805, - "recency": 4.430681638150903e-40, - "frequency": 2.0 - }, - { - "id": "5477179a-380b-4266-8c50-a88d995c574a", - "text": "Caroline found the transgender stories shared at the LGBTQ support group inspiring, and she felt happy and thankful for the support she received.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.5044990900556001, - "activation": 0.6444371223449705, - "semantic_similarity": 0.5372265111736967, - "recency": 4.430681638263671e-40, - "frequency": 2.0 - }, - { - "id": "83e62a1b-74b9-40e2-b6d8-e4d9dab557a6", - "text": "Caroline received a necklace as a gift from her grandmother in Sweden when she was young; the necklace symbolizes love, faith, and strength and serves as a reminder of her roots and the love and support she receives from her family.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.4990035365793578, - "activation": 0.5838577051332392, - "semantic_similarity": 0.5794874167979536, - "recency": 6.485466888405682e-38, - "frequency": 2.0 - }, - { - "id": "73850c77-935b-45c3-9a68-3552e0f85121", - "text": "Caroline emphasizes that mental health is a priority and advises Melanie to take care of herself.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4945876133452587, - "activation": 0.5761958599090576, - "semantic_similarity": 0.5724295179084713, - "recency": 2.9793374327131804e-37, - "frequency": 2.0 - }, - { - "id": "55adbb21-7685-4f71-8e02-e1b1e8a7c0b9", - "text": "Caroline intends to continue volunteering at the LGBTQ+ youth center, considers it an important part of her life, has made strong connections with people there, believes in community and supporting each other, and wants to keep making a difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-28T15:19:00+00:00", - "weight": 0.49254106871292913, - "activation": 0.48033283357744794, - "semantic_similarity": 0.6614707287989824, - "recency": 3.2589070053349804e-35, - "frequency": 2.0 - }, - { - "id": "4c301737-73f0-4944-a209-32acae5d4478", - "text": "Caroline says the book taught her self-acceptance, how to find support, that tough times don't last, and that hope and love exist; she also notes that pets bring a lot of joy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4924063984750212, - "activation": 0.5761958599090576, - "semantic_similarity": 0.5651588016743463, - "recency": 2.9793374365373596e-37, - "frequency": 2.0 - }, - { - "id": "53358350-28d3-4192-ba20-b7259eeebee8", - "text": "Caroline previously struggled with mental health, received helpful support, which made her realize the importance of having a support system for others, and consequently started looking into counseling and mental health career options to assist others on their journeys.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.491981419428552, - "activation": 0.5031505271192448, - "semantic_similarity": 0.6367875376425951, - "recency": 2.9793374376615006e-37, - "frequency": 2.0 - }, - { - "id": "006df526-f850-48a9-a2f3-a13799f0391c", - "text": "Melanie states that the conversation with Caroline has been great for her mental health and she intends to continue the positive practices.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4911463040758277, - "activation": 0.5761958599090576, - "semantic_similarity": 0.5609584870103681, - "recency": 2.9793374331028256e-37, - "frequency": 2.0 - }, - { - "id": "ddf46000-7d88-44b4-b9f7-ba012537e710", - "text": "Caroline loves the book \"Becoming Nicole\" by Amy Ellis Nutt, a true story about a trans girl and her family, which made her feel connected, gave her hope for her own path, and she highly recommends it.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4907655327709255, - "activation": 0.5761958599090576, - "semantic_similarity": 0.5596892493273606, - "recency": 2.9793374370442836e-37, - "frequency": 2.0 - }, - { - "id": "5c2765c4-57b3-4606-a52c-53a87daf2b2f", - "text": "Caroline expressed that she is ready to become a mother and share her love and family.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.4874331455256029, - "activation": 0.4813448124600541, - "semantic_similarity": 0.6434323392919554, - "recency": 3.177903424126703e-33, - "frequency": 2.0 - }, - { - "id": "5e2c78a6-b363-44f7-a74b-23b7b61980f9", - "text": "Caroline has been looking into counseling or mental health work since her last conversation with Melanie, expressing passion for helping people, describing the work as tough but rewarding.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-06T20:18:00+00:00", - "weight": 0.4868065782901396, - "activation": 0.5008205505932704, - "semantic_similarity": 0.6218680437071952, - "recency": 1.6608440540150602e-37, - "frequency": 2.0 - }, - { - "id": "1c925f41-511f-4e75-89ef-b0412f644b60", - "text": "Caroline said the parade motivated her to use her personal story to help others, and she is considering a career in counseling and mental health to give back to the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-03T13:36:00+00:00", - "weight": 0.48498031705910283, - "activation": 0.4804768746325535, - "semantic_similarity": 0.6361241822311224, - "recency": 1.1965103429385313e-37, - "frequency": 2.0 - } - ], - "is_correct": true, - "correctness_reasoning": "The predicted answer 'Counseling and mental health' covers the same domains as the correct answer 'Psychology, counseling certification'. 'Counseling' matches the counseling certification, and 'mental health' corresponds to the field of psychology. Thus the content is equivalent." - }, - { - "question": "What is Caroline's identity?", - "correct_answer": "Transgender woman", - "predicted_answer": "Caroline is a trans woman.", - "reasoning": "The context explicitly states that Caroline created a painting intended to represent her journey as a trans woman, indicating her identity.", - "category": 1, - "retrieved_memories": [ - { - "id": "c83ebdb6-822c-4208-8da4-6ffbfdd3fd46", - "text": "Caroline created a painting intended to represent her journey as a trans woman; the red and blue colors symbolize the binary gender system, their mixture signifies breaking that rigidity, and the artwork serves as a reminder to love her authentic self after a long process of self-acceptance.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.554857861963098, - "activation": 0.674763082010196, - "semantic_similarity": 0.6747631245334641, - "recency": 1.515269859495297e-34, - "frequency": 2.0 - }, - { - "id": "79d809b7-ed0b-48ee-80ed-932bc2b61e87", - "text": "Caroline's artwork focuses on expressing her trans experience, aiming to tell her personal story and help others understand the trans community, as of 2023-08-14.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-14T14:24:00+00:00", - "weight": 0.5542572501175975, - "activation": 0.673762062339537, - "semantic_similarity": 0.6737621047191215, - "recency": 8.005579483282672e-36, - "frequency": 2.0 - }, - { - "id": "1e910def-a7cb-4593-be18-99c833176fa3", - "text": "Caroline's gender transition and artistic expression have altered her relationships: some close friends continue to support her, while a few could not handle the changes; overall she feels happier and her relationships now feel more genuine.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5508956355256378, - "activation": 0.668159286003198, - "semantic_similarity": 0.6681594990822615, - "recency": 1.515269859121716e-34, - "frequency": 2.0 - }, - { - "id": "a8b8baac-87de-4f41-b0c5-b32f2870f1d6", - "text": "Caroline is inspired by her work that makes a difference for the LGBTQ+ community, believing that helping create a more loving world is amazing, and this inspiration motivates her to keep making art.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5072196185015274, - "activation": 0.5398104656081568, - "semantic_similarity": 0.6509215960636011, - "recency": 1.5152683093644787e-34, - "frequency": 2.0 - }, - { - "id": "ed205e95-5f5f-4fa3-a5de-ae15db6e08ca", - "text": "Caroline has been creating art since she was about 17 years old, finding the practice empowering and cathartic.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5054569679485338, - "activation": 0.5398104656081568, - "semantic_similarity": 0.6450460942202894, - "recency": 1.5152683094083203e-34, - "frequency": 2.0 - }, - { - "id": "d4afd073-6eda-41ec-b138-8fc46c23bc23", - "text": "Caroline has not yet tried pottery but is interested in trying new art forms and may try pottery sometime in the future.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.5008132128945666, - "activation": 0.5398104656081568, - "semantic_similarity": 0.629566910707065, - "recency": 1.5152683098906222e-34, - "frequency": 2.0 - }, - { - "id": "2ddf41e8-b729-4ec4-9371-1c1787bad2b8", - "text": "Caroline creates inclusive and diverse artwork, using it as a platform to advocate for the LGBTQ+ community and promote acceptance; she recently produced a painting (unspecified) as of 2023-08-14.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-14T14:24:00+00:00", - "weight": 0.5006426751759953, - "activation": 0.5390096498716296, - "semantic_similarity": 0.6297992673816878, - "recency": 8.00557129215223e-36, - "frequency": 2.0 - }, - { - "id": "3ac1218b-6a5e-46e7-b7cf-47af5ec87d96", - "text": "Caroline created a self-portrait painting last week (the week of 2023-08-14 to 2023-08-20), which she posted in the conversation.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-16T15:31:00+00:00", - "weight": 0.49407176384397755, - "activation": 0.5390096498716296, - "semantic_similarity": 0.6078962296082956, - "recency": 9.823627847539195e-36, - "frequency": 2.0 - }, - { - "id": "f3826dfa-cd0a-460c-a3d3-b79f67176ce2", - "text": "Caroline is planning to host an LGBTQ art show featuring her paintings in August 2023, specifically scheduled for August 17, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T14:31:00+00:00", - "weight": 0.48931827929138116, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5920512810996408, - "recency": 1.0811645302414841e-35, - "frequency": 2.0 - }, - { - "id": "60fa2ddb-d241-4067-910e-ad8b864ac31b", - "text": "Melanie said that Caroline has always been there for her, and she appreciates their friendship.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.48302552657502695, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5710754387117937, - "recency": 1.0780905926085173e-35, - "frequency": 2.0 - }, - { - "id": "88ee8470-c94d-4821-9614-bff8ee8d6433", - "text": "Caroline attended a pride parade on 2023-08-11, describing it as full of energy and love, which made her feel proud and reinforced her belief in the importance of standing up for equality.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-11T14:24:00+00:00", - "weight": 0.4782470974366435, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5551473415838489, - "recency": 5.930673079856595e-36, - "frequency": 2.0 - }, - { - "id": "eab9d6a2-f455-4c10-84e5-fcc6f4c87adc", - "text": "Following her beach visit on August 18, 2023, Caroline painted a sunset scene to capture the calming feeling she experienced.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-18T13:33:00+00:00", - "weight": 0.47668413320904524, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5499374608251877, - "recency": 1.1900685984491014e-35, - "frequency": 2.0 - }, - { - "id": "cd1a7636-f1c8-4f36-bd1b-d7b4bd7ea84b", - "text": "Caroline had a not-so-great experience on a hike where she ran into a group of religious conservatives who said something that upset her, which made her think about how much work still needs to be done for LGBTQ rights.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.47655911482930946, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5495207328927352, - "recency": 1.0780905926734e-35, - "frequency": 2.0 - }, - { - "id": "43224c50-a69d-4d79-bda5-98253119a520", - "text": "Caroline expressed appreciation for her friendship with Melanie.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.4761944562133029, - "activation": 0.43184837248652547, - "semantic_similarity": 0.6554664815578175, - "recency": 1.0780863881307891e-35, - "frequency": 2.0 - }, - { - "id": "6c731f26-dd5c-4536-b897-8054255fe1b4", - "text": "Caroline produced a painting titled \"Embracing Identity\" that depicts a woman symbolizing the journey of acceptance, with the aim of conveying warmth, love, and self-acceptance; this work was referenced on 2023-08-14.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-14T14:24:00+00:00", - "weight": 0.4761134436611424, - "activation": 0.427593002099958, - "semantic_similarity": 0.6594518101038499, - "recency": 8.005571294663159e-36, - "frequency": 2.0 - }, - { - "id": "45907243-354f-45f5-9bd6-61199272b94e", - "text": "Caroline is organizing an LGBTQ art show scheduled for September 2023 (specifically around September 25, 2023) to exhibit her paintings and promote understanding and acceptance within the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-25T13:33:00+00:00", - "weight": 0.4745712211164256, - "activation": 0.4494030141151468, - "semantic_similarity": 0.6325010562729384, - "recency": 5.319747596682734e-34, - "frequency": 2.0 - }, - { - "id": "ca9d8d15-1560-4823-936d-79be60dfb4f9", - "text": "Melanie has been involved in art for seven years and has recently identified painting and pottery as her primary muses.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-09-13T00:09:00+00:00", - "weight": 0.47390486518457087, - "activation": 0.5398104656081568, - "semantic_similarity": 0.5398724183404129, - "recency": 1.515268309536357e-34, - "frequency": 2.0 - }, - { - "id": "48495b16-a159-4d5e-bd2b-1db64489b0fb", - "text": "Caroline visited a beach on August 18, 2023, watched the sun set below the horizon, and was inspired by the vivid colors.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-18T13:33:00+00:00", - "weight": 0.4709709878254469, - "activation": 0.5390096498716296, - "semantic_similarity": 0.5308936428798601, - "recency": 1.190068598484887e-35, - "frequency": 2.0 - }, - { - "id": "72855141-35e9-47cd-92aa-5d1ffb89ae3a", - "text": "The LGBTQ support group made Caroline feel accepted and gave her courage to embrace herself.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.4706860446327654, - "activation": 0.4206203135012283, - "semantic_similarity": 0.6483331686079898, - "recency": 4.430593898215753e-40, - "frequency": 2.0 - }, - { - "id": "50dd73e8-e477-4c45-b052-b3eae96a1a6a", - "text": "Melanie expressed pride in Caroline's work and said she is proud to be part of the difference Caroline is making.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.46958491726488694, - "activation": 0.43184837248652547, - "semantic_similarity": 0.6334346850630976, - "recency": 1.1143672569065206e-38, - "frequency": 2.0 - } - ], - "is_correct": true, - "correctness_reasoning": "The predicted answer states that Caroline is a trans woman, which is equivalent to the correct answer 'Transgender woman'." - }, - { - "question": "What did Caroline research?", - "correct_answer": "Adoption agencies", - "predicted_answer": "Caroline researched career options in counseling and mental health, as well as adoption agencies.", - "reasoning": "The context explicitly states that Caroline is researching a career in counseling and mental health (items 0, 1, 6, 12, 16) and also mentions her research into adoption agencies (item 2). Therefore, both areas of research are clearly indicated in the provided context.", - "category": 1, - "retrieved_memories": [ - { - "id": "eeb4a464-dc3f-4123-a16e-bfa95dedf0ea", - "text": "Caroline has recently been researching a career in counseling and mental health because she wants to help people who have experienced similar challenges to her own.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5794384677544774, - "activation": 0.715730743662682, - "semantic_similarity": 0.7157308155189092, - "recency": 6.485732412751227e-38, - "frequency": 2.0 - }, - { - "id": "c759737b-8fff-4941-8c74-c832339e7595", - "text": "Caroline is actively researching and considering career options in counseling and mental health because she believes it is important for people to have someone to talk to and wants to help make that happen.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.5696282642038295, - "activation": 0.699380439482955, - "semantic_similarity": 0.6993804411964767, - "recency": 2.9794594154744854e-37, - "frequency": 2.0 - }, - { - "id": "0188d9d9-2ecb-4339-b41f-071e91baba40", - "text": "Caroline is researching adoption agencies because she has long dreamed of having a family and giving a loving home to children who need one.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.5632356338407093, - "activation": 0.688726092013202, - "semantic_similarity": 0.6887260207891623, - "recency": 2.4183672474861377e-39, - "frequency": 2.0 - }, - { - "id": "bf146ef5-5001-4773-af33-8ab30c2b167f", - "text": "Caroline plans to specialize in working with transgender individuals, aiming to help them accept themselves and support their mental health.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5072137320716724, - "activation": 0.5725845949301456, - "semantic_similarity": 0.6181278453087624, - "recency": 6.485724067976057e-38, - "frequency": 2.0 - }, - { - "id": "1a905e0b-4767-4a9e-b3ad-bc32d0657ab2", - "text": "Caroline says that her own personal journey and the support she received significantly improved her life; observing the benefits of counseling and support groups motivated her to care more about mental health, understand herself better, and create a safe, inviting environment for others to grow.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5017927726791095, - "activation": 0.5725845949301456, - "semantic_similarity": 0.6000579806668861, - "recency": 6.485724067765822e-38, - "frequency": 2.0 - }, - { - "id": "83e62a1b-74b9-40e2-b6d8-e4d9dab557a6", - "text": "Caroline received a necklace as a gift from her grandmother in Sweden when she was young; the necklace symbolizes love, faith, and strength and serves as a reminder of her roots and the love and support she receives from her family.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5008315705800984, - "activation": 0.5725845949301456, - "semantic_similarity": 0.5968539736701824, - "recency": 6.485724068959394e-38, - "frequency": 2.0 - }, - { - "id": "280b9bd7-1ed9-4a8a-b169-89af4775ae9b", - "text": "Caroline is keen on becoming a counselor or working in mental health so she can support people who face similar issues.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.4992268594298619, - "activation": 0.5340787715851291, - "semantic_similarity": 0.630010759847744, - "recency": 4.430857334771276e-40, - "frequency": 2.0 - }, - { - "id": "73850c77-935b-45c3-9a68-3552e0f85121", - "text": "Caroline emphasizes that mental health is a priority and advises Melanie to take care of herself.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.49883968642847987, - "activation": 0.559504351586364, - "semantic_similarity": 0.6032946031752354, - "recency": 2.9794555800195424e-37, - "frequency": 2.0 - }, - { - "id": "a10ae2d0-45de-4fbb-8c37-9762142b5158", - "text": "As of July 17, 2023, Caroline is mentoring a transgender teen who shares her own gender identity, and together they are working on building confidence and developing positive coping strategies.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-17T14:31:00+00:00", - "weight": 0.49703533128847976, - "activation": 0.559504351586364, - "semantic_similarity": 0.5972800860419019, - "recency": 4.87084956709961e-37, - "frequency": 2.0 - }, - { - "id": "a4f20608-0fb6-4235-b47b-b64482d3e648", - "text": "Caroline stated her goal is to give kids a loving home, expressed gratitude for support from friends and mentors, and said she feels hopeful and optimistic about turning her adoption dream into reality.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.49699247986583384, - "activation": 0.5509808736105616, - "semantic_similarity": 0.6056607259422179, - "recency": 2.4183641336192322e-39, - "frequency": 2.0 - }, - { - "id": "05f1dcaa-6f99-46b5-87e9-d2efa64e01cd", - "text": "Caroline joined a mentorship program for LGBTQ youth on the weekend of July 15\u201316, 2023, aiming to support and empower young members of the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T14:31:00+00:00", - "weight": 0.494513164550792, - "activation": 0.559504351586364, - "semantic_similarity": 0.5888728635829426, - "recency": 3.9879143305085155e-37, - "frequency": 2.0 - }, - { - "id": "d8b3fb45-7e02-4aad-8cd9-79e0a7cc1a76", - "text": "Caroline chose a specific adoption agency because it assists LGBTQ+ individuals with adoption, and she was attracted to its inclusivity and support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.4941924669756822, - "activation": 0.5509808736105616, - "semantic_similarity": 0.5963273496417124, - "recency": 2.41836413352407e-39, - "frequency": 2.0 - }, - { - "id": "53358350-28d3-4192-ba20-b7259eeebee8", - "text": "Caroline previously struggled with mental health, received helpful support, which made her realize the importance of having a support system for others, and consequently started looking into counseling and mental health career options to assist others on their journeys.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.4939609162862364, - "activation": 0.4934357091231964, - "semantic_similarity": 0.6531006784975917, - "recency": 2.9794555825023955e-37, - "frequency": 2.0 - }, - { - "id": "60b8d54d-4c1f-477b-904e-38ab8949bf06", - "text": "Caroline expressed excitement about creating a family for children in need, acknowledged that it will be challenging as a single parent, but affirmed she is ready for the challenge.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.49364870295561747, - "activation": 0.5509808736105616, - "semantic_similarity": 0.5945148029081634, - "recency": 2.41836413346245e-39, - "frequency": 2.0 - }, - { - "id": "006df526-f850-48a9-a2f3-a13799f0391c", - "text": "Melanie states that the conversation with Caroline has been great for her mental health and she intends to continue the positive practices.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.48826275503183203, - "activation": 0.559504351586364, - "semantic_similarity": 0.5680381651864093, - "recency": 2.979455580557522e-37, - "frequency": 2.0 - }, - { - "id": "ddf46000-7d88-44b4-b9f7-ba012537e710", - "text": "Caroline loves the book \"Becoming Nicole\" by Amy Ellis Nutt, a true story about a trans girl and her family, which made her feel connected, gave her hope for her own path, and she highly recommends it.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.48645685184642806, - "activation": 0.559504351586364, - "semantic_similarity": 0.5620184879017295, - "recency": 2.9794555818471747e-37, - "frequency": 2.0 - }, - { - "id": "5e2c78a6-b363-44f7-a74b-23b7b61980f9", - "text": "Caroline has been looking into counseling or mental health work since her last conversation with Melanie, expressing passion for helping people, describing the work as tough but rewarding.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-06T20:18:00+00:00", - "weight": 0.48609639250226766, - "activation": 0.49115071972664925, - "semantic_similarity": 0.629170588614243, - "recency": 1.6609099143444882e-37, - "frequency": 2.0 - }, - { - "id": "55aa9ea8-0635-4680-9ed1-243b08e8d5fc", - "text": "Caroline's goal is to have a family; she hopes to build her own family by adopting children and providing them a home, viewing adoption as a way of giving back and showing love and acceptance.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.485850455679414, - "activation": 0.48001741392383207, - "semantic_similarity": 0.6394841050075479, - "recency": 7.797173772342497e-33, - "frequency": 2.0 - }, - { - "id": "5819027e-8dda-4d6c-aecf-696e998337c2", - "text": "Caroline plans to continue her education and explore career options, expressing excitement about the prospect.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-08T13:56:00+00:00", - "weight": 0.48272074488201033, - "activation": 0.4272630172681033, - "semantic_similarity": 0.6818061323385977, - "recency": 4.4308439583049156e-40, - "frequency": 2.0 - }, - { - "id": "4c301737-73f0-4944-a209-32acae5d4478", - "text": "Caroline says the book taught her self-acceptance, how to find support, that tough times don't last, and that hope and love exist; she also notes that pets bring a lot of joy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-12T16:33:00+00:00", - "weight": 0.48229796156010274, - "activation": 0.559504351586364, - "semantic_similarity": 0.5481555202806452, - "recency": 2.9794555817644835e-37, - "frequency": 2.0 - } - ], - "is_correct": true, - "correctness_reasoning": "The predicted answer includes \"adoption agencies,\" which matches the correct answer. Although it adds extra information about career options in counseling and mental health, it still contains the required answer, so it is considered equivalent." - }, - { - "question": "When did Caroline meet up with her friends, family, and mentors?", - "correct_answer": "The week before 9 June 2023", - "predicted_answer": "I don't know", - "reasoning": "The context does not provide specific dates or instances of Caroline meeting up with her friends, family, and mentors. It mentions her gratitude for their support and her experiences with them, but it does not specify when these meetings occurred.", - "category": 2, - "retrieved_memories": [ - { - "id": "0b5694e4-7c0b-422c-bed4-588d92fb067f", - "text": "Caroline has known her current friends for four years, having moved from her home country around 2019-06-09.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.6010526862460175, - "activation": 0.751754485122993, - "semantic_similarity": 0.7517544690303984, - "recency": 1.1144318304372272e-38, - "frequency": 2.0 - }, - { - "id": "d8fcc8ca-5510-49a0-bab6-667aabb04d42", - "text": "Caroline contacted her mentor for adoption advice.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5908183021046474, - "activation": 0.734697185000694, - "semantic_similarity": 0.7346971553481304, - "recency": 3.178001608290096e-33, - "frequency": 2.0 - }, - { - "id": "5f5ec14c-8715-4770-988a-6aa1fe4176f0", - "text": "Caroline attended an LGBTQ support group on 2023-05-07, finding the experience powerful.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-07T13:56:00+00:00", - "weight": 0.5846830075977348, - "activation": 0.724471688270569, - "semantic_similarity": 0.7244716703885473, - "recency": 4.009170396332213e-40, - "frequency": 2.0 - }, - { - "id": "ad619ec1-c081-4fab-bb8f-707d8eed6fc0", - "text": "Caroline mentioned a tough breakup in the past and expressed thankfulness for her friends, family, and mentors who have supported her.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5438181993793406, - "activation": 0.6014035880983944, - "semantic_similarity": 0.7113237431660742, - "recency": 1.1144300572150759e-38, - "frequency": 2.0 - }, - { - "id": "ec88eee3-ba37-427f-9bf4-e0995d5fc61a", - "text": "On Friday, June 23, 2023, Caroline attended an LGBTQ+ counseling workshop where professionals discussed various therapeutic methods for working with transgender people and demonstrated passion for creating safe spaces for individuals like her.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-23T10:37:00+00:00", - "weight": 0.5317243625786355, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6928371913123298, - "recency": 4.3474658545707335e-38, - "frequency": 2.0 - }, - { - "id": "c5161f91-693c-48a1-a288-ad149f8fc765", - "text": "Caroline attended an LGBTQ conference on 2023-07-10, two days before the reference date, where she met and connected with people who have experienced similar journeys, found the environment welcoming, felt totally accepted, and expressed gratitude for the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-10T16:33:00+00:00", - "weight": 0.5304923054101583, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6887303340840725, - "recency": 2.439346662855671e-37, - "frequency": 2.0 - }, - { - "id": "5c2765c4-57b3-4606-a52c-53a87daf2b2f", - "text": "Caroline expressed that she is ready to become a mother and share her love and family.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5223467720549109, - "activation": 0.5877577480005552, - "semantic_similarity": 0.6533981588491475, - "recency": 3.1779965507657496e-33, - "frequency": 2.0 - }, - { - "id": "3f797cf0-1c31-4f25-8815-0791293e3bcd", - "text": "During her transition and journey toward self-acceptance, Caroline received invaluable help and encouragement from friends, family, and people she looked up to, which boosted her through tough times and helped her discover her true self.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.5159861957616187, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6403766352556072, - "recency": 7.797093076866785e-33, - "frequency": 2.0 - }, - { - "id": "05f1dcaa-6f99-46b5-87e9-d2efa64e01cd", - "text": "Caroline joined a mentorship program for LGBTQ youth on the weekend of July 15\u201316, 2023, aiming to support and empower young members of the community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-15T14:31:00+00:00", - "weight": 0.5112932706091949, - "activation": 0.4996917704239485, - "semantic_similarity": 0.7046191316067013, - "recency": 3.987873055010309e-37, - "frequency": 2.0 - }, - { - "id": "aa36595e-58ca-42dc-b50d-8c785526bbf3", - "text": "Melanie's support has been meaningful to Caroline; Caroline feels grateful for Melanie's support throughout her journey and values being able to share and help others.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-22T09:55:00+00:00", - "weight": 0.5109544632213276, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6236041934546369, - "recency": 7.797093076623018e-33, - "frequency": 2.0 - }, - { - "id": "88e28f0b-51b1-45bb-860b-4b1a734d3462", - "text": "Caroline reflected that volunteering reminded her of her own past struggles and feeling alone, and she was glad to share her story and offer support, feeling she could make a difference.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-28T15:19:00+00:00", - "weight": 0.5108315798564431, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6231945822383552, - "recency": 3.2590025028256203e-35, - "frequency": 2.0 - }, - { - "id": "a4f20608-0fb6-4235-b47b-b64482d3e648", - "text": "Caroline stated her goal is to give kids a loving home, expressed gratitude for support from friends and mentors, and said she feels hopeful and optimistic about turning her adoption dream into reality.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-05-25T13:14:00+00:00", - "weight": 0.5103946960187441, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6217383027793583, - "recency": 2.418339104239752e-39, - "frequency": 2.0 - }, - { - "id": "63dd0bce-9e94-439c-a66b-2348579d05dc", - "text": "Caroline attended an LGBTQ+ pride parade, observed a happy crowd, felt a sense of belonging, and recognized significant growth in the LGBTQ+ community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-26T13:36:00+00:00", - "weight": 0.5084066605467776, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6151115178728037, - "recency": 5.941868633581348e-38, - "frequency": 2.0 - }, - { - "id": "43224c50-a69d-4d79-bda5-98253119a520", - "text": "Caroline expressed appreciation for her friendship with Melanie.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-08-17T13:50:00+00:00", - "weight": 0.5072750954977371, - "activation": 0.4811228704787156, - "semantic_similarity": 0.7097941145137414, - "recency": 1.0781391322707423e-35, - "frequency": 2.0 - }, - { - "id": "c7ffecc3-a614-401d-9f62-a23753c7ca5f", - "text": "Melanie has been reading a book that Caroline recommended a while ago and has been painting to keep busy.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-10-13T10:31:00+00:00", - "weight": 0.5060902901101197, - "activation": 0.5877577480005552, - "semantic_similarity": 0.5992098856998439, - "recency": 3.177996550684864e-33, - "frequency": 2.0 - }, - { - "id": "453f811d-9535-42e7-8784-7a0eb35362ba", - "text": "During the June 17, 2023 LGBT pride event, Caroline recalls that the best moment was seeing her mentee's face light up upon witnessing the community's support.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-17T14:31:00+00:00", - "weight": 0.5060437535470546, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6072351612070598, - "recency": 2.4250281037657853e-38, - "frequency": 2.0 - }, - { - "id": "1a905e0b-4767-4a9e-b3ad-bc32d0657ab2", - "text": "Caroline says that her own personal journey and the support she received significantly improved her life; observing the benefits of counseling and support groups motivated her to care more about mental health, understand herself better, and create a safe, inviting environment for others to grow.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-27T10:37:00+00:00", - "weight": 0.5058604333261678, - "activation": 0.5795773506164552, - "semantic_similarity": 0.6066240938041042, - "recency": 6.485656933843071e-38, - "frequency": 2.0 - }, - { - "id": "98c08619-7bb3-467c-a87e-027ee4b31021", - "text": "Both Caroline and Melanie affirmed their commitment to continue supporting each other, spreading love, acceptance, and hope, and to motivate each other through life's challenges.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.50464851264145, - "activation": 0.6014035880983944, - "semantic_similarity": 0.5807581207064392, - "recency": 1.1144300571454247e-38, - "frequency": 2.0 - }, - { - "id": "d20a1038-61b6-4baa-9d6a-7d3a729434af", - "text": "Caroline expressed gratitude for the love and support she has received throughout her transition and aims to give a voice to the trans community.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-06-09T19:55:00+00:00", - "weight": 0.5045089567986043, - "activation": 0.6014035880983944, - "semantic_similarity": 0.5802929345636201, - "recency": 1.1144300571764019e-38, - "frequency": 2.0 - }, - { - "id": "3a2f0dfc-4fc1-4986-9474-ce54481550a3", - "text": "Caroline joined a new LGBTQ activist group called Connected LGBTQ Activists on Tuesday, July 18, 2023.", - "context": "Conversation session between Caroline and Melanie", - "event_date": "2023-07-18T20:56:00+00:00", - "weight": 0.5030478276643547, - "activation": 0.48810711378264965, - "semantic_similarity": 0.6887189784318661, - "recency": 5.528929027864583e-37, + "weight": 0.3802450913336928, + "activation": 0.7674836377789759, + "semantic_similarity": 0.0, + "recency": 3.1625308841041375e-33, "frequency": 2.0 } ], "is_correct": false, - "correctness_reasoning": "The predicted answer 'I don't know' does not provide the information that Caroline met up with her friends, family, and mentors the week before 9 June 2023, so it is not equivalent to the correct answer." + "correctness_reasoning": "The predicted answer 'I don\u2019t know.' does not contain the correct answer '2022' and therefore is not equivalent." + }, + { + "question": "What do Melanie's kids like?", + "correct_answer": "dinosaurs, nature", + "predicted_answer": "Nature.", + "reasoning": "Item 0 explicitly states Melanie has two younger kids who love nature, directly answering what they like. Item 1 mentions a beach trip where they had fun, but it doesn\u2019t explicitly state a general preference. Item 2 is about Melanie\u2019s belief in family time and isn\u2019t relevant to the kids\u2019 likes.", + "category": 1, + "retrieved_memories": [ + { + "id": "46b3991f-2036-483f-b4e5-240fc1b4be21", + "text": "Melanie has two younger kids who love nature.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.38538311334747793, + "activation": 0.7846103778249265, + "semantic_similarity": 0.0, + "recency": 6.454102804100164e-38, + "frequency": 2.0 + }, + { + "id": "b694e877-b762-486d-bb16-1ecc10f67941", + "text": "Melanie and her family went to the beach recently, and the kids had a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.3689752496510462, + "activation": 0.7299174988368207, + "semantic_similarity": 0.0, + "recency": 6.7201941125962154e-37, + "frequency": 2.0 + }, + { + "id": "5407ad19-b809-4f32-a01d-02ecf2fcd851", + "text": "Melanie believes that family time matters to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.36274783535314625, + "activation": 0.7091594511771542, + "semantic_similarity": 0.0, + "recency": 6.45410280046977e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer only mentions \"Nature\" and does not include \"dinosaurs\", so it does not fully match the correct answer which requires both dinosaurs and nature." + }, + { + "question": "When did Caroline go to the adoption meeting?", + "correct_answer": "The friday before 15 July 2023", + "predicted_answer": "Friday, July 14, 2023", + "reasoning": "I used context item 0, which explicitly states Caroline attended a council meeting about adoption on Friday, July 14, 2023. Items 1 and 2 discuss contacting a mentor and receiving assistance but do not provide the meeting date, so they were not used.", + "category": 2, + "retrieved_memories": [ + { + "id": "7db02005-85be-4b93-b42f-8b32bc1db9bc", + "text": "Caroline attended a council meeting about adoption on Friday, July 14, 2023, found it inspiring and emotional, and felt more determined to adopt a child.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-14T13:51:00+00:00", + "weight": 0.3965841357011633, + "activation": 0.8219471190038777, + "semantic_similarity": 0.0, + "recency": 3.5808543621645934e-37, + "frequency": 2.0 + }, + { + "id": "82019d6f-9764-4b42-a3a3-bd25d8f3ea39", + "text": "Caroline contacted her mentor for adoption advice.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.3951524051933051, + "activation": 0.8171746839776838, + "semantic_similarity": 0.0, + "recency": 3.162529429193858e-33, + "frequency": 2.0 + }, + { + "id": "946ad9f3-41d8-41dd-889c-e2837acb55c6", + "text": "Caroline received assistance from an adoption advice/assistance group that she attended.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T15:31:00+00:00", + "weight": 0.39396363902742204, + "activation": 0.8132121300914069, + "semantic_similarity": 0.0, + "recency": 1.9687044345869747e-35, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The correct answer states the meeting was on the Friday before 15\u202fJuly\u202f2023. The Friday preceding 15\u202fJuly\u202f2023 is 14\u202fJuly\u202f2023, which is exactly what the predicted answer provides." + }, + { + "question": "Would Caroline pursue writing as a career option?", + "correct_answer": "LIkely no; though she likes reading, she wants to be a counselor", + "predicted_answer": "I don't know", + "reasoning": "The context states Caroline plans to explore career options and is specifically interested in counseling or mental health, and has been researching those paths. There is no mention of writing as a career option, so I cannot determine if she would pursue writing.", + "category": 3, + "retrieved_memories": [ + { + "id": "c56cff23-c869-4b69-ab1e-ca6e768c2b9b", + "text": "Caroline plans to continue her education and explore career options, expressing excitement about these next steps.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.3815960128066551, + "activation": 0.7719867093555172, + "semantic_similarity": 0.0, + "recency": 4.4092500067596425e-40, + "frequency": 2.0 + }, + { + "id": "bc68a8e2-73de-4a2b-a296-b889e6e0bede", + "text": "Caroline is interested in pursuing a career in counseling or mental health so she can support people with similar issues.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.379407303823347, + "activation": 0.7646910127444899, + "semantic_similarity": 0.0, + "recency": 4.409250006581064e-40, + "frequency": 2.0 + }, + { + "id": "27373bd4-58ac-4e3f-814c-45ca3fb29f4a", + "text": "Caroline has been researching counseling and mental health as a career to help people who have experienced similar challenges to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.366556347403309, + "activation": 0.7218544913443633, + "semantic_similarity": 0.0, + "recency": 6.454096064414177e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not convey the correct answer that Caroline is likely not pursuing writing as a career because she wants to be a counselor. It fails to match the content of the correct answer." + }, + { + "question": "Would Melanie be considered a member of the LGBTQ community?", + "correct_answer": "Likely no, she does not refer to herself as part of it", + "predicted_answer": "I don't know", + "reasoning": "Item 1 only states that Melanie expressed pride and support for Caroline\u2019s LGBTQ awareness efforts, which does not indicate Melanie\u2019s own identity or membership. Items 0 and 2 are about Caroline and provide no information about Melanie\u2019s community status. Therefore, the context does not establish whether Melanie is a member of the LGBTQ community.", + "category": 3, + "retrieved_memories": [ + { + "id": "2ad708a1-5d1d-4eb7-bba5-c4fcd0edea17", + "text": "The activist group Caroline joined is called 'Connected LGBTQ Activists'.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-20T20:56:00+00:00", + "weight": 0.3633607991552833, + "activation": 0.7112026638509443, + "semantic_similarity": 0.0, + "recency": 6.720176542103995e-37, + "frequency": 2.0 + }, + { + "id": "e3fed70e-c0c8-4ab0-8bd6-3c142d3c1c64", + "text": "Melanie expressed pride and support for Caroline's effort to spread LGBTQ awareness at the school event.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.36063754590265595, + "activation": 0.7021251530088533, + "semantic_similarity": 0.0, + "recency": 1.1090052109983196e-38, + "frequency": 2.0 + }, + { + "id": "7ad904ba-8899-4d20-84f6-0f2f5a536b10", + "text": "Caroline joined a new LGBTQ activist group on Tuesday, July 18, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-18T20:56:00+00:00", + "weight": 0.35733507871627807, + "activation": 0.6911169290542603, + "semantic_similarity": 0.0, + "recency": 5.5020152006307116e-37, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer \"I don't know\" does not convey the same information as the correct answer, which states that Melanie is likely not a member of the LGBTQ community because she does not refer to herself as part of it. The responses are not equivalent." + }, + { + "question": "When did Caroline join a mentorship program?", + "correct_answer": "The weekend before 17 July 2023", + "predicted_answer": "During the weekend of July 15\u201316, 2023.", + "reasoning": "Context item 0 explicitly states that Caroline joined a mentorship program during the weekend of July 15\u201316, 2023. Items 1 and 2 discuss subsequent activities and are not about the join date.", + "category": 2, + "retrieved_memories": [ + { + "id": "ece6819a-2b2e-4d1a-bd4a-5298d43605c1", + "text": "Caroline joined a mentorship program for LGBTQ youth during the weekend of July 15\u201316, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-15T00:00:00+00:00", + "weight": 0.39126593820655753, + "activation": 0.8042197940218586, + "semantic_similarity": 0.0, + "recency": 3.735540268915374e-37, + "frequency": 2.0 + }, + { + "id": "dacb9dd9-745d-43ea-91ba-8b339634222e", + "text": "Caroline met and supported several amazing young LGBTQ individuals through her mentorship program as of July 17, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-17T14:31:00+00:00", + "weight": 0.3873682308981359, + "activation": 0.7912274363271198, + "semantic_similarity": 0.0, + "recency": 4.847090216304846e-37, + "frequency": 2.0 + }, + { + "id": "82019d6f-9764-4b42-a3a3-bd25d8f3ea39", + "text": "Caroline contacted her mentor for adoption advice.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-10-13T10:31:00+00:00", + "weight": 0.3869963802697436, + "activation": 0.7899879342324787, + "semantic_similarity": 0.0, + "recency": 3.162527440479593e-33, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The weekend before 17\u202fJuly\u202f2023 falls on Saturday\u202f15\u202fJuly and Sunday\u202f16\u202fJuly\u202f2023. The predicted answer states the weekend of July\u202f15\u201316\u202f2023, which is exactly the same period." + }, + { + "question": "When is Caroline going to the transgender conference?", + "correct_answer": "July 2023", + "predicted_answer": "July 2023", + "reasoning": "I used context item 0, which explicitly states Caroline plans to attend a transgender conference in July 2023. While item 2 mentions an LGBTQ conference on 2023-07-10, it does not explicitly say it\u2019s the transgender conference, so I did not assume they are the same event.", + "category": 2, + "retrieved_memories": [ + { + "id": "86fa0797-8e72-4388-8cd1-826a0fb15c09", + "text": "Caroline plans to attend a transgender conference in July 2023 to meet community members and learn about advocacy.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-03T13:36:00+00:00", + "weight": 0.40348256389744774, + "activation": 0.8449418796581594, + "semantic_similarity": 0.0, + "recency": 1.1907209769496226e-37, + "frequency": 2.0 + }, + { + "id": "de9d34a8-55f3-45db-b73d-354f8ae9fae9", + "text": "Caroline intends to keep Melanie updated about her upcoming transgender conference.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-03T13:36:00+00:00", + "weight": 0.39779543280601504, + "activation": 0.82598477602005, + "semantic_similarity": 0.0, + "recency": 1.1907209768958641e-37, + "frequency": 2.0 + }, + { + "id": "650fe33d-7b81-4ff7-b3f0-1a54ba21e48b", + "text": "At the LGBTQ conference on 2023-07-10, Caroline met and connected with people who have experienced similar gender\u2011identity journeys.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-10T16:33:00+00:00", + "weight": 0.39380459189414974, + "activation": 0.8126819729804993, + "semantic_similarity": 0.0, + "recency": 2.427472647166277e-37, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer \"July 2023\" exactly matches the correct answer, so they are equivalent." + }, + { + "question": "When did Melanie sign up for a pottery class?", + "correct_answer": "2 July 2023", + "predicted_answer": "I don't know.", + "reasoning": "Item 0 states Melanie signed up for a pottery class but provides no date. Item 1 includes a date (2023-08-24) for making a pottery plate, not for signing up. Item 2 notes another project finished without dates. Therefore, the sign-up date is not given in the context.", + "category": 2, + "retrieved_memories": [ + { + "id": "41d4b4de-a9ef-45e4-9515-f54c747f36c4", + "text": "Melanie signed up for a pottery class as a form of therapy and creative self\u2011expression.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-02T13:36:00+00:00", + "weight": 0.40377046190324195, + "activation": 0.8459015396774733, + "semantic_similarity": 0.0, + "recency": 1.077409422506865e-37, + "frequency": 2.0 + }, + { + "id": "0f5465f1-3ab7-4bf0-99bd-6be3fb69702e", + "text": "Melanie made a pottery plate in a pottery class on 2023-08-24 and expressed that she loves pottery because it is relaxing and creative.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-24T13:33:00+00:00", + "weight": 0.4012813643002917, + "activation": 0.8376045476676393, + "semantic_similarity": 0.0, + "recency": 2.1579980375388765e-35, + "frequency": 2.0 + }, + { + "id": "789ced0e-c74d-4aa0-85a5-dacb967c3417", + "text": "Melanie finished another pottery project.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.3851301810222972, + "activation": 0.783767270074324, + "semantic_similarity": 0.0, + "recency": 1.072895976910963e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know.' does not provide the date '2 July 2023' and therefore is not equivalent to the correct answer." + }, + { + "question": "What activities has Melanie done with her family?", + "correct_answer": "Pottery, painting, camping, museum, swimming, hiking", + "predicted_answer": "She has played games, eaten good food, and hung out together with her family.", + "reasoning": "I used context 0 because it explicitly lists the activities: played games, ate good food, and hung out together. Contexts 1 and 2 describe her beliefs and feelings about family time, not specific activities.", + "category": 1, + "retrieved_memories": [ + { + "id": "f5b06217-19e9-4833-a8be-f0ef73e80b38", + "text": "Melanie described a recent family gathering where they played games, ate good food, and hung out together.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.3856436708185873, + "activation": 0.7854789027286244, + "semantic_similarity": 0.0, + "recency": 1.1090047287955196e-38, + "frequency": 2.0 + }, + { + "id": "5407ad19-b809-4f32-a01d-02ecf2fcd851", + "text": "Melanie believes that family time matters to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.38520373492218685, + "activation": 0.7840124497406229, + "semantic_similarity": 0.0, + "recency": 6.454083119676822e-38, + "frequency": 2.0 + }, + { + "id": "8feaaee2-6e0b-4a9d-8a50-bf91dea39016", + "text": "Melanie expressed that she cherishes time with her family and feels alive and happy during those moments.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.3757344603538513, + "activation": 0.7524482011795044, + "semantic_similarity": 0.0, + "recency": 1.1090047286838449e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer mentions playing games, eating good food, and hanging out, which do not match the specific activities listed in the correct answer (pottery, painting, camping, museum, swimming, hiking). Therefore they are not equivalent." + }, + { + "question": "What did Caroline research?", + "correct_answer": "Adoption agencies", + "predicted_answer": "Counseling and mental health as a career.", + "reasoning": "I used context item 1, which explicitly states she has been researching counseling and mental health as a career. Item 0 mentions future research without specifics, and item 2 is about her sources of motivation, not the research topic.", + "category": 1, + "retrieved_memories": [ + { + "id": "b6873819-a2ba-4dfb-9b79-9a63a1251ce5", + "text": "Caroline said she is going to do some research after the conversation.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.3957800039321191, + "activation": 0.8192666797737304, + "semantic_similarity": 0.0, + "recency": 4.409244620307824e-40, + "frequency": 2.0 + }, + { + "id": "27373bd4-58ac-4e3f-814c-45ca3fb29f4a", + "text": "Caroline has been researching counseling and mental health as a career to help people who have experienced similar challenges to her.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-27T10:37:00+00:00", + "weight": 0.3667885909550546, + "activation": 0.7226286365168487, + "semantic_similarity": 0.0, + "recency": 6.454088180187958e-38, + "frequency": 2.0 + }, + { + "id": "0aa11340-9afa-4c43-9782-98757ac9efe6", + "text": "Caroline identified her friends, family, and mentors as her sources of motivation.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.36370347819945126, + "activation": 0.7123449273315041, + "semantic_similarity": 0.0, + "recency": 1.1090055982722506e-38, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'Counseling and mental health as a career' does not match the correct answer 'Adoption agencies'; they refer to different topics." + }, + { + "question": "What does Melanie do to destress?", + "correct_answer": "Running, pottery", + "predicted_answer": "She goes running (she\u2019s been running longer to destress).", + "reasoning": "I used context item 0, which explicitly says Melanie has been running longer to destress and clear her mind. Items 1 and 2 discuss her belief in self-care and being busy but don\u2019t specify how she destresses.", + "category": 1, + "retrieved_memories": [ + { + "id": "105d4582-ffce-4d2c-84ce-f5b7e625dd5b", + "text": "On 2023-07-12, Melanie has been running longer since her last conversation with Caroline, using it to destress and clear her mind.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-12T16:33:00+00:00", + "weight": 0.3726252794265747, + "activation": 0.742084264755249, + "semantic_similarity": 0.0, + "recency": 2.964921454652688e-37, + "frequency": 2.0 + }, + { + "id": "dab4a6e7-e86d-4dda-b4e2-ea89d7bfd1ad", + "text": "Melanie believes that taking care of oneself is vital.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.36710296869277953, + "activation": 0.7236765623092651, + "semantic_similarity": 0.0, + "recency": 4.409243101134483e-40, + "frequency": 2.0 + }, + { + "id": "eb82f8f8-0025-4bb8-b46e-aa11a89e3ae6", + "text": "Melanie is currently swamped with caring for her children and her work, indicating she feels very busy.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-05-08T13:56:00+00:00", + "weight": 0.36647307872772217, + "activation": 0.7215769290924072, + "semantic_similarity": 0.0, + "recency": 4.409243101047701e-40, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer only mentions running as a way Melanie destresses, but the correct answer includes both running and pottery. Since pottery is omitted, the answers are not equivalent." + }, + { + "question": "How long has Caroline had her current group of friends for?", + "correct_answer": "4 years", + "predicted_answer": "Four years.", + "reasoning": "Item 0 directly states she has known her current group of friends for four years. Item 2 corroborates this by noting she moved about four years ago on 2019-06-09. Item 1 (a recent meetup photo) doesn\u2019t inform the duration.", + "category": 2, + "retrieved_memories": [ + { + "id": "eb08c29e-5e83-4c46-8660-25f9259d29c5", + "text": "Caroline has known her current group of friends for four years, since moving from her home country around 2019-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-09T19:55:00+00:00", + "weight": 0.4019898326390886, + "activation": 0.8399661087969621, + "semantic_similarity": 0.0, + "recency": 1.1090054992858055e-38, + "frequency": 2.0 + }, + { + "id": "853bf965-242e-4741-b9e2-471bf8f7a596", + "text": "The shared photo depicted Caroline and Melanie (and possibly other friends) meeting up last week.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-02T19:55:00+00:00", + "weight": 0.3656116733319568, + "activation": 0.7187055777731894, + "semantic_similarity": 0.0, + "recency": 5.507158327468794e-39, + "frequency": 2.0 + }, + { + "id": "3b03a48d-ac8f-400f-a851-85b09f6eac34", + "text": "Caroline moved from her home country approximately four years ago on 2019-06-09.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2019-06-09T19:55:00+00:00", + "weight": 0.3622080035333639, + "activation": 0.7073600117778798, + "semantic_similarity": 0.0, + "recency": 3.931062001105034e-102, + "frequency": 2.0 + } + ], + "is_correct": true, + "correctness_reasoning": "The predicted answer 'Four years.' conveys the same duration as the correct answer '4 years', just using words instead of numerals, so they are equivalent." + }, + { + "question": "Would Melanie be more interested in going to a national park or a theme park?", + "correct_answer": "National park; she likes the outdoors", + "predicted_answer": "I don't know", + "reasoning": "Item 1 only says Melanie enjoyed time at \u201ca park,\u201d which doesn\u2019t indicate whether she prefers national parks or theme parks. Item 0 just notes she\u2019s thinking about activities, and Item 2 is about Caroline\u2019s excitement for an event. None of these specify a preference between a national park and a theme park, so the context is insufficient to determine this.", + "category": 3, + "retrieved_memories": [ + { + "id": "ea2fceb6-cf7c-44fc-befb-847d2bc3b58e", + "text": "Melanie said she would start thinking about possible activities for their upcoming trip.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.3704987752140302, + "activation": 0.7349959173801007, + "semantic_similarity": 0.0, + "recency": 1.0728959825175965e-35, + "frequency": 2.0 + }, + { + "id": "1ae3209b-37d4-4268-91fd-48724b3deac3", + "text": "Melanie also spent time at a park on the weekend of 2023-09-09 and enjoyed the experience, as noted by Caroline.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-09-09T00:00:00+00:00", + "weight": 0.3621915157976303, + "activation": 0.7073050526587678, + "semantic_similarity": 0.0, + "recency": 1.010189095040255e-34, + "frequency": 2.0 + }, + { + "id": "fb8d3c5e-2729-4ee6-8daa-3e21efd7c3b6", + "text": "Caroline told Melanie that she is stoked about an upcoming event", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-25T13:33:00+00:00", + "weight": 0.3564897414153972, + "activation": 0.688299138051324, + "semantic_similarity": 0.0, + "recency": 2.3849566841335316e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don't know' does not provide the correct answer 'National park; she likes the outdoors' and thus is not equivalent." + }, + { + "question": "What events has Caroline participated in to help children?", + "correct_answer": "Mentoring program, school speech", + "predicted_answer": "She volunteered at an LGBTQ+ youth center (2023-08-28) and attended an adoption advice/assistance group.", + "reasoning": "I used item 0 because volunteering at an LGBTQ+ youth center and speaking with young people directly indicates helping children/youth. I included item 2 because attending an adoption advice/assistance group is related to supporting children through adoption. I did not use item 1 since the advocacy event isn\u2019t specified as being focused on children.", + "category": 1, + "retrieved_memories": [ + { + "id": "b83914aa-4564-42d6-9983-380de1c26236", + "text": "Caroline volunteered at an LGBTQ+ youth center on 2023-08-28, speaking with young people, finding the experience gratifying, and emphasizing the importance of kindness and support.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-28T15:19:00+00:00", + "weight": 0.37532529378081114, + "activation": 0.7510843126027038, + "semantic_similarity": 0.0, + "recency": 3.2431427274955706e-35, + "frequency": 2.0 + }, + { + "id": "93140621-4e07-4d23-873b-115fe08e100a", + "text": "Caroline attended an advocacy event that involved love and support, which she described as a cool experience.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-14T14:24:00+00:00", + "weight": 0.37514392733574076, + "activation": 0.7504797577858024, + "semantic_similarity": 0.0, + "recency": 7.967003787412433e-36, + "frequency": 2.0 + }, + { + "id": "946ad9f3-41d8-41dd-889c-e2837acb55c6", + "text": "Caroline received assistance from an adoption advice/assistance group that she attended.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T15:31:00+00:00", + "weight": 0.3743879691860735, + "activation": 0.7479598972869116, + "semantic_similarity": 0.0, + "recency": 1.9687054022373425e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer mentions volunteering at an LGBTQ+ youth center and attending an adoption advice/assistance group, which do not match the correct answer of a mentoring program and a school speech. Therefore they are not equivalent." + }, + { + "question": "When is Melanie planning on going camping?", + "correct_answer": "June 2023", + "predicted_answer": "I don\u2019t know.", + "reasoning": "Item 0 and item 1 describe past camping trips (July 8\u20139, 2023 and 2023-08-23). Item 2 mentions an upcoming trip but gives no date. Therefore, the context does not specify when the planned camping trip will occur.", + "category": 2, + "retrieved_memories": [ + { + "id": "59bc760e-185f-46fc-baf0-d9d894871c09", + "text": "Melanie went camping with her family during the weekend of July 8\u20139, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-08T00:00:00+00:00", + "weight": 0.39126233354357876, + "activation": 0.804207778478596, + "semantic_similarity": 0.0, + "recency": 1.8550181308077751e-37, + "frequency": 2.0 + }, + { + "id": "f279b6c9-c6bf-41b2-a0f5-910e095b9920", + "text": "Melanie went camping with her kids on 2023-08-23, explored the forest, hiked, and had a blast.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-23T00:00:00+00:00", + "weight": 0.3831775535907677, + "activation": 0.7772585119692258, + "semantic_similarity": 0.0, + "recency": 1.8454520920984068e-35, + "frequency": 2.0 + }, + { + "id": "ea2fceb6-cf7c-44fc-befb-847d2bc3b58e", + "text": "Melanie said she would start thinking about possible activities for their upcoming trip.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-17T13:50:00+00:00", + "weight": 0.37952014383793775, + "activation": 0.7650671461264592, + "semantic_similarity": 0.0, + "recency": 1.0728977575621291e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer 'I don\u2019t know.' does not provide the required information 'June 2023' and therefore is not equivalent to the correct answer." + }, + { + "question": "What LGBTQ+ events has Caroline participated in?", + "correct_answer": "Pride parade, school speech, support group", + "predicted_answer": "She attended an LGBTQ+ counseling workshop on Friday, June 23, 2023, and she announced a great night featuring LGBTQ artists and their talents.", + "reasoning": "I used item 0 because it explicitly states she attended an LGBTQ+ counseling workshop (an event). I included item 1 because it mentions she announced a great night featuring LGBTQ artists\u2014an event she was involved in by announcing it. I did not use item 2 because it describes her general advocacy through art, not a specific event.", + "category": 1, + "retrieved_memories": [ + { + "id": "78e6378d-91b1-4c1e-8599-be9a9ff13d06", + "text": "Caroline attended an LGBTQ+ counseling workshop on Friday, June 23, 2023.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-23T10:37:00+00:00", + "weight": 0.3886385035109075, + "activation": 0.7954616783696917, + "semantic_similarity": 0.0, + "recency": 4.326311740913417e-38, + "frequency": 2.0 + }, + { + "id": "75be79b3-4928-41c3-abfc-ec5f23c0c268", + "text": "Caroline announced that there will be a great night featuring LGBTQ artists and their talents", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-25T13:33:00+00:00", + "weight": 0.3876648258466968, + "activation": 0.792216086155656, + "semantic_similarity": 0.0, + "recency": 2.3849599464418158e-35, + "frequency": 2.0 + }, + { + "id": "cb96376b-7a1e-479e-a6a1-c09864dd44b0", + "text": "Caroline uses her art to speak up for the LGBTQ+ community and promote acceptance.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-14T14:24:00+00:00", + "weight": 0.38520636277255693, + "activation": 0.7840212092418564, + "semantic_similarity": 0.0, + "recency": 7.967008600341632e-36, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The predicted answer mentions an LGBTQ+ counseling workshop and a night featuring LGBTQ artists, which do not match the listed events of a Pride parade, school speech, and support group. Therefore the content is not equivalent." + }, + { + "question": "When did Caroline have a picnic?", + "correct_answer": "The week before 6 July 2023", + "predicted_answer": "Last week.", + "reasoning": "I used context item 0, which explicitly states that Caroline and her friends/family had a picnic last week. Item 1 only mentions a photo and comments without timing, and item 2 is about a beach visit on 2023-08-18, unrelated to the picnic\u2019s timing.", + "category": 2, + "retrieved_memories": [ + { + "id": "13d1d7ea-20e4-411b-99f3-123bf55e99d2", + "text": "Caroline and her friends/family had a picnic last week.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-06-29T20:18:00+00:00", + "weight": 0.40624428652261024, + "activation": 0.8541476217420342, + "semantic_similarity": 0.0, + "recency": 8.207612536429902e-38, + "frequency": 2.0 + }, + { + "id": "ac867b49-d96e-4aff-a478-15866a3f2353", + "text": "Melanie commented on and viewed a photo that Caroline shared of the picnic.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-07-06T20:18:00+00:00", + "weight": 0.384485782220536, + "activation": 0.7816192740684534, + "semantic_similarity": 0.0, + "recency": 1.6528101966511319e-37, + "frequency": 2.0 + }, + { + "id": "a4b30f95-7c26-4219-9504-c4a50275f069", + "text": "Caroline visited a beach on 2023-08-18, watched the sun dip below the horizon, and felt the experience was amazing and calming, which later inspired her sunset painting.", + "context": "Conversation session between Caroline and Melanie", + "event_date": "2023-08-18T13:33:00+00:00", + "weight": 0.3575930061219039, + "activation": 0.6919766870730131, + "semantic_similarity": 0.0, + "recency": 1.1843354346627286e-35, + "frequency": 2.0 + } + ], + "is_correct": false, + "correctness_reasoning": "The correct answer specifies a concrete time frame: the week preceding 6\u202fJuly\u202f2023. The predicted answer \"Last week\" is a relative, ambiguous reference that depends on the current date and does not necessarily correspond to that specific week. Therefore the answers are not equivalent." } ] }, diff --git a/benchmarks/locomo/run_benchmark.py b/benchmarks/locomo/run_benchmark.py index f883b971..d7bc51cf 100644 --- a/benchmarks/locomo/run_benchmark.py +++ b/benchmarks/locomo/run_benchmark.py @@ -154,7 +154,7 @@ async def answer_question(memory: TemporalSemanticMemory, agent_id: str, questio try: client = AsyncOpenAI() response = await client.beta.chat.completions.parse( - model="gpt-4o-mini", + model="gpt-5", messages=[ { "role": "system", @@ -165,8 +165,7 @@ async def answer_question(memory: TemporalSemanticMemory, agent_id: str, questio "content": f"Context:\n{context}\n\nQuestion: {question}\n\nAnswer:" } ], - temperature=0, - max_tokens=8000, + response_format=QuestionAnswer ) answer = response.choices[0].message.parsed diff --git a/memory/entity_resolver.py b/memory/entity_resolver.py index 1107318c..8ca75384 100644 --- a/memory/entity_resolver.py +++ b/memory/entity_resolver.py @@ -5,8 +5,10 @@ Uses spaCy for entity extraction and implements resolution logic to disambiguate entities across memory units. """ import spacy +import asyncpg from typing import List, Dict, Optional, Set from difflib import SequenceMatcher +from datetime import datetime, timezone # Load spaCy model (singleton) @@ -90,21 +92,22 @@ class EntityResolver: Resolves entities to canonical IDs with disambiguation. """ - def __init__(self, db_conn): + def __init__(self, pool: asyncpg.Pool): """ Initialize entity resolver. Args: - db_conn: psycopg2 database connection + pool: asyncpg connection pool """ - self.conn = db_conn + self.pool = pool - def resolve_entities_batch( + async def resolve_entities_batch( self, agent_id: str, entities_data: List[Dict], context: str, unit_event_date, + conn=None, ) -> List[str]: """ Resolve multiple entities in batch (MUCH faster than sequential). @@ -117,6 +120,7 @@ class EntityResolver: entities_data: List of dicts with 'text', 'type', 'nearby_entities' context: Context where entities appear unit_event_date: When this unit was created + conn: Optional connection to use (if None, acquires from pool) Returns: List of entity IDs in same order as input @@ -124,137 +128,138 @@ class EntityResolver: if not entities_data: return [] - cursor = self.conn.cursor() + if conn is None: + async with self.pool.acquire() as conn: + return await self._resolve_entities_batch_impl(conn, agent_id, entities_data, context, unit_event_date) + else: + return await self._resolve_entities_batch_impl(conn, agent_id, entities_data, context, unit_event_date) - try: - import time - start = time.time() + async def _resolve_entities_batch_impl(self, conn, agent_id: str, entities_data: List[Dict], context: str, unit_event_date) -> List[str]: + import time + start = time.time() - # Group entities by type for efficient querying - entities_by_type = {} - for idx, entity_data in enumerate(entities_data): - entity_type = entity_data['type'] - if entity_type not in entities_by_type: - entities_by_type[entity_type] = [] - entities_by_type[entity_type].append((idx, entity_data)) + # Group entities by type for efficient querying + entities_by_type = {} + for idx, entity_data in enumerate(entities_data): + entity_type = entity_data['type'] + if entity_type not in entities_by_type: + entities_by_type[entity_type] = [] + entities_by_type[entity_type].append((idx, entity_data)) - # Query ALL candidates for each type in batch - all_candidates = {} # Maps (entity_type, entity_text) -> list of candidates - for entity_type, entities_list in entities_by_type.items(): - # Extract unique entity texts for this type - entity_texts = list(set(e[1]['text'] for e in entities_list)) + # Query ALL candidates for each type in batch + all_candidates = {} # Maps (entity_type, entity_text) -> list of candidates + for entity_type, entities_list in entities_by_type.items(): + # Extract unique entity texts for this type + entity_texts = list(set(e[1]['text'] for e in entities_list)) - # Query candidates for all texts at once - from psycopg2.extras import execute_values - cursor.execute( - """ - SELECT canonical_name, id, metadata, last_seen, mention_count - FROM entities - WHERE agent_id = %s AND entity_type = %s - """, - (agent_id, entity_type) + # Query candidates for all texts at once + type_candidates = await conn.fetch( + """ + SELECT canonical_name, id, metadata, last_seen, mention_count + FROM entities + WHERE agent_id = $1 AND entity_type = $2 + """, + agent_id, entity_type + ) + + # Filter candidates in memory (faster than complex SQL for small datasets) + for entity_text in entity_texts: + matching = [] + entity_text_lower = entity_text.lower() + for row in type_candidates: + canonical_name = row['canonical_name'] + ent_id = row['id'] + metadata = row['metadata'] + last_seen = row['last_seen'] + mention_count = row['mention_count'] + canonical_lower = canonical_name.lower() + # Same matching logic as before + if (entity_text_lower == canonical_lower or + entity_text_lower in canonical_lower or + canonical_lower in entity_text_lower): + matching.append((ent_id, canonical_name, metadata, last_seen, mention_count)) + all_candidates[(entity_type, entity_text)] = matching + + # Resolve each entity using pre-fetched candidates + entity_ids = [None] * len(entities_data) + entities_to_update = [] # (entity_id, unit_event_date) + entities_to_create = [] # (idx, entity_data) + + for idx, entity_data in enumerate(entities_data): + entity_text = entity_data['text'] + entity_type = entity_data['type'] + nearby_entities = entity_data.get('nearby_entities', []) + + candidates = all_candidates.get((entity_type, entity_text), []) + + if not candidates: + # Will create new entity + entities_to_create.append((idx, entity_data)) + continue + + # Score candidates (same logic as before but with pre-fetched data) + best_candidate = None + best_score = 0.0 + best_name_similarity = 0.0 + + nearby_entity_set = {e['text'].lower() for e in nearby_entities if e['text'] != entity_text} + + for candidate_id, canonical_name, metadata, last_seen, mention_count in candidates: + score = 0.0 + + # Name similarity + name_similarity = SequenceMatcher( + None, + entity_text.lower(), + canonical_name.lower() + ).ratio() + score += name_similarity * 0.5 + + # Temporal proximity + if last_seen: + days_diff = abs((unit_event_date - last_seen).total_seconds() / 86400) + if days_diff < 7: + temporal_score = max(0, 1.0 - (days_diff / 7)) + score += temporal_score * 0.2 + + if score > best_score: + best_score = score + best_candidate = candidate_id + best_name_similarity = name_similarity + + # Apply threshold + threshold = 0.4 if entity_type == 'PERSON' and best_name_similarity >= 0.95 else 0.6 + + if best_score > threshold: + entity_ids[idx] = best_candidate + entities_to_update.append((best_candidate, unit_event_date)) + else: + entities_to_create.append((idx, entity_data)) + + # Batch update existing entities + if entities_to_update: + await conn.executemany( + """ + UPDATE entities SET + mention_count = mention_count + 1, + last_seen = $2 + WHERE id = $1::uuid + """, + entities_to_update + ) + + # Batch create new entities + if entities_to_create: + for idx, entity_data in entities_to_create: + entity_id = await self._create_entity( + conn, agent_id, entity_data['text'], + entity_data['type'], unit_event_date ) - type_candidates = cursor.fetchall() + entity_ids[idx] = entity_id - # Filter candidates in memory (faster than complex SQL for small datasets) - for entity_text in entity_texts: - matching = [] - entity_text_lower = entity_text.lower() - for canonical_name, ent_id, metadata, last_seen, mention_count in type_candidates: - canonical_lower = canonical_name.lower() - # Same matching logic as before - if (entity_text_lower == canonical_lower or - entity_text_lower in canonical_lower or - canonical_lower in entity_text_lower): - matching.append((ent_id, canonical_name, metadata, last_seen, mention_count)) - all_candidates[(entity_type, entity_text)] = matching + return entity_ids - # Resolve each entity using pre-fetched candidates - entity_ids = [None] * len(entities_data) - entities_to_update = [] # (entity_id, unit_event_date) - entities_to_create = [] # (idx, entity_data) - - for idx, entity_data in enumerate(entities_data): - entity_text = entity_data['text'] - entity_type = entity_data['type'] - nearby_entities = entity_data.get('nearby_entities', []) - - candidates = all_candidates.get((entity_type, entity_text), []) - - if not candidates: - # Will create new entity - entities_to_create.append((idx, entity_data)) - continue - - # Score candidates (same logic as before but with pre-fetched data) - best_candidate = None - best_score = 0.0 - best_name_similarity = 0.0 - - nearby_entity_set = {e['text'].lower() for e in nearby_entities if e['text'] != entity_text} - - for candidate_id, canonical_name, metadata, last_seen, mention_count in candidates: - score = 0.0 - - # Name similarity - name_similarity = SequenceMatcher( - None, - entity_text.lower(), - canonical_name.lower() - ).ratio() - score += name_similarity * 0.5 - - # Temporal proximity - if last_seen: - days_diff = abs((unit_event_date - last_seen).total_seconds() / 86400) - if days_diff < 7: - temporal_score = max(0, 1.0 - (days_diff / 7)) - score += temporal_score * 0.2 - - if score > best_score: - best_score = score - best_candidate = candidate_id - best_name_similarity = name_similarity - - # Apply threshold - threshold = 0.4 if entity_type == 'PERSON' and best_name_similarity >= 0.95 else 0.6 - - if best_score > threshold: - entity_ids[idx] = best_candidate - entities_to_update.append((best_candidate, unit_event_date)) - else: - entities_to_create.append((idx, entity_data)) - - # Batch update existing entities - if entities_to_update: - from psycopg2.extras import execute_values - execute_values( - cursor, - """ - UPDATE entities SET - mention_count = mention_count + 1, - last_seen = data.last_seen - FROM (VALUES %s) AS data(id, last_seen) - WHERE entities.id = data.id::uuid - """, - entities_to_update - ) - - # Batch create new entities - if entities_to_create: - for idx, entity_data in entities_to_create: - entity_id = self._create_entity( - cursor, agent_id, entity_data['text'], - entity_data['type'], unit_event_date - ) - entity_ids[idx] = entity_id - - return entity_ids - - finally: - cursor.close() - - def resolve_entity( + async def resolve_entity( self, agent_id: str, entity_text: str, @@ -277,32 +282,28 @@ class EntityResolver: Returns: Entity ID (creates new entity if needed) """ - cursor = self.conn.cursor() - - try: + async with self.pool.acquire() as conn: # Find candidate entities with same type and similar name - cursor.execute( + candidates = await conn.fetch( """ SELECT id, canonical_name, metadata, last_seen FROM entities - WHERE agent_id = %s - AND entity_type = %s + WHERE agent_id = $1 + AND entity_type = $2 AND ( - canonical_name ILIKE %s - OR canonical_name ILIKE %s - OR %s ILIKE canonical_name || '%%' + canonical_name ILIKE $3 + OR canonical_name ILIKE $4 + OR $3 ILIKE canonical_name || '%%' ) ORDER BY mention_count DESC """, - (agent_id, entity_type, entity_text, f"%{entity_text}%", entity_text) + agent_id, entity_type, entity_text, f"%{entity_text}%" ) - candidates = cursor.fetchall() - if not candidates: # New entity - create it - return self._create_entity( - cursor, agent_id, entity_text, entity_type, unit_event_date + return await self._create_entity( + conn, agent_id, entity_text, entity_type, unit_event_date ) # Score candidates based on: @@ -317,7 +318,11 @@ class EntityResolver: nearby_entity_set = {e['text'].lower() for e in nearby_entities if e['text'] != entity_text} - for candidate_id, canonical_name, metadata, last_seen in candidates: + for row in candidates: + candidate_id = row['id'] + canonical_name = row['canonical_name'] + metadata = row['metadata'] + last_seen = row['last_seen'] score = 0.0 # 1. Name similarity (0-1) @@ -331,21 +336,21 @@ class EntityResolver: # 2. Co-occurring entities (0-0.5) # Get entities that co-occurred with this candidate before # Use the materialized co-occurrence cache for fast lookup - cursor.execute( + co_entity_rows = await conn.fetch( """ SELECT e.canonical_name, ec.cooccurrence_count FROM entity_cooccurrences ec JOIN entities e ON ( CASE - WHEN ec.entity_id_1 = %s THEN ec.entity_id_2 - WHEN ec.entity_id_2 = %s THEN ec.entity_id_1 + WHEN ec.entity_id_1 = $1 THEN ec.entity_id_2 + WHEN ec.entity_id_2 = $1 THEN ec.entity_id_1 END = e.id ) - WHERE ec.entity_id_1 = %s OR ec.entity_id_2 = %s + WHERE ec.entity_id_1 = $1 OR ec.entity_id_2 = $1 """, - (candidate_id, candidate_id, candidate_id, candidate_id) + candidate_id ) - co_entities = {row[0].lower() for row in cursor.fetchall()} + co_entities = {r['canonical_name'].lower() for r in co_entity_rows} # Check overlap with nearby entities overlap = len(nearby_entity_set & co_entities) @@ -371,28 +376,25 @@ class EntityResolver: if best_score > threshold: # Update entity - cursor.execute( + await conn.execute( """ UPDATE entities SET mention_count = mention_count + 1, - last_seen = %s - WHERE id = %s + last_seen = $1 + WHERE id = $2 """, - (unit_event_date, best_candidate) + unit_event_date, best_candidate ) return best_candidate else: # Not confident - create new entity - return self._create_entity( - cursor, agent_id, entity_text, entity_type, unit_event_date + return await self._create_entity( + conn, agent_id, entity_text, entity_type, unit_event_date ) - finally: - cursor.close() - - def _create_entity( + async def _create_entity( self, - cursor, + conn, agent_id: str, entity_text: str, entity_type: str, @@ -402,7 +404,7 @@ class EntityResolver: Create a new entity. Args: - cursor: Database cursor + conn: Database connection agent_id: Agent ID entity_text: Entity text entity_type: Entity type @@ -411,18 +413,17 @@ class EntityResolver: Returns: Entity ID """ - cursor.execute( + entity_id = await conn.fetchval( """ INSERT INTO entities (agent_id, canonical_name, entity_type, first_seen, last_seen, mention_count) - VALUES (%s, %s, %s, %s, %s, 1) + VALUES ($1, $2, $3, $4, $5, 1) RETURNING id """, - (agent_id, entity_text, entity_type, event_date, event_date) + agent_id, entity_text, entity_type, event_date, event_date ) - entity_id = cursor.fetchone()[0] return entity_id - def link_unit_to_entity(self, unit_id: str, entity_id: str): + async def link_unit_to_entity(self, unit_id: str, entity_id: str): """ Link a memory unit to an entity. Also updates co-occurrence cache with other entities in the same unit. @@ -431,45 +432,41 @@ class EntityResolver: unit_id: Memory unit ID entity_id: Entity ID """ - cursor = self.conn.cursor() - try: + async with self.pool.acquire() as conn: # Insert unit-entity link - cursor.execute( + await conn.execute( """ INSERT INTO unit_entities (unit_id, entity_id) - VALUES (%s, %s) + VALUES ($1, $2) ON CONFLICT DO NOTHING """, - (unit_id, entity_id) + unit_id, entity_id ) # Update co-occurrence cache: find other entities in this unit - cursor.execute( + rows = await conn.fetch( """ SELECT entity_id FROM unit_entities - WHERE unit_id = %s AND entity_id != %s + WHERE unit_id = $1 AND entity_id != $2 """, - (unit_id, entity_id) + unit_id, entity_id ) - other_entities = [row[0] for row in cursor.fetchall()] + other_entities = [row['entity_id'] for row in rows] # Update co-occurrences for each pair for other_entity_id in other_entities: - self._update_cooccurrence(cursor, entity_id, other_entity_id) + await self._update_cooccurrence(conn, entity_id, other_entity_id) - finally: - cursor.close() - - def _update_cooccurrence(self, cursor, entity_id_1: str, entity_id_2: str): + async def _update_cooccurrence(self, conn, entity_id_1: str, entity_id_2: str): """ Update the co-occurrence cache for two entities. Uses CHECK constraint ordering (entity_id_1 < entity_id_2) to avoid duplicates. Args: - cursor: Database cursor + conn: Database connection entity_id_1: First entity ID entity_id_2: Second entity ID """ @@ -477,19 +474,19 @@ class EntityResolver: if entity_id_1 > entity_id_2: entity_id_1, entity_id_2 = entity_id_2, entity_id_1 - cursor.execute( + await conn.execute( """ INSERT INTO entity_cooccurrences (entity_id_1, entity_id_2, cooccurrence_count, last_cooccurred) - VALUES (%s, %s, 1, NOW()) + VALUES ($1, $2, 1, NOW()) ON CONFLICT (entity_id_1, entity_id_2) DO UPDATE SET cooccurrence_count = entity_cooccurrences.cooccurrence_count + 1, last_cooccurred = NOW() """, - (entity_id_1, entity_id_2) + entity_id_1, entity_id_2 ) - def link_units_to_entities_batch(self, unit_entity_pairs: List[tuple[str, str]]): + async def link_units_to_entities_batch(self, unit_entity_pairs: List[tuple[str, str]], conn=None): """ Link multiple memory units to entities in batch (MUCH faster than sequential). @@ -497,68 +494,67 @@ class EntityResolver: Args: unit_entity_pairs: List of (unit_id, entity_id) tuples + conn: Optional connection to use (if None, acquires from pool) """ if not unit_entity_pairs: return - cursor = self.conn.cursor() - try: - # Batch insert all unit-entity links - from psycopg2.extras import execute_values - execute_values( - cursor, + if conn is None: + async with self.pool.acquire() as conn: + return await self._link_units_to_entities_batch_impl(conn, unit_entity_pairs) + else: + return await self._link_units_to_entities_batch_impl(conn, unit_entity_pairs) + + async def _link_units_to_entities_batch_impl(self, conn, unit_entity_pairs: List[tuple[str, str]]): + # Batch insert all unit-entity links + await conn.executemany( + """ + INSERT INTO unit_entities (unit_id, entity_id) + VALUES ($1, $2) + ON CONFLICT DO NOTHING + """, + unit_entity_pairs + ) + + # Build map of unit -> entities for co-occurrence calculation + # Use sets to avoid duplicate entities in the same unit + unit_to_entities = {} + for unit_id, entity_id in unit_entity_pairs: + if unit_id not in unit_to_entities: + unit_to_entities[unit_id] = set() + unit_to_entities[unit_id].add(entity_id) + + # Update co-occurrences for all pairs in each unit + cooccurrence_pairs = set() # Use set to avoid duplicates + for unit_id, entity_ids in unit_to_entities.items(): + entity_list = list(entity_ids) # Convert set to list for iteration + # For each pair of entities in this unit, create co-occurrence + for i, entity_id_1 in enumerate(entity_list): + for entity_id_2 in entity_list[i+1:]: + # Skip if same entity (shouldn't happen with set, but be safe) + if entity_id_1 == entity_id_2: + continue + # Ensure consistent ordering (entity_id_1 < entity_id_2) + if entity_id_1 > entity_id_2: + entity_id_1, entity_id_2 = entity_id_2, entity_id_1 + cooccurrence_pairs.add((entity_id_1, entity_id_2)) + + # Batch update co-occurrences + if cooccurrence_pairs: + now = datetime.now(timezone.utc) + await conn.executemany( """ - INSERT INTO unit_entities (unit_id, entity_id) - VALUES %s - ON CONFLICT DO NOTHING + INSERT INTO entity_cooccurrences (entity_id_1, entity_id_2, cooccurrence_count, last_cooccurred) + VALUES ($1, $2, $3, $4) + ON CONFLICT (entity_id_1, entity_id_2) + DO UPDATE SET + cooccurrence_count = entity_cooccurrences.cooccurrence_count + 1, + last_cooccurred = EXCLUDED.last_cooccurred """, - unit_entity_pairs + [(e1, e2, 1, now) for e1, e2 in cooccurrence_pairs] ) - # Build map of unit -> entities for co-occurrence calculation - # Use sets to avoid duplicate entities in the same unit - unit_to_entities = {} - for unit_id, entity_id in unit_entity_pairs: - if unit_id not in unit_to_entities: - unit_to_entities[unit_id] = set() - unit_to_entities[unit_id].add(entity_id) - - # Update co-occurrences for all pairs in each unit - cooccurrence_pairs = set() # Use set to avoid duplicates - for unit_id, entity_ids in unit_to_entities.items(): - entity_list = list(entity_ids) # Convert set to list for iteration - # For each pair of entities in this unit, create co-occurrence - for i, entity_id_1 in enumerate(entity_list): - for entity_id_2 in entity_list[i+1:]: - # Skip if same entity (shouldn't happen with set, but be safe) - if entity_id_1 == entity_id_2: - continue - # Ensure consistent ordering (entity_id_1 < entity_id_2) - if entity_id_1 > entity_id_2: - entity_id_1, entity_id_2 = entity_id_2, entity_id_1 - cooccurrence_pairs.add((entity_id_1, entity_id_2)) - - # Batch update co-occurrences - if cooccurrence_pairs: - from datetime import datetime, timezone - now = datetime.now(timezone.utc) - execute_values( - cursor, - """ - INSERT INTO entity_cooccurrences (entity_id_1, entity_id_2, cooccurrence_count, last_cooccurred) - VALUES %s - ON CONFLICT (entity_id_1, entity_id_2) - DO UPDATE SET - cooccurrence_count = entity_cooccurrences.cooccurrence_count + 1, - last_cooccurred = EXCLUDED.last_cooccurred - """, - [(e1, e2, 1, now) for e1, e2 in cooccurrence_pairs] - ) - - finally: - cursor.close() - - def get_units_by_entity(self, entity_id: str, limit: int = 100) -> List[str]: + async def get_units_by_entity(self, entity_id: str, limit: int = 100) -> List[str]: """ Get all units that mention an entity. @@ -569,23 +565,20 @@ class EntityResolver: Returns: List of unit IDs """ - cursor = self.conn.cursor() - try: - cursor.execute( + async with self.pool.acquire() as conn: + rows = await conn.fetch( """ SELECT unit_id FROM unit_entities - WHERE entity_id = %s + WHERE entity_id = $1 ORDER BY unit_id - LIMIT %s + LIMIT $2 """, - (entity_id, limit) + entity_id, limit ) - return [row[0] for row in cursor.fetchall()] - finally: - cursor.close() + return [row['unit_id'] for row in rows] - def get_entity_by_text( + async def get_entity_by_text( self, agent_id: str, entity_text: str, @@ -602,33 +595,29 @@ class EntityResolver: Returns: Entity ID if found, None otherwise """ - cursor = self.conn.cursor() - try: + async with self.pool.acquire() as conn: if entity_type: - cursor.execute( + row = await conn.fetchrow( """ SELECT id FROM entities - WHERE agent_id = %s - AND entity_type = %s - AND canonical_name ILIKE %s + WHERE agent_id = $1 + AND entity_type = $2 + AND canonical_name ILIKE $3 ORDER BY mention_count DESC LIMIT 1 """, - (agent_id, entity_type, entity_text) + agent_id, entity_type, entity_text ) else: - cursor.execute( + row = await conn.fetchrow( """ SELECT id FROM entities - WHERE agent_id = %s - AND canonical_name ILIKE %s + WHERE agent_id = $1 + AND canonical_name ILIKE $2 ORDER BY mention_count DESC LIMIT 1 """, - (agent_id, entity_text) + agent_id, entity_text ) - row = cursor.fetchone() - return row[0] if row else None - finally: - cursor.close() + return row['id'] if row else None diff --git a/memory/temporal_semantic_memory.py b/memory/temporal_semantic_memory.py index 9e012a21..4aed62b5 100644 --- a/memory/temporal_semantic_memory.py +++ b/memory/temporal_semantic_memory.py @@ -11,9 +11,7 @@ This implements a sophisticated memory architecture that combines: import os from datetime import datetime, timedelta, timezone from typing import Any, Dict, List, Optional, Tuple -import psycopg2 -from psycopg2.extras import RealDictCursor, execute_values -from pgvector.psycopg2 import register_vector +import asyncpg from sentence_transformers import SentenceTransformer from dotenv import load_dotenv import asyncio @@ -92,7 +90,7 @@ class TemporalSemanticMemory: """ load_dotenv() - # Initialize PostgreSQL connection + # Initialize PostgreSQL connection URL self.db_url = db_url or os.getenv("DATABASE_URL") if not self.db_url: raise ValueError( @@ -100,21 +98,40 @@ class TemporalSemanticMemory: "Set DATABASE_URL environment variable." ) - self.conn = psycopg2.connect(self.db_url) - register_vector(self.conn) + # Connection pool (created lazily on first use) + self._pool = None + self._pool_lock = asyncio.Lock() - # Initialize entity resolver - self.entity_resolver = EntityResolver(self.conn) + # Initialize entity resolver (will be created with pool) + self.entity_resolver = None # Initialize local embedding model (384 dimensions) print(f"Loading embedding model: {embedding_model}...") self.embedding_model = SentenceTransformer(embedding_model) print(f"✓ Model loaded (embedding dim: {self.embedding_model.get_sentence_embedding_dimension()})") - def __del__(self): - """Clean up database connection.""" - if hasattr(self, 'conn') and self.conn: - self.conn.close() + async def _get_pool(self) -> asyncpg.Pool: + """Get or create the connection pool (lazy initialization).""" + if self._pool is None: + async with self._pool_lock: + if self._pool is None: + self._pool = await asyncpg.create_pool( + self.db_url, + min_size=2, + max_size=10, + command_timeout=60, + statement_cache_size=0 # Disable prepared statement cache + ) + # Initialize entity resolver with pool + if self.entity_resolver is None: + self.entity_resolver = EntityResolver(self._pool) + return self._pool + + async def close(self): + """Close the connection pool.""" + if self._pool is not None: + await self._pool.close() + self._pool = None def _generate_embedding(self, text: str) -> List[float]: """ @@ -161,9 +178,9 @@ class TemporalSemanticMemory: except Exception as e: raise Exception(f"Failed to generate batch embeddings: {str(e)}") - def _find_duplicate_facts_batch( + async def _find_duplicate_facts_batch( self, - cursor, + conn, agent_id: str, texts: List[str], embeddings: List[List[float]], @@ -178,7 +195,7 @@ class TemporalSemanticMemory: within the time window. Uses pgvector cosine similarity for efficiency. Args: - cursor: Database cursor + conn: Database connection agent_id: Agent identifier texts: List of fact texts to check embeddings: Corresponding embeddings @@ -196,20 +213,21 @@ class TemporalSemanticMemory: for text, embedding in zip(texts, embeddings): # Query for similar facts within time window - cursor.execute( + # Convert embedding list to string for asyncpg vector type + embedding_str = str(embedding) + result = await conn.fetchrow( """ - SELECT id, text, 1 - (embedding <=> %s::vector) AS similarity + SELECT id, text, 1 - (embedding <=> $1::vector) AS similarity FROM memory_units - WHERE agent_id = %s - AND event_date BETWEEN %s AND %s - AND 1 - (embedding <=> %s::vector) > %s + WHERE agent_id = $2 + AND event_date BETWEEN $3 AND $4 + AND 1 - (embedding <=> $1::vector) > $5 ORDER BY similarity DESC LIMIT 1 """, - (embedding, agent_id, time_lower, time_upper, embedding, similarity_threshold) + embedding_str, agent_id, time_lower, time_upper, similarity_threshold ) - result = cursor.fetchone() if result: is_duplicate.append(True) else: @@ -369,235 +387,106 @@ class TemporalSemanticMemory: print(f"[2] Generate embeddings (parallel): {len(all_embeddings)} embeddings in {time.time() - step_start:.3f}s") # Step 3: Process everything in ONE database transaction - cursor = self.conn.cursor() - try: - # Deduplication check for all facts - step_start = time.time() - all_is_duplicate = [] - for sentence, embedding, fact_date in zip(all_fact_texts, all_embeddings, all_fact_dates): - dup_flags = self._find_duplicate_facts_batch( - cursor, agent_id, [sentence], [embedding], fact_date - ) - all_is_duplicate.extend(dup_flags) + pool = await self._get_pool() + async with pool.acquire() as conn: + async with conn.transaction(): + try: + # Deduplication check for all facts + step_start = time.time() + all_is_duplicate = [] + for sentence, embedding, fact_date in zip(all_fact_texts, all_embeddings, all_fact_dates): + dup_flags = await self._find_duplicate_facts_batch( + conn, agent_id, [sentence], [embedding], fact_date + ) + all_is_duplicate.extend(dup_flags) - duplicates_filtered = sum(all_is_duplicate) - new_facts = total_facts - duplicates_filtered - print(f"[3] Deduplication check: {duplicates_filtered} duplicates filtered, {new_facts} new facts in {time.time() - step_start:.3f}s") + duplicates_filtered = sum(all_is_duplicate) + new_facts = total_facts - duplicates_filtered + print(f"[3] Deduplication check: {duplicates_filtered} duplicates filtered, {new_facts} new facts in {time.time() - step_start:.3f}s") - # Filter out duplicates - filtered_sentences = [s for s, is_dup in zip(all_fact_texts, all_is_duplicate) if not is_dup] - filtered_embeddings = [e for e, is_dup in zip(all_embeddings, all_is_duplicate) if not is_dup] - filtered_dates = [d for d, is_dup in zip(all_fact_dates, all_is_duplicate) if not is_dup] - filtered_contexts = [c for c, is_dup in zip(all_contexts, all_is_duplicate) if not is_dup] + # Filter out duplicates + filtered_sentences = [s for s, is_dup in zip(all_fact_texts, all_is_duplicate) if not is_dup] + filtered_embeddings = [e for e, is_dup in zip(all_embeddings, all_is_duplicate) if not is_dup] + filtered_dates = [d for d, is_dup in zip(all_fact_dates, all_is_duplicate) if not is_dup] + filtered_contexts = [c for c, is_dup in zip(all_contexts, all_is_duplicate) if not is_dup] - if not filtered_sentences: - print(f"[PUT_BATCH_ASYNC] All facts were duplicates, returning empty") - return [[] for _ in contents] + if not filtered_sentences: + print(f"[PUT_BATCH_ASYNC] All facts were duplicates, returning empty") + return [[] for _ in contents] - # Batch insert ALL units - step_start = time.time() - from psycopg2.extras import execute_values - unit_data = [ - (agent_id, sentence, context, embedding, date, 0) # access_count starts at 0 - for sentence, context, embedding, date in zip( - filtered_sentences, filtered_contexts, filtered_embeddings, filtered_dates - ) - ] + # Batch insert ALL units + step_start = time.time() + # Convert embeddings to strings for asyncpg vector type + filtered_embeddings_str = [str(emb) for emb in filtered_embeddings] + results = await conn.fetch( + """ + INSERT INTO memory_units (agent_id, text, context, embedding, event_date, access_count) + SELECT * FROM unnest($1::text[], $2::text[], $3::text[], $4::vector[], $5::timestamptz[], $6::integer[]) + RETURNING id + """, + [agent_id] * len(filtered_sentences), + filtered_sentences, + filtered_contexts, + filtered_embeddings_str, + filtered_dates, + [0] * len(filtered_sentences) + ) - results = execute_values( - cursor, - """ - INSERT INTO memory_units (agent_id, text, context, embedding, event_date, access_count) - VALUES %s - RETURNING id - """, - unit_data, - fetch=True - ) + created_unit_ids = [str(row['id']) for row in results] + print(f"[5] Batch insert units: {len(created_unit_ids)} units in {time.time() - step_start:.3f}s") - created_unit_ids = [str(row[0]) for row in results] - print(f"[5] Batch insert units: {len(created_unit_ids)} units in {time.time() - step_start:.3f}s") + # Process entities for ALL units + step_start = time.time() + all_entity_links = await self._extract_entities_batch_optimized( + conn, agent_id, created_unit_ids, filtered_sentences, "", filtered_dates + ) + print(f"[6] Extract entities (batched): {time.time() - step_start:.3f}s") - # Process entities for ALL units - step_start = time.time() - all_entity_links = self._extract_entities_batch_optimized( - cursor, agent_id, created_unit_ids, filtered_sentences, "", filtered_dates - ) - print(f"[6] Extract entities (batched): {time.time() - step_start:.3f}s") + # Create temporal links + step_start = time.time() + await self._create_temporal_links_batch_per_fact(conn, agent_id, created_unit_ids) + print(f"[7] Batch create temporal links: {time.time() - step_start:.3f}s") - # Create temporal links - step_start = time.time() - self._create_temporal_links_batch_per_fact(cursor, agent_id, created_unit_ids) - print(f"[7] Batch create temporal links: {time.time() - step_start:.3f}s") + # Create semantic links + step_start = time.time() + await self._create_semantic_links_batch(conn, agent_id, created_unit_ids, filtered_embeddings) + print(f"[8] Batch create semantic links: {time.time() - step_start:.3f}s") - # Create semantic links - step_start = time.time() - self._create_semantic_links_batch(cursor, agent_id, created_unit_ids, filtered_embeddings) - print(f"[8] Batch create semantic links: {time.time() - step_start:.3f}s") + # Insert entity links + step_start = time.time() + if all_entity_links: + await self._insert_entity_links_batch(conn, all_entity_links) + print(f"[9] Batch insert entity links: {time.time() - step_start:.3f}s") - # Insert entity links - step_start = time.time() - if all_entity_links: - self._insert_entity_links_batch(cursor, all_entity_links) - print(f"[9] Batch insert entity links: {time.time() - step_start:.3f}s") + # Transaction auto-commits on success + commit_start = time.time() + print(f"[10] Commit: {time.time() - commit_start:.3f}s") - # Commit everything - commit_start = time.time() - self.conn.commit() - print(f"[10] Commit: {time.time() - commit_start:.3f}s") + # Map created unit IDs back to original content items + # Account for duplicates when mapping back + result_unit_ids = [] + filtered_idx = 0 - # Map created unit IDs back to original content items - # Account for duplicates when mapping back - result_unit_ids = [] - filtered_idx = 0 + for start_idx, end_idx in content_boundaries: + content_unit_ids = [] + for i in range(start_idx, end_idx): + if not all_is_duplicate[i]: + content_unit_ids.append(created_unit_ids[filtered_idx]) + filtered_idx += 1 + result_unit_ids.append(content_unit_ids) - for start_idx, end_idx in content_boundaries: - content_unit_ids = [] - for i in range(start_idx, end_idx): - if not all_is_duplicate[i]: - content_unit_ids.append(created_unit_ids[filtered_idx]) - filtered_idx += 1 - result_unit_ids.append(content_unit_ids) + total_time = time.time() - start_time + print(f"\n{'='*60}") + print(f"PUT_BATCH_ASYNC COMPLETE: {len(created_unit_ids)} units from {len(contents)} contents in {total_time:.3f}s") + print(f"{'='*60}\n") - total_time = time.time() - start_time - print(f"\n{'='*60}") - print(f"PUT_BATCH_ASYNC COMPLETE: {len(created_unit_ids)} units from {len(contents)} contents in {total_time:.3f}s") - print(f"{'='*60}\n") + return result_unit_ids - return result_unit_ids - - except Exception as e: - self.conn.rollback() - raise Exception(f"Failed to store batch memory: {str(e)}") - finally: - cursor.close() - - def _create_temporal_links( - self, - cursor, - agent_id: str, - unit_id: str, - event_date: datetime, - time_window_hours: int = 24, - ): - """ - Create temporal links to recent memories. - - Links this unit to other units that occurred within a time window. - - Args: - cursor: Database cursor - agent_id: Agent ID - unit_id: ID of the current unit - event_date: When this event occurred - time_window_hours: Size of the temporal window - """ - try: - # Get recent units within time window - cursor.execute( - """ - SELECT id, event_date - FROM memory_units - WHERE agent_id = %s - AND id != %s - AND event_date >= %s - ORDER BY event_date DESC - LIMIT 10 - """, - (agent_id, unit_id, event_date - timedelta(hours=time_window_hours)) - ) - - recent_units = cursor.fetchall() - - # Create links to recent units - links = [] - for recent_id, recent_event_date in recent_units: - # Calculate temporal proximity weight - time_diff_hours = abs((event_date - recent_event_date).total_seconds() / 3600) - weight = max(0.3, 1.0 - (time_diff_hours / time_window_hours)) - - links.append((unit_id, recent_id, 'temporal', weight, None)) - - if links: - execute_values( - cursor, - """ - INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s - ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING - """, - links - ) - - except Exception as e: - print(f"ERROR: Failed to create temporal links: {str(e)}") - import traceback - traceback.print_exc() - # Re-raise to trigger rollback at put_async level - raise - - def _create_semantic_links( - self, - cursor, - agent_id: str, - unit_id: str, - embedding: List[float], - top_k: int = 5, - threshold: float = 0.7, - ): - """ - Create semantic links to similar memories. - - Links this unit to other units with similar meaning. - - Args: - cursor: Database cursor - agent_id: Agent ID - unit_id: ID of the current unit - embedding: Embedding of the current unit - top_k: Number of similar units to link to - threshold: Minimum similarity threshold - """ - try: - # Find similar units using vector similarity - cursor.execute( - """ - SELECT id, 1 - (embedding <=> %s::vector) AS similarity - FROM memory_units - WHERE agent_id = %s - AND id != %s - AND embedding IS NOT NULL - AND (1 - (embedding <=> %s::vector)) >= %s - ORDER BY embedding <=> %s::vector - LIMIT %s - """, - (embedding, agent_id, unit_id, embedding, threshold, embedding, top_k) - ) - - similar_units = cursor.fetchall() - - # Create links to similar units - links = [] - for similar_id, similarity in similar_units: - links.append((unit_id, similar_id, 'semantic', float(similarity), None)) - - if links: - execute_values( - cursor, - """ - INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s - ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING - """, - links - ) - - except Exception as e: - print(f"ERROR: Failed to create semantic links: {str(e)}") - import traceback - traceback.print_exc() - # Re-raise to trigger rollback at put_async level - raise + except Exception as e: + # Transaction auto-rolls back on exception + import traceback + traceback.print_exc() + raise Exception(f"Failed to store batch memory: {str(e)}") def search( self, @@ -653,215 +542,208 @@ class TemporalSemanticMemory: Returns: List of memory units with their weights, sorted by relevance """ - cursor = self.conn.cursor(cursor_factory=RealDictCursor) + pool = await self._get_pool() + async with pool.acquire() as conn: + search_start = time.time() + print(f"\n[SEARCH] Starting search for query: '{query[:50]}...' (thinking_budget={thinking_budget}, top_k={top_k})") - search_start = time.time() - print(f"\n[SEARCH] Starting search for query: '{query[:50]}...' (thinking_budget={thinking_budget}, top_k={top_k})") + try: + # Step 1: Generate query embedding + step_start = time.time() + query_embedding = self._generate_embedding(query) + print(f" [1] Generate query embedding: {time.time() - step_start:.3f}s") - try: - # Step 1: Generate query embedding - step_start = time.time() - query_embedding = self._generate_embedding(query) - print(f" [1] Generate query embedding: {time.time() - step_start:.3f}s") - - # Step 2: Find entry points - step_start = time.time() - cursor.execute( - """ - SELECT id, text, context, event_date, access_count, embedding, - 1 - (embedding <=> %s::vector) AS similarity - FROM memory_units - WHERE agent_id = %s - AND embedding IS NOT NULL - AND (1 - (embedding <=> %s::vector)) >= 0.5 - ORDER BY embedding <=> %s::vector - LIMIT 3 - """, - (query_embedding, agent_id, query_embedding, query_embedding) - ) - - entry_points = cursor.fetchall() - print(f" [2] Find entry points: {len(entry_points)} found in {time.time() - step_start:.3f}s") - - if not entry_points: - print(f"[SEARCH] Complete: 0 results in {time.time() - search_start:.3f}s") - return [] - - # Step 3: Spreading activation with budget - step_start = time.time() - visited = set() - results = [] - budget_remaining = thinking_budget - # Initialize entry points with their actual similarity scores instead of 1.0 - queue = [(dict(unit), unit["similarity"], True) for unit in entry_points] # (unit, activation, is_entry) - - # Track substep timings - update_access_time = 0 - calculate_weight_time = 0 - query_neighbors_time = 0 - process_neighbors_time = 0 - - # Process nodes in batches for efficient neighbor querying - BATCH_SIZE = 50 - nodes_to_process = [] # (unit, activation, is_entry_point) - - while queue and budget_remaining > 0: - # Collect a batch of nodes to process - while queue and len(nodes_to_process) < BATCH_SIZE and budget_remaining > 0: - current_unit, activation, is_entry_point = queue.pop(0) - unit_id = str(current_unit["id"]) - - if unit_id not in visited: - visited.add(unit_id) - budget_remaining -= 1 - nodes_to_process.append((current_unit, activation, is_entry_point)) - - if not nodes_to_process: - break - - # Update access counts for batch - substep_start = time.time() - node_ids = [str(node[0]["id"]) for node in nodes_to_process] - cursor.execute( - "UPDATE memory_units SET access_count = access_count + 1 WHERE id::text = ANY(%s)", - (node_ids,) - ) - update_access_time += time.time() - substep_start - - # Query neighbors for ALL nodes in batch at once - substep_start = time.time() - cursor.execute( + # Step 2: Find entry points + step_start = time.time() + # Convert embedding to string for asyncpg + query_embedding_str = str(query_embedding) + entry_points = await conn.fetch( """ - SELECT ml.from_unit_id, ml.to_unit_id, ml.weight, - mu.text, mu.context, mu.event_date, mu.access_count, mu.embedding - FROM memory_links ml - JOIN memory_units mu ON ml.to_unit_id = mu.id - WHERE ml.from_unit_id::text = ANY(%s) - AND ml.weight >= 0.1 - ORDER BY ml.from_unit_id, ml.weight DESC + SELECT id, text, context, event_date, access_count, + 1 - (embedding <=> $1::vector) AS similarity + FROM memory_units + WHERE agent_id = $2 + AND embedding IS NOT NULL + AND (1 - (embedding <=> $1::vector)) >= 0.5 + ORDER BY embedding <=> $1::vector + LIMIT 3 """, - (node_ids,) + query_embedding_str, agent_id ) - all_neighbors = cursor.fetchall() - query_neighbors_time += time.time() - substep_start - # Group neighbors by from_unit_id - substep_start = time.time() - neighbors_by_node = {} - for neighbor in all_neighbors: - from_id = str(neighbor["from_unit_id"]) - if from_id not in neighbors_by_node: - neighbors_by_node[from_id] = [] - neighbors_by_node[from_id].append(neighbor) + print(f" [2] Find entry points: {len(entry_points)} found in {time.time() - step_start:.3f}s") - # Process each node in the batch - for current_unit, activation, is_entry_point in nodes_to_process: - unit_id = str(current_unit["id"]) + if not entry_points: + print(f"[SEARCH] Complete: 0 results in {time.time() - search_start:.3f}s") + return [] - # Calculate combined weight - event_date = current_unit["event_date"] - days_since = (utcnow() - event_date).total_seconds() / 86400 + # Step 3: Spreading activation with budget + step_start = time.time() + visited = set() + results = [] + budget_remaining = thinking_budget + # Initialize entry points with their actual similarity scores instead of 1.0 + queue = [(dict(unit), unit["similarity"], True) for unit in entry_points] # (unit, activation, is_entry) - recency_weight = calculate_recency_weight(days_since) - frequency_weight = calculate_frequency_weight(current_unit.get("access_count", 0)) + # Track substep timings + update_access_time = 0 + calculate_weight_time = 0 + query_neighbors_time = 0 + process_neighbors_time = 0 - # Normalize frequency to [0, 1] range - frequency_normalized = (frequency_weight - 1.0) / 1.0 + # Process nodes in batches for efficient neighbor querying + BATCH_SIZE = 50 + nodes_to_process = [] # (unit, activation, is_entry_point) - # Calculate semantic similarity between query and this memory - memory_embedding = current_unit.get("embedding") - if memory_embedding is not None: - # Cosine similarity = 1 - cosine distance - query_vec = np.array(query_embedding) - memory_vec = np.array(memory_embedding) - # Cosine similarity - dot_product = np.dot(query_vec, memory_vec) - norm_query = np.linalg.norm(query_vec) - norm_memory = np.linalg.norm(memory_vec) - semantic_similarity = dot_product / (norm_query * norm_memory) if norm_query > 0 and norm_memory > 0 else 0.0 - else: - semantic_similarity = 0.0 + while queue and budget_remaining > 0: + # Collect a batch of nodes to process + while queue and len(nodes_to_process) < BATCH_SIZE and budget_remaining > 0: + current_unit, activation, is_entry_point = queue.pop(0) + unit_id = str(current_unit["id"]) - # Combined weight: 30% activation, 30% semantic similarity, 25% recency, 15% frequency - final_weight = 0.3 * activation + 0.3 * semantic_similarity + 0.25 * recency_weight + 0.15 * frequency_normalized + if unit_id not in visited: + visited.add(unit_id) + budget_remaining -= 1 + nodes_to_process.append((current_unit, activation, is_entry_point)) - # Notify tracer - if live_tracer: - live_tracer.visit_node( - node_id=unit_id, - text=current_unit["text"], - activation=activation, - recency=recency_weight, - frequency=frequency_weight, - weight=final_weight, - is_entry_point=is_entry_point, - ) + if not nodes_to_process: + break - results.append({ - "id": unit_id, - "text": current_unit["text"], - "context": current_unit.get("context", ""), - "event_date": event_date.isoformat(), - "weight": final_weight, - "activation": activation, - "semantic_similarity": semantic_similarity, - "recency": recency_weight, - "frequency": frequency_weight, - }) + # Update access counts for batch + substep_start = time.time() + node_ids = [str(node[0]["id"]) for node in nodes_to_process] + await conn.execute( + "UPDATE memory_units SET access_count = access_count + 1 WHERE id::text = ANY($1)", + node_ids + ) + update_access_time += time.time() - substep_start - # Spread to neighbors (from batch query results) - neighbors = neighbors_by_node.get(unit_id, []) - for neighbor in neighbors: - neighbor_id = str(neighbor["to_unit_id"]) - if neighbor_id not in visited: - link_weight = neighbor["weight"] - new_activation = activation * link_weight * 0.8 # 0.8 = decay factor + # Query neighbors for ALL nodes in batch at once + substep_start = time.time() + all_neighbors = await conn.fetch( + """ + SELECT ml.from_unit_id, ml.to_unit_id, ml.weight, + mu.text, mu.context, mu.event_date, mu.access_count + FROM memory_links ml + JOIN memory_units mu ON ml.to_unit_id = mu.id + WHERE ml.from_unit_id::text = ANY($1) + AND ml.weight >= 0.1 + ORDER BY ml.from_unit_id, ml.weight DESC + """, + node_ids + ) + query_neighbors_time += time.time() - substep_start - if new_activation > 0.1: - queue.append(({ - "id": neighbor["to_unit_id"], - "text": neighbor["text"], - "context": neighbor.get("context", ""), - "event_date": neighbor["event_date"], - "access_count": neighbor["access_count"], - "embedding": neighbor.get("embedding"), - }, new_activation, False)) # Not an entry point + # Group neighbors by from_unit_id + substep_start = time.time() + neighbors_by_node = {} + for neighbor in all_neighbors: + from_id = str(neighbor["from_unit_id"]) + if from_id not in neighbors_by_node: + neighbors_by_node[from_id] = [] + neighbors_by_node[from_id].append(neighbor) - calculate_weight_time += time.time() - substep_start - process_neighbors_time += time.time() - substep_start + # Process each node in the batch + for current_unit, activation, is_entry_point in nodes_to_process: + unit_id = str(current_unit["id"]) - # Clear batch for next iteration - nodes_to_process = [] + # Calculate combined weight + event_date = current_unit["event_date"] + days_since = (utcnow() - event_date).total_seconds() / 86400 - spreading_activation_time = time.time() - step_start - num_batches = (len(visited) + BATCH_SIZE - 1) // BATCH_SIZE # Ceiling division - print(f" [3] Spreading activation: {len(visited)} nodes visited in {spreading_activation_time:.3f}s") - print(f" [3.1] Update access counts: {update_access_time:.3f}s") - print(f" [3.2] Calculate weights: {calculate_weight_time:.3f}s") - print(f" [3.3] Query neighbors: {query_neighbors_time:.3f}s ({num_batches} batched queries)") - print(f" [3.4] Process neighbors: {process_neighbors_time:.3f}s") + recency_weight = calculate_recency_weight(days_since) + frequency_weight = calculate_frequency_weight(current_unit.get("access_count", 0)) - step_start = time.time() - self.conn.commit() - print(f" [4] Commit: {time.time() - step_start:.3f}s") + # Normalize frequency to [0, 1] range + frequency_normalized = (frequency_weight - 1.0) / 1.0 - # Step 4: Sort by final weight and return top results - step_start = time.time() - results.sort(key=lambda x: x["weight"], reverse=True) - top_results = results[:top_k] - print(f" [5] Sort and return top {top_k}: {time.time() - step_start:.3f}s") + # Calculate semantic similarity between query and this memory + memory_embedding = current_unit.get("embedding") + if memory_embedding is not None: + # Cosine similarity = 1 - cosine distance + query_vec = np.array(query_embedding) + memory_vec = np.array(memory_embedding) + # Cosine similarity + dot_product = np.dot(query_vec, memory_vec) + norm_query = np.linalg.norm(query_vec) + norm_memory = np.linalg.norm(memory_vec) + semantic_similarity = dot_product / (norm_query * norm_memory) if norm_query > 0 and norm_memory > 0 else 0.0 + else: + semantic_similarity = 0.0 - print(f"[SEARCH] Complete: {len(top_results)} results in {time.time() - search_start:.3f}s\n") - return top_results + # Combined weight: 30% activation, 30% semantic similarity, 25% recency, 15% frequency + final_weight = 0.3 * activation + 0.3 * semantic_similarity + 0.25 * recency_weight + 0.15 * frequency_normalized - except Exception as e: - print(f"[SEARCH] ERROR after {time.time() - search_start:.3f}s: {str(e)}") - self.conn.rollback() - raise Exception(f"Failed to search memories: {str(e)}") - finally: - cursor.close() + # Notify tracer + if live_tracer: + live_tracer.visit_node( + node_id=unit_id, + text=current_unit["text"], + activation=activation, + recency=recency_weight, + frequency=frequency_weight, + weight=final_weight, + is_entry_point=is_entry_point, + ) - def delete_agent(self, agent_id: str) -> Dict[str, int]: + results.append({ + "id": unit_id, + "text": current_unit["text"], + "context": current_unit.get("context", ""), + "event_date": event_date.isoformat(), + "weight": final_weight, + "activation": activation, + "semantic_similarity": semantic_similarity, + "recency": recency_weight, + "frequency": frequency_weight, + }) + + # Spread to neighbors (from batch query results) + neighbors = neighbors_by_node.get(unit_id, []) + for neighbor in neighbors: + neighbor_id = str(neighbor["to_unit_id"]) + if neighbor_id not in visited: + link_weight = neighbor["weight"] + new_activation = activation * link_weight * 0.8 # 0.8 = decay factor + + if new_activation > 0.1: + queue.append(({ + "id": neighbor["to_unit_id"], + "text": neighbor["text"], + "context": neighbor.get("context", ""), + "event_date": neighbor["event_date"], + "access_count": neighbor["access_count"], + "embedding": neighbor.get("embedding"), + }, new_activation, False)) # Not an entry point + + calculate_weight_time += time.time() - substep_start + process_neighbors_time += time.time() - substep_start + + # Clear batch for next iteration + nodes_to_process = [] + + spreading_activation_time = time.time() - step_start + num_batches = (len(visited) + BATCH_SIZE - 1) // BATCH_SIZE # Ceiling division + print(f" [3] Spreading activation: {len(visited)} nodes visited in {spreading_activation_time:.3f}s") + print(f" [3.1] Update access counts: {update_access_time:.3f}s") + print(f" [3.2] Calculate weights: {calculate_weight_time:.3f}s") + print(f" [3.3] Query neighbors: {query_neighbors_time:.3f}s ({num_batches} batched queries)") + print(f" [3.4] Process neighbors: {process_neighbors_time:.3f}s") + + # Step 4: Sort by final weight and return top results + step_start = time.time() + results.sort(key=lambda x: x["weight"], reverse=True) + top_results = results[:top_k] + print(f" [4] Sort and return top {top_k}: {time.time() - step_start:.3f}s") + + print(f"[SEARCH] Complete: {len(top_results)} results in {time.time() - search_start:.3f}s\n") + return top_results + + except Exception as e: + print(f"[SEARCH] ERROR after {time.time() - search_start:.3f}s: {str(e)}") + raise Exception(f"Failed to search memories: {str(e)}") + + async def delete_agent(self, agent_id: str) -> Dict[str, int]: """ Delete all data for a specific agent (multi-tenant cleanup). @@ -879,88 +761,31 @@ class TemporalSemanticMemory: Returns: Dictionary with counts of deleted items """ - cursor = self.conn.cursor() + pool = await self._get_pool() + async with pool.acquire() as conn: + async with conn.transaction(): + try: + # Count before deletion for reporting + units_count = await conn.fetchval("SELECT COUNT(*) FROM memory_units WHERE agent_id = $1", agent_id) + entities_count = await conn.fetchval("SELECT COUNT(*) FROM entities WHERE agent_id = $1", agent_id) - try: - # Count before deletion for reporting - cursor.execute("SELECT COUNT(*) FROM memory_units WHERE agent_id = %s", (agent_id,)) - units_count = cursor.fetchone()[0] + # Delete memory units (cascades to unit_entities, memory_links) + await conn.execute("DELETE FROM memory_units WHERE agent_id = $1", agent_id) - cursor.execute("SELECT COUNT(*) FROM entities WHERE agent_id = %s", (agent_id,)) - entities_count = cursor.fetchone()[0] + # Delete entities (cascades to unit_entities, entity_cooccurrences, memory_links with entity_id) + await conn.execute("DELETE FROM entities WHERE agent_id = $1", agent_id) - # Delete memory units (cascades to unit_entities, memory_links) - cursor.execute("DELETE FROM memory_units WHERE agent_id = %s", (agent_id,)) + return { + "memory_units_deleted": units_count, + "entities_deleted": entities_count + } - # Delete entities (cascades to unit_entities, entity_cooccurrences, memory_links with entity_id) - cursor.execute("DELETE FROM entities WHERE agent_id = %s", (agent_id,)) + except Exception as e: + raise Exception(f"Failed to delete agent data: {str(e)}") - self.conn.commit() - - return { - "memory_units_deleted": units_count, - "entities_deleted": entities_count - } - - except Exception as e: - self.conn.rollback() - raise Exception(f"Failed to delete agent data: {str(e)}") - finally: - cursor.close() - - def get_memory_graph_data(self, agent_id: str = None) -> Tuple[List[Dict], List[Dict]]: - """ - Get memory graph data for visualization. - - Args: - agent_id: Optional agent ID (if None, returns all data) - - Returns: - Tuple of (units, links) for visualization - """ - cursor = self.conn.cursor(cursor_factory=RealDictCursor) - - try: - # Get all units (optionally filtered by agent) - if agent_id: - cursor.execute( - "SELECT id, text, context, event_date, access_count FROM memory_units WHERE agent_id = %s", - (agent_id,) - ) - else: - cursor.execute( - "SELECT id, text, context, event_date, access_count FROM memory_units" - ) - units = [dict(row) for row in cursor.fetchall()] - - # Get all links (optionally filtered by agent) - if agent_id: - cursor.execute( - """ - SELECT ml.from_unit_id, ml.to_unit_id, ml.link_type, ml.weight - FROM memory_links ml - JOIN memory_units mu1 ON ml.from_unit_id = mu1.id - JOIN memory_units mu2 ON ml.to_unit_id = mu2.id - WHERE mu1.agent_id = %s - """, - (agent_id,) - ) - else: - cursor.execute( - "SELECT from_unit_id, to_unit_id, link_type, weight FROM memory_links" - ) - links = [dict(row) for row in cursor.fetchall()] - - return units, links - - except Exception as e: - raise Exception(f"Failed to get memory graph data: {str(e)}") - finally: - cursor.close() - - def _extract_entities_batch_optimized( + async def _extract_entities_batch_optimized( self, - cursor, + conn, agent_id: str, unit_ids: List[str], sentences: List[str], @@ -1024,11 +849,12 @@ class TemporalSemanticMemory: indices = [idx for idx, _ in entities_group] entities_data = [entity_data for _, entity_data in entities_group] - batch_resolved = self.entity_resolver.resolve_entities_batch( + batch_resolved = await self.entity_resolver.resolve_entities_batch( agent_id=agent_id, entities_data=entities_data, context=context, - unit_event_date=fact_date + unit_event_date=fact_date, + conn=conn ) for idx, entity_id in zip(indices, batch_resolved): @@ -1049,7 +875,7 @@ class TemporalSemanticMemory: unit_entity_pairs.append((unit_id, entity_id)) # Batch insert all unit-entity links (MUCH faster!) - self.entity_resolver.link_units_to_entities_batch(unit_entity_pairs) + await self.entity_resolver.link_units_to_entities_batch(unit_entity_pairs, conn=conn) print(f" [6.2.3] Create unit-entity links (batched): {len(unit_entity_pairs)} links in {time.time() - substep_6_2_3_start:.3f}s") print(f" [6.2] Entity resolution (batched): {len(all_entities_flat)} entities resolved in {time.time() - step_6_2_start:.3f}s") @@ -1067,15 +893,15 @@ class TemporalSemanticMemory: # For each entity, find all units that reference it (one query per entity) entity_to_units = {} for entity_id in all_entity_ids: - cursor.execute( + rows = await conn.fetch( """ SELECT unit_id FROM unit_entities - WHERE entity_id = %s + WHERE entity_id = $1 """, - (entity_id,) + entity_id ) - entity_to_units[entity_id] = [row[0] for row in cursor.fetchall()] + entity_to_units[entity_id] = [row['unit_id'] for row in rows] # Create bidirectional links between units that share entities links = [] @@ -1098,71 +924,9 @@ class TemporalSemanticMemory: # Re-raise to trigger rollback at put_async level raise - def _create_temporal_links_batch( + async def _create_temporal_links_batch_per_fact( self, - cursor, - agent_id: str, - unit_ids: List[str], - event_date: datetime, - time_window_hours: int = 24, - ): - """ - Create temporal links for multiple units in one batch query. - - Uses a single query to find all relevant temporal connections. - """ - if not unit_ids: - return - - try: - from psycopg2.extras import execute_values - - # Get ALL recent units within time window (single query) - # Cast string IDs to UUIDs for comparison - cursor.execute( - """ - SELECT id, event_date - FROM memory_units - WHERE agent_id = %s - AND id::text != ALL(%s) - AND event_date >= %s - ORDER BY event_date DESC - """, - (agent_id, unit_ids, event_date - timedelta(hours=time_window_hours)) - ) - - recent_units = cursor.fetchall() - - # Create links from each new unit to all recent units - links = [] - for unit_id in unit_ids: - for recent_id, recent_event_date in recent_units: - # Calculate temporal proximity weight - time_diff_hours = abs((event_date - recent_event_date).total_seconds() / 3600) - weight = max(0.3, 1.0 - (time_diff_hours / time_window_hours)) - links.append((unit_id, recent_id, 'temporal', weight, None)) - - if links: - execute_values( - cursor, - """ - INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s - ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING - """, - links - ) - - except Exception as e: - print(f"ERROR: Failed to create temporal links: {str(e)}") - import traceback - traceback.print_exc() - # Re-raise to trigger rollback at put_async level - raise - - def _create_temporal_links_batch_per_fact( - self, - cursor, + conn, agent_id: str, unit_ids: List[str], time_window_hours: int = 24, @@ -1177,55 +941,50 @@ class TemporalSemanticMemory: return try: - from psycopg2.extras import execute_values - # Get the event_date for each new unit - cursor.execute( + rows = await conn.fetch( """ SELECT id, event_date FROM memory_units - WHERE id::text = ANY(%s) + WHERE id::text = ANY($1) """, - (unit_ids,) + unit_ids ) - new_units = {str(row[0]): row[1] for row in cursor.fetchall()} + new_units = {str(row['id']): row['event_date'] for row in rows} # Create links based on each unit's individual event_date links = [] for unit_id, unit_event_date in new_units.items(): # Find units within the time window of THIS specific unit - cursor.execute( + recent_units = await conn.fetch( """ SELECT id, event_date FROM memory_units - WHERE agent_id = %s - AND id != %s - AND event_date BETWEEN %s AND %s + WHERE agent_id = $1 + AND id != $2 + AND event_date BETWEEN $3 AND $4 ORDER BY event_date DESC LIMIT 10 """, - ( - agent_id, - unit_id, - unit_event_date - timedelta(hours=time_window_hours), - unit_event_date + timedelta(hours=time_window_hours) - ) + agent_id, + unit_id, + unit_event_date - timedelta(hours=time_window_hours), + unit_event_date + timedelta(hours=time_window_hours) ) - recent_units = cursor.fetchall() - - for recent_id, recent_event_date in recent_units: + for recent_row in recent_units: + recent_id = recent_row['id'] + recent_event_date = recent_row['event_date'] # Calculate temporal proximity weight time_diff_hours = abs((unit_event_date - recent_event_date).total_seconds() / 3600) weight = max(0.3, 1.0 - (time_diff_hours / time_window_hours)) - links.append((unit_id, recent_id, 'temporal', weight, None)) + links.append((unit_id, str(recent_id), 'temporal', weight, None)) if links: - execute_values( - cursor, + await conn.executemany( """ INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s + VALUES ($1, $2, $3, $4, $5) ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING """, links @@ -1238,9 +997,9 @@ class TemporalSemanticMemory: # Re-raise to trigger rollback at put_async level raise - def _create_semantic_links_batch( + async def _create_semantic_links_batch( self, - cursor, + conn, agent_id: str, unit_ids: List[str], embeddings: List[List[float]], @@ -1256,37 +1015,36 @@ class TemporalSemanticMemory: return try: - from psycopg2.extras import execute_values - all_links = [] for unit_id, embedding in zip(unit_ids, embeddings): # Find similar units using vector similarity - cursor.execute( + # Convert embedding to string for asyncpg + embedding_str = str(embedding) + similar_units = await conn.fetch( """ - SELECT id, 1 - (embedding <=> %s::vector) AS similarity + SELECT id, 1 - (embedding <=> $1::vector) AS similarity FROM memory_units - WHERE agent_id = %s - AND id != %s + WHERE agent_id = $2 + AND id != $3 AND embedding IS NOT NULL - AND (1 - (embedding <=> %s::vector)) >= %s - ORDER BY embedding <=> %s::vector - LIMIT %s + AND (1 - (embedding <=> $1::vector)) >= $4 + ORDER BY embedding <=> $1::vector + LIMIT $5 """, - (embedding, agent_id, unit_id, embedding, threshold, embedding, top_k) + embedding_str, agent_id, unit_id, threshold, top_k ) - similar_units = cursor.fetchall() - - for similar_id, similarity in similar_units: - all_links.append((unit_id, similar_id, 'semantic', float(similarity), None)) + for row in similar_units: + similar_id = row['id'] + similarity = row['similarity'] + all_links.append((unit_id, str(similar_id), 'semantic', float(similarity), None)) if all_links: - execute_values( - cursor, + await conn.executemany( """ INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s + VALUES ($1, $2, $3, $4, $5) ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING """, all_links @@ -1299,18 +1057,16 @@ class TemporalSemanticMemory: # Re-raise to trigger rollback at put_async level raise - def _insert_entity_links_batch(self, cursor, links: List[tuple]): + async def _insert_entity_links_batch(self, conn, links: List[tuple]): """Insert all entity links in a single batch.""" if not links: return try: - from psycopg2.extras import execute_values - execute_values( - cursor, + await conn.executemany( """ INSERT INTO memory_links (from_unit_id, to_unit_id, link_type, weight, entity_id) - VALUES %s + VALUES ($1, $2, $3, $4, $5) ON CONFLICT (from_unit_id, to_unit_id, link_type, COALESCE(entity_id, '00000000-0000-0000-0000-000000000000'::uuid)) DO NOTHING """, links diff --git a/pyproject.toml b/pyproject.toml index 4cfebc68..982fd9ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,7 @@ description = "Temporal + Semantic + Entity Memory System for AI agents using Po readme = "README.md" requires-python = ">=3.11" dependencies = [ - "psycopg2-binary>=2.9.0", - "pgvector>=0.2.0", + "asyncpg>=0.29.0", "python-dotenv>=1.0.0", "openai>=1.0.0", "pydantic>=2.0.0", diff --git a/tests/conftest.py b/tests/conftest.py index ab5c4576..d97b1cec 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,9 +3,10 @@ Pytest configuration and shared fixtures. """ import pytest import os +import asyncio from dotenv import load_dotenv from memory import TemporalSemanticMemory -import psycopg2 +import asyncpg load_dotenv() @@ -29,19 +30,19 @@ def clean_agent(memory): agent_id = "test" # Clean up before test - memory.delete_agent(agent_id) + asyncio.run(memory.delete_agent(agent_id)) yield agent_id # Clean up after test - memory.delete_agent(agent_id) + asyncio.run(memory.delete_agent(agent_id)) @pytest.fixture -def db_connection(): +async def db_connection(): """ Provide a database connection for direct DB queries in tests. """ - conn = psycopg2.connect(os.getenv('DATABASE_URL')) + conn = await asyncpg.connect(os.getenv('DATABASE_URL')) yield conn - conn.close() + await conn.close() diff --git a/uv.lock b/uv.lock index b3529c00..1ffcdde6 100644 --- a/uv.lock +++ b/uv.lock @@ -29,6 +29,38 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size = 109097 }, ] +[[package]] +name = "asyncpg" +version = "0.30.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2f/4c/7c991e080e106d854809030d8584e15b2e996e26f16aee6d757e387bc17d/asyncpg-0.30.0.tar.gz", hash = "sha256:c551e9928ab6707602f44811817f82ba3c446e018bfe1d3abecc8ba5f3eac851", size = 957746 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/0e/f5d708add0d0b97446c402db7e8dd4c4183c13edaabe8a8500b411e7b495/asyncpg-0.30.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5e0511ad3dec5f6b4f7a9e063591d407eee66b88c14e2ea636f187da1dcfff6a", size = 674506 }, + { url = "https://files.pythonhosted.org/packages/6a/a0/67ec9a75cb24a1d99f97b8437c8d56da40e6f6bd23b04e2f4ea5d5ad82ac/asyncpg-0.30.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:915aeb9f79316b43c3207363af12d0e6fd10776641a7de8a01212afd95bdf0ed", size = 645922 }, + { url = "https://files.pythonhosted.org/packages/5c/d9/a7584f24174bd86ff1053b14bb841f9e714380c672f61c906eb01d8ec433/asyncpg-0.30.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1c198a00cce9506fcd0bf219a799f38ac7a237745e1d27f0e1f66d3707c84a5a", size = 3079565 }, + { url = "https://files.pythonhosted.org/packages/a0/d7/a4c0f9660e333114bdb04d1a9ac70db690dd4ae003f34f691139a5cbdae3/asyncpg-0.30.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3326e6d7381799e9735ca2ec9fd7be4d5fef5dcbc3cb555d8a463d8460607956", size = 3109962 }, + { url = "https://files.pythonhosted.org/packages/3c/21/199fd16b5a981b1575923cbb5d9cf916fdc936b377e0423099f209e7e73d/asyncpg-0.30.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:51da377487e249e35bd0859661f6ee2b81db11ad1f4fc036194bc9cb2ead5056", size = 3064791 }, + { url = "https://files.pythonhosted.org/packages/77/52/0004809b3427534a0c9139c08c87b515f1c77a8376a50ae29f001e53962f/asyncpg-0.30.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:bc6d84136f9c4d24d358f3b02be4b6ba358abd09f80737d1ac7c444f36108454", size = 3188696 }, + { url = "https://files.pythonhosted.org/packages/52/cb/fbad941cd466117be58b774a3f1cc9ecc659af625f028b163b1e646a55fe/asyncpg-0.30.0-cp311-cp311-win32.whl", hash = "sha256:574156480df14f64c2d76450a3f3aaaf26105869cad3865041156b38459e935d", size = 567358 }, + { url = "https://files.pythonhosted.org/packages/3c/0a/0a32307cf166d50e1ad120d9b81a33a948a1a5463ebfa5a96cc5606c0863/asyncpg-0.30.0-cp311-cp311-win_amd64.whl", hash = "sha256:3356637f0bd830407b5597317b3cb3571387ae52ddc3bca6233682be88bbbc1f", size = 629375 }, + { url = "https://files.pythonhosted.org/packages/4b/64/9d3e887bb7b01535fdbc45fbd5f0a8447539833b97ee69ecdbb7a79d0cb4/asyncpg-0.30.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c902a60b52e506d38d7e80e0dd5399f657220f24635fee368117b8b5fce1142e", size = 673162 }, + { url = "https://files.pythonhosted.org/packages/6e/eb/8b236663f06984f212a087b3e849731f917ab80f84450e943900e8ca4052/asyncpg-0.30.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:aca1548e43bbb9f0f627a04666fedaca23db0a31a84136ad1f868cb15deb6e3a", size = 637025 }, + { url = "https://files.pythonhosted.org/packages/cc/57/2dc240bb263d58786cfaa60920779af6e8d32da63ab9ffc09f8312bd7a14/asyncpg-0.30.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c2a2ef565400234a633da0eafdce27e843836256d40705d83ab7ec42074efb3", size = 3496243 }, + { url = "https://files.pythonhosted.org/packages/f4/40/0ae9d061d278b10713ea9021ef6b703ec44698fe32178715a501ac696c6b/asyncpg-0.30.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1292b84ee06ac8a2ad8e51c7475aa309245874b61333d97411aab835c4a2f737", size = 3575059 }, + { url = "https://files.pythonhosted.org/packages/c3/75/d6b895a35a2c6506952247640178e5f768eeb28b2e20299b6a6f1d743ba0/asyncpg-0.30.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0f5712350388d0cd0615caec629ad53c81e506b1abaaf8d14c93f54b35e3595a", size = 3473596 }, + { url = "https://files.pythonhosted.org/packages/c8/e7/3693392d3e168ab0aebb2d361431375bd22ffc7b4a586a0fc060d519fae7/asyncpg-0.30.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:db9891e2d76e6f425746c5d2da01921e9a16b5a71a1c905b13f30e12a257c4af", size = 3641632 }, + { url = "https://files.pythonhosted.org/packages/32/ea/15670cea95745bba3f0352341db55f506a820b21c619ee66b7d12ea7867d/asyncpg-0.30.0-cp312-cp312-win32.whl", hash = "sha256:68d71a1be3d83d0570049cd1654a9bdfe506e794ecc98ad0873304a9f35e411e", size = 560186 }, + { url = "https://files.pythonhosted.org/packages/7e/6b/fe1fad5cee79ca5f5c27aed7bd95baee529c1bf8a387435c8ba4fe53d5c1/asyncpg-0.30.0-cp312-cp312-win_amd64.whl", hash = "sha256:9a0292c6af5c500523949155ec17b7fe01a00ace33b68a476d6b5059f9630305", size = 621064 }, + { url = "https://files.pythonhosted.org/packages/3a/22/e20602e1218dc07692acf70d5b902be820168d6282e69ef0d3cb920dc36f/asyncpg-0.30.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05b185ebb8083c8568ea8a40e896d5f7af4b8554b64d7719c0eaa1eb5a5c3a70", size = 670373 }, + { url = "https://files.pythonhosted.org/packages/3d/b3/0cf269a9d647852a95c06eb00b815d0b95a4eb4b55aa2d6ba680971733b9/asyncpg-0.30.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:c47806b1a8cbb0a0db896f4cd34d89942effe353a5035c62734ab13b9f938da3", size = 634745 }, + { url = "https://files.pythonhosted.org/packages/8e/6d/a4f31bf358ce8491d2a31bfe0d7bcf25269e80481e49de4d8616c4295a34/asyncpg-0.30.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9b6fde867a74e8c76c71e2f64f80c64c0f3163e687f1763cfaf21633ec24ec33", size = 3512103 }, + { url = "https://files.pythonhosted.org/packages/96/19/139227a6e67f407b9c386cb594d9628c6c78c9024f26df87c912fabd4368/asyncpg-0.30.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46973045b567972128a27d40001124fbc821c87a6cade040cfcd4fa8a30bcdc4", size = 3592471 }, + { url = "https://files.pythonhosted.org/packages/67/e4/ab3ca38f628f53f0fd28d3ff20edff1c975dd1cb22482e0061916b4b9a74/asyncpg-0.30.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9110df111cabc2ed81aad2f35394a00cadf4f2e0635603db6ebbd0fc896f46a4", size = 3496253 }, + { url = "https://files.pythonhosted.org/packages/ef/5f/0bf65511d4eeac3a1f41c54034a492515a707c6edbc642174ae79034d3ba/asyncpg-0.30.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:04ff0785ae7eed6cc138e73fc67b8e51d54ee7a3ce9b63666ce55a0bf095f7ba", size = 3662720 }, + { url = "https://files.pythonhosted.org/packages/e7/31/1513d5a6412b98052c3ed9158d783b1e09d0910f51fbe0e05f56cc370bc4/asyncpg-0.30.0-cp313-cp313-win32.whl", hash = "sha256:ae374585f51c2b444510cdf3595b97ece4f233fde739aa14b50e0d64e8a7a590", size = 560404 }, + { url = "https://files.pythonhosted.org/packages/c8/a4/cec76b3389c4c5ff66301cd100fe88c318563ec8a520e0b2e792b5b84972/asyncpg-0.30.0-cp313-cp313-win_amd64.whl", hash = "sha256:f59b430b8e27557c3fb9869222559f7417ced18688375825f8f12302c34e915e", size = 621623 }, +] + [[package]] name = "blis" version = "1.3.0" @@ -1009,13 +1041,12 @@ name = "memory-poc" version = "0.1.0" source = { virtual = "." } dependencies = [ + { name = "asyncpg" }, { name = "langchain-text-splitters" }, { name = "matplotlib" }, { name = "networkx" }, { name = "nltk" }, { name = "openai" }, - { name = "pgvector" }, - { name = "psycopg2-binary" }, { name = "pydantic" }, { name = "pytest" }, { name = "pytest-asyncio" }, @@ -1028,13 +1059,12 @@ dependencies = [ [package.metadata] requires-dist = [ + { name = "asyncpg", specifier = ">=0.29.0" }, { name = "langchain-text-splitters", specifier = ">=0.3.0" }, { name = "matplotlib", specifier = ">=3.7.0" }, { name = "networkx", specifier = ">=3.0" }, { name = "nltk", specifier = ">=3.8.0" }, { name = "openai", specifier = ">=1.0.0" }, - { name = "pgvector", specifier = ">=0.2.0" }, - { name = "psycopg2-binary", specifier = ">=2.9.0" }, { name = "pydantic", specifier = ">=2.0.0" }, { name = "pytest", specifier = ">=7.0.0" }, { name = "pytest-asyncio", specifier = ">=0.21.0" }, @@ -1418,18 +1448,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469 }, ] -[[package]] -name = "pgvector" -version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/44/43/9a0fb552ab4fd980680c2037962e331820f67585df740bedc4a2b50faf20/pgvector-0.4.1.tar.gz", hash = "sha256:83d3a1c044ff0c2f1e95d13dfb625beb0b65506cfec0941bfe81fd0ad44f4003", size = 30646 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/21/b5735d5982892c878ff3d01bb06e018c43fc204428361ee9fc25a1b2125c/pgvector-0.4.1-py3-none-any.whl", hash = "sha256:34bb4e99e1b13d08a2fe82dda9f860f15ddcd0166fbb25bffe15821cbfeb7362", size = 27086 }, -] - [[package]] name = "pillow" version = "12.0.0" @@ -1559,58 +1577,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fa/8c/d3e30f80b2ef21f267f09f0b7d18995adccc928ede5b73ea3fe54e1303f4/preshed-3.0.10-cp313-cp313-win_amd64.whl", hash = "sha256:97e0e2edfd25a7dfba799b49b3c5cc248ad0318a76edd9d5fd2c82aa3d5c64ed", size = 115769 }, ] -[[package]] -name = "psycopg2-binary" -version = "2.9.11" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ac/6c/8767aaa597ba424643dc87348c6f1754dd9f48e80fdc1b9f7ca5c3a7c213/psycopg2-binary-2.9.11.tar.gz", hash = "sha256:b6aed9e096bf63f9e75edf2581aa9a7e7186d97ab5c177aa6c87797cd591236c", size = 379620 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c7/ae/8d8266f6dd183ab4d48b95b9674034e1b482a3f8619b33a0d86438694577/psycopg2_binary-2.9.11-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0e8480afd62362d0a6a27dd09e4ca2def6fa50ed3a4e7c09165266106b2ffa10", size = 3756452 }, - { url = "https://files.pythonhosted.org/packages/4b/34/aa03d327739c1be70e09d01182619aca8ebab5970cd0cfa50dd8b9cec2ac/psycopg2_binary-2.9.11-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:763c93ef1df3da6d1a90f86ea7f3f806dc06b21c198fa87c3c25504abec9404a", size = 3863957 }, - { url = "https://files.pythonhosted.org/packages/48/89/3fdb5902bdab8868bbedc1c6e6023a4e08112ceac5db97fc2012060e0c9a/psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:2e164359396576a3cc701ba8af4751ae68a07235d7a380c631184a611220d9a4", size = 4410955 }, - { url = "https://files.pythonhosted.org/packages/ce/24/e18339c407a13c72b336e0d9013fbbbde77b6fd13e853979019a1269519c/psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:d57c9c387660b8893093459738b6abddbb30a7eab058b77b0d0d1c7d521ddfd7", size = 4468007 }, - { url = "https://files.pythonhosted.org/packages/91/7e/b8441e831a0f16c159b5381698f9f7f7ed54b77d57bc9c5f99144cc78232/psycopg2_binary-2.9.11-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2c226ef95eb2250974bf6fa7a842082b31f68385c4f3268370e3f3870e7859ee", size = 4165012 }, - { url = "https://files.pythonhosted.org/packages/0d/61/4aa89eeb6d751f05178a13da95516c036e27468c5d4d2509bb1e15341c81/psycopg2_binary-2.9.11-cp311-cp311-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a311f1edc9967723d3511ea7d2708e2c3592e3405677bf53d5c7246753591fbb", size = 3981881 }, - { url = "https://files.pythonhosted.org/packages/76/a1/2f5841cae4c635a9459fe7aca8ed771336e9383b6429e05c01267b0774cf/psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ebb415404821b6d1c47353ebe9c8645967a5235e6d88f914147e7fd411419e6f", size = 3650985 }, - { url = "https://files.pythonhosted.org/packages/84/74/4defcac9d002bca5709951b975173c8c2fa968e1a95dc713f61b3a8d3b6a/psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:f07c9c4a5093258a03b28fab9b4f151aa376989e7f35f855088234e656ee6a94", size = 3296039 }, - { url = "https://files.pythonhosted.org/packages/6d/c2/782a3c64403d8ce35b5c50e1b684412cf94f171dc18111be8c976abd2de1/psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:00ce1830d971f43b667abe4a56e42c1e2d594b32da4802e44a73bacacb25535f", size = 3043477 }, - { url = "https://files.pythonhosted.org/packages/c8/31/36a1d8e702aa35c38fc117c2b8be3f182613faa25d794b8aeaab948d4c03/psycopg2_binary-2.9.11-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:cffe9d7697ae7456649617e8bb8d7a45afb71cd13f7ab22af3e5c61f04840908", size = 3345842 }, - { url = "https://files.pythonhosted.org/packages/6e/b4/a5375cda5b54cb95ee9b836930fea30ae5a8f14aa97da7821722323d979b/psycopg2_binary-2.9.11-cp311-cp311-win_amd64.whl", hash = "sha256:304fd7b7f97eef30e91b8f7e720b3db75fee010b520e434ea35ed1ff22501d03", size = 2713894 }, - { url = "https://files.pythonhosted.org/packages/d8/91/f870a02f51be4a65987b45a7de4c2e1897dd0d01051e2b559a38fa634e3e/psycopg2_binary-2.9.11-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:be9b840ac0525a283a96b556616f5b4820e0526addb8dcf6525a0fa162730be4", size = 3756603 }, - { url = "https://files.pythonhosted.org/packages/27/fa/cae40e06849b6c9a95eb5c04d419942f00d9eaac8d81626107461e268821/psycopg2_binary-2.9.11-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f090b7ddd13ca842ebfe301cd587a76a4cf0913b1e429eb92c1be5dbeb1a19bc", size = 3864509 }, - { url = "https://files.pythonhosted.org/packages/2d/75/364847b879eb630b3ac8293798e380e441a957c53657995053c5ec39a316/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ab8905b5dcb05bf3fb22e0cf90e10f469563486ffb6a96569e51f897c750a76a", size = 4411159 }, - { url = "https://files.pythonhosted.org/packages/6f/a0/567f7ea38b6e1c62aafd58375665a547c00c608a471620c0edc364733e13/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:bf940cd7e7fec19181fdbc29d76911741153d51cab52e5c21165f3262125685e", size = 4468234 }, - { url = "https://files.pythonhosted.org/packages/30/da/4e42788fb811bbbfd7b7f045570c062f49e350e1d1f3df056c3fb5763353/psycopg2_binary-2.9.11-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fa0f693d3c68ae925966f0b14b8edda71696608039f4ed61b1fe9ffa468d16db", size = 4166236 }, - { url = "https://files.pythonhosted.org/packages/3c/94/c1777c355bc560992af848d98216148be5f1be001af06e06fc49cbded578/psycopg2_binary-2.9.11-cp312-cp312-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a1cf393f1cdaf6a9b57c0a719a1068ba1069f022a59b8b1fe44b006745b59757", size = 3983083 }, - { url = "https://files.pythonhosted.org/packages/bd/42/c9a21edf0e3daa7825ed04a4a8588686c6c14904344344a039556d78aa58/psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ef7a6beb4beaa62f88592ccc65df20328029d721db309cb3250b0aae0fa146c3", size = 3652281 }, - { url = "https://files.pythonhosted.org/packages/12/22/dedfbcfa97917982301496b6b5e5e6c5531d1f35dd2b488b08d1ebc52482/psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:31b32c457a6025e74d233957cc9736742ac5a6cb196c6b68499f6bb51390bd6a", size = 3298010 }, - { url = "https://files.pythonhosted.org/packages/66/ea/d3390e6696276078bd01b2ece417deac954dfdd552d2edc3d03204416c0c/psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:edcb3aeb11cb4bf13a2af3c53a15b3d612edeb6409047ea0b5d6a21a9d744b34", size = 3044641 }, - { url = "https://files.pythonhosted.org/packages/12/9a/0402ded6cbd321da0c0ba7d34dc12b29b14f5764c2fc10750daa38e825fc/psycopg2_binary-2.9.11-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:62b6d93d7c0b61a1dd6197d208ab613eb7dcfdcca0a49c42ceb082257991de9d", size = 3347940 }, - { url = "https://files.pythonhosted.org/packages/b1/d2/99b55e85832ccde77b211738ff3925a5d73ad183c0b37bcbbe5a8ff04978/psycopg2_binary-2.9.11-cp312-cp312-win_amd64.whl", hash = "sha256:b33fabeb1fde21180479b2d4667e994de7bbf0eec22832ba5d9b5e4cf65b6c6d", size = 2714147 }, - { url = "https://files.pythonhosted.org/packages/ff/a8/a2709681b3ac11b0b1786def10006b8995125ba268c9a54bea6f5ae8bd3e/psycopg2_binary-2.9.11-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:b8fb3db325435d34235b044b199e56cdf9ff41223a4b9752e8576465170bb38c", size = 3756572 }, - { url = "https://files.pythonhosted.org/packages/62/e1/c2b38d256d0dafd32713e9f31982a5b028f4a3651f446be70785f484f472/psycopg2_binary-2.9.11-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:366df99e710a2acd90efed3764bb1e28df6c675d33a7fb40df9b7281694432ee", size = 3864529 }, - { url = "https://files.pythonhosted.org/packages/11/32/b2ffe8f3853c181e88f0a157c5fb4e383102238d73c52ac6d93a5c8bffe6/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8c55b385daa2f92cb64b12ec4536c66954ac53654c7f15a203578da4e78105c0", size = 4411242 }, - { url = "https://files.pythonhosted.org/packages/10/04/6ca7477e6160ae258dc96f67c371157776564679aefd247b66f4661501a2/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:c0377174bf1dd416993d16edc15357f6eb17ac998244cca19bc67cdc0e2e5766", size = 4468258 }, - { url = "https://files.pythonhosted.org/packages/3c/7e/6a1a38f86412df101435809f225d57c1a021307dd0689f7a5e7fe83588b1/psycopg2_binary-2.9.11-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5c6ff3335ce08c75afaed19e08699e8aacf95d4a260b495a4a8545244fe2ceb3", size = 4166295 }, - { url = "https://files.pythonhosted.org/packages/f2/7d/c07374c501b45f3579a9eb761cbf2604ddef3d96ad48679112c2c5aa9c25/psycopg2_binary-2.9.11-cp313-cp313-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:84011ba3109e06ac412f95399b704d3d6950e386b7994475b231cf61eec2fc1f", size = 3983133 }, - { url = "https://files.pythonhosted.org/packages/82/56/993b7104cb8345ad7d4516538ccf8f0d0ac640b1ebd8c754a7b024e76878/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ba34475ceb08cccbdd98f6b46916917ae6eeb92b5ae111df10b544c3a4621dc4", size = 3652383 }, - { url = "https://files.pythonhosted.org/packages/2d/ac/eaeb6029362fd8d454a27374d84c6866c82c33bfc24587b4face5a8e43ef/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:b31e90fdd0f968c2de3b26ab014314fe814225b6c324f770952f7d38abf17e3c", size = 3298168 }, - { url = "https://files.pythonhosted.org/packages/2b/39/50c3facc66bded9ada5cbc0de867499a703dc6bca6be03070b4e3b65da6c/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:d526864e0f67f74937a8fce859bd56c979f5e2ec57ca7c627f5f1071ef7fee60", size = 3044712 }, - { url = "https://files.pythonhosted.org/packages/9c/8e/b7de019a1f562f72ada81081a12823d3c1590bedc48d7d2559410a2763fe/psycopg2_binary-2.9.11-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:04195548662fa544626c8ea0f06561eb6203f1984ba5b4562764fbeb4c3d14b1", size = 3347549 }, - { url = "https://files.pythonhosted.org/packages/80/2d/1bb683f64737bbb1f86c82b7359db1eb2be4e2c0c13b947f80efefa7d3e5/psycopg2_binary-2.9.11-cp313-cp313-win_amd64.whl", hash = "sha256:efff12b432179443f54e230fdf60de1f6cc726b6c832db8701227d089310e8aa", size = 2714215 }, - { url = "https://files.pythonhosted.org/packages/64/12/93ef0098590cf51d9732b4f139533732565704f45bdc1ffa741b7c95fb54/psycopg2_binary-2.9.11-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:92e3b669236327083a2e33ccfa0d320dd01b9803b3e14dd986a4fc54aa00f4e1", size = 3756567 }, - { url = "https://files.pythonhosted.org/packages/7c/a9/9d55c614a891288f15ca4b5209b09f0f01e3124056924e17b81b9fa054cc/psycopg2_binary-2.9.11-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:e0deeb03da539fa3577fcb0b3f2554a97f7e5477c246098dbb18091a4a01c16f", size = 3864755 }, - { url = "https://files.pythonhosted.org/packages/13/1e/98874ce72fd29cbde93209977b196a2edae03f8490d1bd8158e7f1daf3a0/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b52a3f9bb540a3e4ec0f6ba6d31339727b2950c9772850d6545b7eae0b9d7c5", size = 4411646 }, - { url = "https://files.pythonhosted.org/packages/5a/bd/a335ce6645334fb8d758cc358810defca14a1d19ffbc8a10bd38a2328565/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:db4fd476874ccfdbb630a54426964959e58da4c61c9feba73e6094d51303d7d8", size = 4468701 }, - { url = "https://files.pythonhosted.org/packages/44/d6/c8b4f53f34e295e45709b7568bf9b9407a612ea30387d35eb9fa84f269b4/psycopg2_binary-2.9.11-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:47f212c1d3be608a12937cc131bd85502954398aaa1320cb4c14421a0ffccf4c", size = 4166293 }, - { url = "https://files.pythonhosted.org/packages/4b/e0/f8cc36eadd1b716ab36bb290618a3292e009867e5c97ce4aba908cb99644/psycopg2_binary-2.9.11-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e35b7abae2b0adab776add56111df1735ccc71406e56203515e228a8dc07089f", size = 3983184 }, - { url = "https://files.pythonhosted.org/packages/53/3e/2a8fe18a4e61cfb3417da67b6318e12691772c0696d79434184a511906dc/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fcf21be3ce5f5659daefd2b3b3b6e4727b028221ddc94e6c1523425579664747", size = 3652650 }, - { url = "https://files.pythonhosted.org/packages/76/36/03801461b31b29fe58d228c24388f999fe814dfc302856e0d17f97d7c54d/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:9bd81e64e8de111237737b29d68039b9c813bdf520156af36d26819c9a979e5f", size = 3298663 }, - { url = "https://files.pythonhosted.org/packages/97/77/21b0ea2e1a73aa5fa9222b2a6b8ba325c43c3a8d54272839c991f2345656/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:32770a4d666fbdafab017086655bcddab791d7cb260a16679cc5a7338b64343b", size = 3044737 }, - { url = "https://files.pythonhosted.org/packages/67/69/f36abe5f118c1dca6d3726ceae164b9356985805480731ac6712a63f24f0/psycopg2_binary-2.9.11-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c3cb3a676873d7506825221045bd70e0427c905b9c8ee8d6acd70cfcbd6e576d", size = 3347643 }, - { url = "https://files.pythonhosted.org/packages/e1/36/9c0c326fe3a4227953dfb29f5d0c8ae3b8eb8c1cd2967aa569f50cb3c61f/psycopg2_binary-2.9.11-cp314-cp314-win_amd64.whl", hash = "sha256:4012c9c954dfaccd28f94e84ab9f94e12df76b4afb22331b1f0d3154893a6316", size = 2803913 }, -] - [[package]] name = "pydantic" version = "2.12.3"