diff --git a/memory_scope/memory/worker/read/extract_time_worker.yaml b/memory_scope/memory/worker/read/extract_time_worker.yaml index 017caa8a..b44e8bbf 100644 --- a/memory_scope/memory/worker/read/extract_time_worker.yaml +++ b/memory_scope/memory/worker/read/extract_time_worker.yaml @@ -1,6 +1,9 @@ extract_time_system: cn: | - 任务指令:从语句与语句发生的时间,推断并提取语句内容中指向的时间段。回答尽可能完整的时间段。回答的格式严格遵照示例中的已有格式规范。 + 任务指令:从语句与语句发生的时间,推断并提取语句内容中指向的时间段。回答尽可能完整的时间段。回答的格式严格遵照示例中的已有格式规范。若语句不涉及时间则回答无。 + + en: | + Instructions: From the sentences and the time when they occurred, infer and extract the time periods indicated in the content of the sentences. Answer with the most complete time periods possible. The format of the answers must strictly adhere to the specifications in the examples provided. If the sentence does not involve time, respond with "none." extract_time_few_shot: @@ -47,6 +50,60 @@ extract_time_few_shot: 回答: - 年:1995 - 月:10 - 日:24 + 示例8: + 句子:我的朋友非常喜欢运动,他认为运动有助于增强身体素质。 + 时间:2015年1月23日,2015年第4周,周四,7时38分0秒。 + 回答: + 无 + + en: | + Example 1: + Sentence: I remember you went to the UAE in April the year before last. Which places in the UAE are fun? Which do you prefer, Dubai or Abu Dhabi? Are the desert views spectacular? + Time: August 20, 1992, 34th week of 1992, Monday, 18:46:25. + Answer: + - Year: 1990 - Month: 4 + + Example 2: + Sentence: Remember to attend the meeting at 3 PM the day after tomorrow. I carefully marked this important day on my calendar to remind myself not to miss it. The meeting will be held in the company conference room, and it's an important opportunity to discuss future development directions. + Time: June 19, 2024, 25th week of 2024, Tuesday, 13:30:0. + Answer: + - Year: 2024 - Month: 6 - Day: 21 - Hour: 15 + + Example 3: + Sentence: Next month on the first Saturday, let's go to Hangzhou. + Time: July 15, 2005, 28th week of 2005, Saturday, 0:0:0. + Answer: + - Year: 2005 - Month: 8 - Week: 31 - Day of Week: 6 + + Example 4: + Sentence: The small town we visited last weekend was truly beautiful. + Time: December 2, 1999, 48th week of 1999, Tuesday, 8:40:10. + Answer: + - Year: 1999 - Week: 47 - Day of Week: 6, 7 + + Example 5: + Sentence: The presentation will start in half an hour, remember to prepare the materials. + Time: June 22, 2020, 25th week of 2020, Monday, 9:30:0 + Answer: + - Year: 2020 - Month: 6 - Day: 22 - Hour: 10 - Minute: 0 - Second: 0 + + Example 6: + Sentence: The start time for the 10,000-meter race was 3 minutes and 47 seconds ago. + Time: February 17, 1987, 7th week of 1987, Wednesday, 19:54:43. + Answer: + - Year: 1987 - Month: 2 - Day: 17 - Hour: 19 - Minute: 50 - Second: 56 + + Example 7: + Sentence: At this time last month, we were still preparing for the concert. Every day was busy and fulfilling, and we worked hard for the successful holding of the concert. Rehearsals, set design, and program arrangements - every detail needed careful planning and preparation. + Time: November 24, 1995, 48th week of 1995, Tuesday, 17:45:0. + Answer: + - Year: 1995 - Month: 10 - Day: 24 + + Example 8: + Sentence: My friend loves sports very much and believes that exercise helps improve physical fitness. + Time: January 23, 2015, 4th week of 2015, Thursday, 7:38:0. + Answer: + None extract_time_user_query: @@ -55,6 +112,10 @@ extract_time_user_query: 时间:{query_time_str} 回答: + en: | + Sentence: {query} + Time: {query_time_str} + Answer: time_string_format: cn: | diff --git a/memory_scope/memory/worker/summary/long_contra_repeat_prompt.yaml b/memory_scope/memory/worker/summary/long_contra_repeat_prompt.yaml index d344eb6f..0fc7e640 100644 --- a/memory_scope/memory/worker/summary/long_contra_repeat_prompt.yaml +++ b/memory_scope/memory/worker/summary/long_contra_repeat_prompt.yaml @@ -1,11 +1,18 @@ long_contra_repeat_system: cn: | 对下面的{num_obs}句句子,逐一判断是否与“前面序号”的任意句子存在信息的矛盾,或者句子的主要信息被“前面序号”的任意句子中的信息包含。只判断与“前面序号”的句子的关系。 - 如果句子与前面序号的句子存在矛盾,则以前面序号的句子中的信息为准,修改句子中矛盾的部分。 + 对每个句子都做一个判断,最后一共输出{num_obs}条判断。如果句子与前面序号的句子存在矛盾,则以前面序号的句子中的信息为准,修改句子中矛盾的部分。 请一步步思考,并按如下格式输出: 思考:思考的依据和过程,30字以内。 判断:<句子序号> <矛盾,被包含,无> <修改后的内容>,一定加<> + en: | + For the following {num_obs} sentences, determine one by one if there is any contradiction with the information in any "previously numbered" sentences, or if the main information of the sentence is contained within the information of any "previously numbered" sentences. Only evaluate the relation to "previously numbered" sentences. + Make an evaluation for each sentence, resulting in a total of {num_obs} evaluations. If the sentence conflicts with a "previously numbered" sentence, the information in the earlier sentence takes precedence, and the conflicting part of the current sentence should be modified accordingly. + Please think step by step and output in the following format: + Thought: The basis and process of the thought, within 30 words. + Evaluation: , , enclosed in <>. + long_contra_repeat_few_shot: cn: | @@ -50,6 +57,47 @@ long_contra_repeat_few_shot: 思考:第6句中所有信息都被前面序号中第5句的信息完全包含。 判断:<2> <被包含> <> + en: | + Example 1 + Sentences: + 1 {user_name} suffers from insomnia frequently and is interested in the effects of sleeping pills, suggesting a possible consideration of their use. + 2 {user_name} suffers from insomnia frequently and seeks remedies. + 3 Charles is {user_name}'s supervisor. + 4 Charles is {user_name}'s supervisor. + 5 Charles is {user_name}'s supervisor and the branch manager of a bank. + Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences. + Evaluation: <1> <> + Thought: All information in the second sentence is completely contained within the information of the first sentence. + Evaluation: <2> <> + Thought: The information in the third sentence does not appear in the previously numbered sentences. + Evaluation: <3> <> + Thought: The fourth sentence is completely repetitive of the information in the third sentence, i.e., it is completely contained. + Evaluation: <4> <> + Thought: The information that Charles is {user_name}'s supervisor in the fifth sentence is contained within the information of the third sentence, but the new information that Charles is the branch manager of a bank is not, so it is not contained. + Evaluation: <5> <> + + Example 2 + Sentences: + 1 {user_name}'s child does not perform well academically. + 2 {user_name}'s child often skips school. + 3 {user_name}'s father's birthday is on June 2, 2024, and {user_name} plans to prepare a gift. + 4 {user_name}'s father's birthday is on May 1, 2024. + 5 {user_name} loves playing basketball with classmates. + 6 {user_name} likes playing basketball. + + Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences. + Evaluation: <1> <> + Thought: The second sentence neither contradicts nor repeats any of the previously numbered sentences. + Evaluation: <2> <> + Thought: The third sentence neither contradicts nor repeats any of the previously numbered sentences. + Evaluation: <3> <> + Thought: The date of {user_name}'s father's birthday in the fourth sentence contradicts the information in the third sentence. + Evaluation: <4> <{user_name}'s father's birthday is on June 2, 2024.> + Thought: The fifth sentence neither contradicts nor repeats any of the previously numbered sentences. + Evaluation: <5> <> + Thought: All information in the sixth sentence is completely contained within the information of the fifth sentence. + Evaluation: <6> <> + long_contra_repeat_user_query: cn: | 句子: diff --git a/memory_scope/memory/worker/write/contra_repeat_worker.yaml b/memory_scope/memory/worker/write/contra_repeat_worker.yaml index cb8422e9..975e03f5 100644 --- a/memory_scope/memory/worker/write/contra_repeat_worker.yaml +++ b/memory_scope/memory/worker/write/contra_repeat_worker.yaml @@ -11,7 +11,7 @@ contra_repeat_system: Make an evaluation for each sentence, resulting in a total of {num_obs} evaluations. Please think step by step and output in the following format: Thought: The basis and process of the thought, within 30 words. - Evaluation: , enclosed in <>. + Evaluation: , enclosed in <>. contra_repeat_few_shot: diff --git a/memory_scope/memory/worker/write/get_observation_with_time_worker.yaml b/memory_scope/memory/worker/write/get_observation_with_time_worker.yaml index 4f7665d1..be26e305 100644 --- a/memory_scope/memory/worker/write/get_observation_with_time_worker.yaml +++ b/memory_scope/memory/worker/write/get_observation_with_time_worker.yaml @@ -4,7 +4,7 @@ time_string_format: get_observation_with_time_system: cn: | - 任务:从下面的{num_obs}句{user_name}句子中依次提取出关于{user_name}的重要信息,相应的关键词与时间信息。 + 任务指令:从下面的{num_obs}句{user_name}句子中依次提取出关于{user_name}的重要信息,相应的关键词与时间信息。 每一句{user_name}句子的格式是:<序号> <对话时间> {user_name}:<句子> 对每一句句子,只提取非常明确的信息和进行非常确定的推断,不要进行任何猜测。不要提取重复的信息,如果句子中的所有信息与已经提取出的信息重复了则回答“重复“,如果没有重要信息则回答“无”。 如果{user_name}信息涉及时间,则结合对话时间推断{user_name}信息的时间信息,没有则不输出。注意区分,对于句子中包含{user_name}假设的信息或者{user_name}虚构的内容比如{user_name}创作的小说或剧本,不要提取信息。 @@ -13,6 +13,16 @@ get_observation_with_time_system: 思考:思考的依据和过程,50字以内。 信息:<句子序号> <时间信息或“无”> <明确的重要信息或“重复”或”无“> <关键词> + en: | + Instruction: Extract important information about {user_name}, corresponding keywords, and time information from the following {num_obs} sentences by {user_name}, one by one. + Each sentence from {user_name} is formatted as: {user_name}: + For each sentence, only extract very clear information and make very certain inferences without any speculation. Do not extract repeated information. If all information in the sentence repeats what has already been extracted, respond with "repeat." If there is no important information, respond with "none." + If the information about {user_name} involves time, combine it with the conversation time to infer the time information of {user_name}'s information; if not, do not output time information. Be sure to distinguish information; for example, do not extract hypothetical or fictional content from {user_name} such as {user_name}'s novels or scripts. + Perform information extraction for each sentence, resulting in a total of {num_obs} pieces of information. + Please think step by step, and be sure to output in the following format, with the final output enclosed in <>: + Thought: The basis and process of the thought, within 50 words. + Information: