reme-ai 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reme_ai/__init__.py +1 -1
- reme_ai/config/default.yaml +147 -0
- reme_ai/retrieve/personal/extract_time_prompt.yaml +135 -0
- reme_ai/retrieve/personal/print_memory_prompt.yaml +22 -0
- reme_ai/retrieve/task/build_query_prompt.yaml +6 -0
- reme_ai/retrieve/task/rerank_memory_prompt.yaml +25 -0
- reme_ai/retrieve/task/rewrite_memory_prompt.yaml +34 -0
- reme_ai/summary/personal/contra_repeat_prompt.yaml +127 -0
- reme_ai/summary/personal/get_observation_prompt.yaml +163 -0
- reme_ai/summary/personal/get_observation_with_time_prompt.yaml +158 -0
- reme_ai/summary/personal/get_reflection_subject_prompt.yaml +179 -0
- reme_ai/summary/personal/info_filter_op.py +7 -2
- reme_ai/summary/personal/info_filter_prompt.yaml +172 -0
- reme_ai/summary/personal/long_contra_repeat_prompt.yaml +120 -0
- reme_ai/summary/personal/update_insight_prompt.yaml +149 -0
- reme_ai/summary/task/comparative_extraction_prompt.yaml +79 -0
- reme_ai/summary/task/failure_extraction_prompt.yaml +42 -0
- reme_ai/summary/task/memory_validation_prompt.yaml +29 -0
- reme_ai/summary/task/simple_comparative_summary_prompt.yaml +32 -0
- reme_ai/summary/task/simple_summary_prompt.yaml +31 -0
- reme_ai/summary/task/success_extraction_prompt.yaml +42 -0
- reme_ai/summary/task/trajectory_segmentation_prompt.yaml +31 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/METADATA +3 -6
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/RECORD +28 -8
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/WHEEL +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/entry_points.txt +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,163 @@
|
|
1
|
+
get_observation_system_zh: |
|
2
|
+
任务:从下面的{num_obs}句{user_name}句子中依次提取出关于{user_name}的重要信息,与相应的关键词。如果没有重要信息则回答“无”,最多提取{num_obs}条信息。
|
3
|
+
{user_name}的重要信息可以包含用户基本信息,用户画像信息,用户兴趣偏好信息,用户性格,用户价值观,用户人际关系,用户重大事件转折点等等重要信息。
|
4
|
+
如果句子中只包含{user_name}假设的信息或者{user_name}虚构的内容比如{user_name}创作的小说或剧本,回答“无”。
|
5
|
+
对每个句子都做一次信息提取,最后一共输出{num_obs}条信息。
|
6
|
+
请一步步思考,并一定要按如下格式依次输出,最后的结果一定要加<>:
|
7
|
+
思考:思考的依据和过程,50字以内。
|
8
|
+
信息:<句子序号> <> <明确的重要信息或“无”> <关键词>
|
9
|
+
|
10
|
+
|
11
|
+
get_observation_system: |
|
12
|
+
Task: Sequentially extract important information about {user_name} from the following {num_obs} sentences along with corresponding keywords. If there is no important information, answer "None". Extract up to {num_obs} pieces of information.
|
13
|
+
Important information about {user_name} can include basic information, user profile information, user interests and preferences, user personality, user values, user relationships, major turning points in the user's life, and other important information.
|
14
|
+
If the sentence only contains hypothetical information about {user_name} or fictional content created by {user_name} such as novels or scripts, respond "None".
|
15
|
+
Perform information extraction for each sentence, and output {num_obs} pieces of information in total.
|
16
|
+
Please think step-by-step, and be sure to output in the following format, ending with '<>':
|
17
|
+
Thought: Basis and process of thinking, within 50 words.
|
18
|
+
Information: <Sentence number> <> <Clear important information or "None"> <Keywords>
|
19
|
+
|
20
|
+
|
21
|
+
get_observation_few_shot_zh: |
|
22
|
+
示例1:
|
23
|
+
{user_name}句子:
|
24
|
+
1 {user_name}:我现在处境很糟,没有工作,负债几万,怎么办
|
25
|
+
2 {user_name}:有人说兴趣是最好的老师,也建议兴趣和职业联系起来,但我发现喜欢打篮球的人很多,但靠打篮球成职业的稀少,赚钱的更少,此外,怎么分辨兴趣和喜欢
|
26
|
+
3 {user_name}:我现在心情很糟糕
|
27
|
+
4 {user_name}:我是一个刚毕业的学生,对社会,行业不了解,给我介绍一下社会系统和行业格局
|
28
|
+
5 {user_name}:我花5000元买了100股海天味业。
|
29
|
+
6 {user_name}:我花50000元买了100股阿里巴巴。
|
30
|
+
思考:从第1句可以得知{user_name}现在没有工作,负债几万,这是关于{user_name}工作与经济状况的重要信息。
|
31
|
+
信息:<1> <> <{user_name}当前无工作且负债几万> <无工作, 负债几万>
|
32
|
+
思考:第2句是{user_name}对他人观点的讨论和疑问,没有明确提及{user_name}个人信息。
|
33
|
+
信息:<2> <> <无> <>
|
34
|
+
思考:从第3句可以得知{user_name}当前心情不好。
|
35
|
+
信息:<3> <> <{user_name}当前心情不好> <心情>
|
36
|
+
思考:从第4句可以得知{user_name}是一个刚毕业的学生,这是关于{user_name}身份背景状况的重要信息。其余信息重要性不足。
|
37
|
+
信息:<4> <> <{user_name}是一名刚毕业的学生。> <刚毕业, 学生>
|
38
|
+
思考:从第5句可以得知{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元,这是关于{user_name}的投资决策的重要信息。
|
39
|
+
信息:<5> <> <{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元。> <海天味业, 股票>
|
40
|
+
思考:第6句含有的信息与第1句相似,可以得知{user_name}购买了阿里巴巴股票。
|
41
|
+
信息:<6> <> <{user_name}购买了阿里巴巴股票,购买数量为100股,购买金额为50000元。> <阿里巴巴, 股票>
|
42
|
+
|
43
|
+
示例2:
|
44
|
+
{user_name}句子:
|
45
|
+
1 {user_name}:帮我写一段给同事张三女儿三岁生日的祝福语。
|
46
|
+
2 {user_name}:能给我整理一张如何使用大模型的技巧列表吗,要求内容尽量精简。
|
47
|
+
3 {user_name}:两个坏消息,我打羽毛球把拍子打断线了。。。然后我去我朋友家撸猫,结果我猫毛过敏,今天疯狂打喷嚏。。。
|
48
|
+
4 {user_name}:公元1400年至1550年中国历史大事表。
|
49
|
+
5 {user_name}:谢啦。我中午在公司附近吃,帮我推荐一家阿里巴巴徐汇滨江园区附近的餐厅吧。
|
50
|
+
思考:从第1句可以得知张三是{user_name}的同事,这是关于{user_name}的人际关系的重要信息。其余信息重要性不足。
|
51
|
+
信息:<1> <> <张三是{user_name}的同事。> <张三, 同事>
|
52
|
+
思考:第2句是{user_name}提出的要求,没有明确提及{user_name}个人信息。
|
53
|
+
信息:<2> <> <无> <>
|
54
|
+
思考:从第3句可以得知{user_name}前天打羽毛球时把球拍打断了线,但这不是重要的信息。还可以得知{user_name}对猫毛过敏,这是关于{user_name}的健康的重要信息。
|
55
|
+
信息:<3> <> <{user_name}对猫毛过敏。> <猫毛, 过敏>
|
56
|
+
思考:从第4句是{user_name}提出的要求,没有明确提及{user_name}个人信息。
|
57
|
+
信息:<4> <> <无> <>
|
58
|
+
思考:从第5句可以得知{user_name}在阿里巴巴徐汇滨江园区工作,这是关于{user_name}的工作地点的重要信息。
|
59
|
+
信息:<5> <> <{user_name}在阿里巴巴徐汇滨江园区工作。> <阿里巴巴, 徐汇滨江园区, 工作>
|
60
|
+
|
61
|
+
示例3:
|
62
|
+
{user_name}句子:
|
63
|
+
1 {user_name}:我想买辆新能源汽车,有什么推荐吗?
|
64
|
+
2 {user_name}:我在上海,想买辆新能源汽车,有什么推荐吗?
|
65
|
+
3 {user_name}:案外人异议审查期间,人民法院不得对执行标的进行处分,不就是中止执行的意思吗?
|
66
|
+
4 {user_name}:请写两句藏头诗分别以“胜”和“利”开头。
|
67
|
+
5 {user_name}:我花5000元买了100股海天味业。
|
68
|
+
6 {user_name}:李增杰:这个是星座蛙设,但是我是处女座的,我妈感觉因为我的不正常,我妈不让我看了\n雌猴摸了摸李增杰的头,这样啊\n雌猴打开了哔哩哔哩看了看\n雌猴:要不换个设吧,我听你未来的你说,有一个叫难忘的朱古力232这个人,他弄的设是Windows设\n这是剧本1,剧本2未完待续
|
69
|
+
思考:从第1句可以得知{user_name}寻求购买新能源汽车的建议或推荐,这是这是关于{user_name}的大宗消费的重要的信息。
|
70
|
+
信息:<1> <> <{user_name}寻求购买新能源汽车的建议或推荐。> <购买, 新能源汽车>
|
71
|
+
思考:从第2句可以得知{user_name}当前所在城市为上海,这是关于{user_name}的生活地区的重要信息。
|
72
|
+
信息:<2> <> <{user_name}所在的城市是上海。> <上海>
|
73
|
+
思考:第3句是{user_name}对某个观点的讨论和疑问,没有明确提及{user_name}个人信息。
|
74
|
+
信息:<3> <> <无> <>
|
75
|
+
思考:第4句是{user_name}提出的要求,没有明确提及{user_name}个人信息。
|
76
|
+
信息:<4> <> <无> <>
|
77
|
+
思考:从第5句可以得知{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元,这是关于{user_name}的投资决策的重要信息。
|
78
|
+
信息:<5> <> <{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元。> <海天味业, 股票>
|
79
|
+
思考:第6句是{user_name}创作的剧本内容,无法提取{user_name}个人信息。
|
80
|
+
信息:<6> <> <无> <>
|
81
|
+
|
82
|
+
示例4:
|
83
|
+
{user_name}句子:
|
84
|
+
1 {user_name}:李子好酸啊,我不太喜欢吃。
|
85
|
+
2 {user_name}:桃子上的毛太多了,我不爱吃他。
|
86
|
+
思考:从第1句可以得知{user_name}不太喜欢吃李子。
|
87
|
+
信息:<1> <> <{user_name}不喜欢吃李子。> <李子>
|
88
|
+
思考:从第2句可以得知{user_name}不喜欢吃桃子,和上一句相似都是对某一种水果不喜欢,但是表达了不同的信息。
|
89
|
+
信息:<2> <> <{user_name}不喜欢吃桃子。> <西瓜>
|
90
|
+
|
91
|
+
|
92
|
+
get_observation_few_shot: |
|
93
|
+
Example 1:
|
94
|
+
{user_name} sentences:
|
95
|
+
1 {user_name}: I'm in a terrible situation right now, I don't have a job, and I'm in debt by tens of thousands. What should I do?
|
96
|
+
2 {user_name}: Someone said that passion is the best teacher and suggested linking passion with a career, but I found that many people like playing basketball, but few make it a profession and even fewer make money from it. Also, how do you distinguish passion from liking?
|
97
|
+
3 {user_name}: I'm in a terrible situation right now, I don't have a job, and I'm in debt by tens of thousands. What should I do?
|
98
|
+
4 {user_name}: I'm a recent graduate who doesn't understand society or the industry. Can you introduce me to the social system and industry structure?
|
99
|
+
5 {user_name}: I spent $5000 to buy 100 shares of General Motors.
|
100
|
+
6 {user_name}: I spent $50000 to buy 100 shares of Alibaba.
|
101
|
+
|
102
|
+
Thought: From the first sentence, it can be inferred that {user_name} currently has no job and is in debt by tens of thousands. This is important information about {user_name}'s employment and financial status.
|
103
|
+
Information: <1> <> <{user_name} currently has no job and is in debt by tens of thousands> <no job, in debt by tens of thousands>
|
104
|
+
Thought: The second sentence is a discussion and query about others' opinions by {user_name}, with no clear mention of {user_name}'s personal information.
|
105
|
+
Information: <2> <> <None> <>
|
106
|
+
Thought: The information in the third sentence is a repeat of the first sentence.
|
107
|
+
Information: <3> <> <Repeat> <>
|
108
|
+
Thought: From the fourth sentence, it can be inferred that {user_name} is a recent graduate, which is important information about {user_name}'s background. The remaining information is of insufficient importance.
|
109
|
+
Information: <4> <> <{user_name} is a recent graduate> <recent graduate, student>
|
110
|
+
Thought: It can be inferred that {user_name} bought 100 shares of General Motors stock for $5000. This is important information about {user_name}'s investment decision.
|
111
|
+
Information: <5> <> <{user_name} bought 100 shares of General Motors stock for $5000> <General Motors, stock>
|
112
|
+
Thought: The information of the sentence is similar to, but not a repetition of the sentence before. It can be deduced that {user_name} purchased Alibaba stock.
|
113
|
+
Information: <6> <> <{user_name} purchased 100 shares of Alibaba stock for 50,000 RMB.> <Alibaba, stock>
|
114
|
+
|
115
|
+
Example 2:
|
116
|
+
{user_name} sentences:
|
117
|
+
1 {user_name}: Please help me write a birthday greeting for my colleague Jason's daughter who is turning three.
|
118
|
+
2 {user_name}: Can you compile a list of tips on how to use large models for me, and try to keep the content concise?
|
119
|
+
3 {user_name}: Two pieces of bad news: I broke my badminton racket while playing... Then I went to my friend's house to pet the cat and ended up having an allergic reaction to the cat fur, sneezing like crazy today...
|
120
|
+
4 {user_name}: Chronology of major events in Chinese history from 1400 to 1550 AD.
|
121
|
+
5 {user_name}: Thanks. I'm having lunch near the company at noon; can you recommend a restaurant near Alibaba Xuhui Riverside Campus for me?
|
122
|
+
Thought: From the first sentence, it can be inferred that Zhang San is {user_name}'s colleague, which is important information about {user_name}'s interpersonal relationships. The remaining information is of insufficient importance.
|
123
|
+
Information: <1> <> <Jason is {user_name}'s colleague> <Jason, colleague>
|
124
|
+
Thought: The second sentence is a request made by {user_name}, with no clear mention of {user_name}'s personal information.
|
125
|
+
Information: <2> <> <None> <>
|
126
|
+
Thought: From the third sentence, it can be inferred that {user_name} broke their badminton racket the other day, but this is not important information. It can also be inferred that {user_name} is allergic to cat fur, which is important information about {user_name}'s health.
|
127
|
+
Information: <3> <> <{user_name} is allergic to cat fur> <cat fur, allergy>
|
128
|
+
Thought: The fourth sentence is a request made by {user_name}, with no clear mention of {user_name}'s personal information.
|
129
|
+
Information: <4> <> <None> <>
|
130
|
+
Thought: From the fifth sentence, it can be inferred that {user_name} works at Alibaba Xuhui Riverside Campus, which is important information about {user_name}'s workplace.
|
131
|
+
Information: <5> <> <{user_name} works at Alibaba Xuhui Riverside Campus> <Alibaba, Xuhui Riverside Campus, work>
|
132
|
+
|
133
|
+
Example 3:
|
134
|
+
{user_name} sentences:
|
135
|
+
1 {user_name}: I want to buy a new energy vehicle. Any recommendations?
|
136
|
+
2 {user_name}: I'm in San Jose and want to buy a new energy vehicle. Any recommendations?
|
137
|
+
3 {user_name}: During the objection review period by a third party, the court must not dispose of the execution object. Doesn't this mean suspension of execution?
|
138
|
+
4 {user_name}: Please write two acrostic poems, starting with "Victory" and "Success".
|
139
|
+
5 {user_name}: I spent $5000 to buy 100 shares of General Motors.
|
140
|
+
6 {user_name}: Zack: This is a constellation frog setting, but I am a Virgo. My mom feels I'm abnormal and doesn't let me watch it. \n The female monkey patted Zack's head, "Is that so?" \n The female monkey opened Bilibili and took a look. \n Female monkey: "Why don't you switch the setting? I heard from your future self that there is someone called 'Unforgettable Chocolate 232' who created a Windows setting." \n This is script 1; script 2 is to be continued.
|
141
|
+
Thought: From the first sentence, it can be inferred that {user_name} is seeking advice or recommendations for purchasing a new energy vehicle. This is important information about {user_name}'s major consumption.
|
142
|
+
Information: <1> <> <{user_name} is seeking advice or recommendations for purchasing a new energy vehicle> <purchase, new energy vehicle>
|
143
|
+
Thought: From the second sentence, it can be inferred that {user_name} is currently in San Jose, which is important information about {user_name}'s living location. The remaining information is a repeat of the first sentence.
|
144
|
+
Information: <2> <> <{user_name} is currently in San Jose> <San Jose>
|
145
|
+
Thought: The third sentence is a discussion and query about a specific legal opinion by {user_name}, with no clear mention of {user_name}'s personal information.
|
146
|
+
Information: <3> <> <None> <>
|
147
|
+
Thought: The fourth sentence is a request made by {user_name}, with no clear mention of {user_name}'s personal information.
|
148
|
+
Information: <4> <> <None> <>
|
149
|
+
Thought: From the fifth sentence, it can be inferred that {user_name} bought 100 shares of General Motors stock for $5000. This is important information about {user_name}'s investment decision.
|
150
|
+
Information: <5> <> <{user_name} bought 100 shares of General Motors stock for $5000> <General Motors, stock>
|
151
|
+
Thought: The sixth sentence is content from a script written by {user_name}, with no extractable personal information about {user_name}.
|
152
|
+
Information: <6> <> <None> <>
|
153
|
+
|
154
|
+
|
155
|
+
get_observation_user_query_zh: |
|
156
|
+
{user_name}句子:
|
157
|
+
{user_query}
|
158
|
+
|
159
|
+
|
160
|
+
get_observation_user_query: |
|
161
|
+
{user_name} sentences:
|
162
|
+
{user_query}
|
163
|
+
|
@@ -0,0 +1,158 @@
|
|
1
|
+
time_string_format_zh: |
|
2
|
+
{year}年{month}{day}日{weekday}{hour}点
|
3
|
+
|
4
|
+
|
5
|
+
time_string_format: |
|
6
|
+
{month} {day}, {year}, {weekday}, at {hour}
|
7
|
+
|
8
|
+
|
9
|
+
get_observation_with_time_system_zh: |
|
10
|
+
任务:从下面的{num_obs}句{user_name}句子中依次提取出关于{user_name}的重要信息,相应的关键词与时间信息。如果没有重要信息则回答“无”,最多提取{num_obs}条信息。
|
11
|
+
每一句{user_name}句子的格式是:<序号> <对话时间> {user_name}:<句子>
|
12
|
+
{user_name}的重要信息可以包含用户基本信息,用户画像信息,用户兴趣偏好信息,用户性格,用户价值观,用户人际关系,用户重大事件转折点等等重要信息。
|
13
|
+
如果句子中只包含{user_name}假设的信息或者{user_name}虚构的内容比如{user_name}创作的小说或剧本,回答“无”。
|
14
|
+
如果{user_name}信息涉及时间,则结合对话时间推断{user_name}信息的时间信息,没有则不输出。
|
15
|
+
对每个句子都做一次信息提取,最后一共输出{num_obs}条信息。
|
16
|
+
请一步步思考,并一定要按如下格式依次输出,最后的结果一定要加<>:
|
17
|
+
思考:思考的依据和过程,50字以内。
|
18
|
+
信息:<句子序号> <时间信息或不输出> <明确的重要信息或“无”> <关键词>
|
19
|
+
|
20
|
+
|
21
|
+
get_observation_with_time_system: |
|
22
|
+
Task: Extract important information about {user_name} from the following {num_obs} sentences of {user_name}, including relevant keywords and time information. If there is no important information, answer "none", with a maximum of {num_obs} pieces of information extracted.
|
23
|
+
Each sentence from {user_name} is formatted as follows: <serial number> <conversation time> {user_name}: <sentence>.
|
24
|
+
Important information about {user_name} can include basic information, user profile information, interest preferences, personality, values, human relationships, significant life events, etc.
|
25
|
+
If a sentence only contains hypothetical information or fictional content created by {user_name} (e.g., novels or scripts), answer "none".
|
26
|
+
If {user_name}'s information involves time, infer the time information based on the conversation time; if not, do not output.
|
27
|
+
Analyze each sentence once to extract information and output a total of {num_obs} pieces of information.
|
28
|
+
Please think step-by-step and be sure to output in the following format, with the final results enclosed in <>:
|
29
|
+
Thought: Basis and process of thought, within 50 words.
|
30
|
+
Information: <Sentence Number> <Time information or do not output> <Clear important information or "None"> <Keywords>
|
31
|
+
|
32
|
+
|
33
|
+
get_observation_with_time_few_shot_zh: |
|
34
|
+
示例1:
|
35
|
+
{user_name}句子:
|
36
|
+
1 2022年5月1日周二3点 {user_name}:帮我写一段给同事张三女儿三岁生日的祝福语。
|
37
|
+
2 2022年5月2日周二17点 {user_name}:公元1400年至1550年中国历史大事表。
|
38
|
+
3 2022年5月3日周二18点 {user_name}:能给我整理一张如何使用大模型的技巧列表吗,要求内容尽量精简。
|
39
|
+
4 2022年7月3日周四12点 {user_name}:上上个月我办了游泳卡。
|
40
|
+
|
41
|
+
思考:从第1句可以得知张三是{user_name}的同事,这是关于{user_name}的人际关系的重要信息。其余信息重要性不足。{user_name}信息不涉及时间。
|
42
|
+
信息:<1> <> <张三是{user_name}的同事。> <张三, 同事>
|
43
|
+
思考:第2句是{user_name}提出的要求,没有明确提及{user_name}个人信息。
|
44
|
+
信息:<2> <> <无> <>
|
45
|
+
思考:第3句是{user_name}提出的要求,没有明确提及{user_name}个人信息。
|
46
|
+
信息:<3> <> <无> <>
|
47
|
+
思考:从第4句可以得出{user_name}上上个月办了游泳卡。{user_name}信息涉及时间,结合对话时间为2022年7月,推断{user_name}在2022年5月{user_name}办了游泳卡。
|
48
|
+
信息:<4> <2022年5月> <{user_name}在2022年5月办了游泳卡。> <游泳卡>
|
49
|
+
|
50
|
+
|
51
|
+
示例2:
|
52
|
+
{user_name}句子:
|
53
|
+
1 2020年1月4日周日10点 {user_name}:我花5000元买了100股海天味业。
|
54
|
+
2 2023年4月27日周五8点 {user_name}:明天是我和妻子的结婚纪念日,帮我推荐一家餐厅。
|
55
|
+
3 2020年1月4日周日10点 {user_name}:我花50000元买了100股阿里巴巴股票。
|
56
|
+
4 2021年6月2日周四23点 {user_name}:谢啦。我中午在公司附近吃,帮我推荐一家阿里巴巴徐汇滨江园区附近的餐厅吧。
|
57
|
+
5 2021年7月9日周六11点 {user_name}:两个坏消息,我打羽毛球把拍子打断线了。。。然后我去我朋友家撸猫,结果我猫毛过敏,今天疯狂打喷嚏。。。
|
58
|
+
|
59
|
+
思考:从第1句可以得知{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元,这是关于{user_name}的投资决策的重要信息。{user_name}信息不涉及时间。
|
60
|
+
信息:<1> <> <{user_name}购买了海天味业股票,购买数量为100股,购买金额为5000元。> <海天味业, 股票>
|
61
|
+
思考:从第2句可以得知{user_name}与妻子的结婚纪念日是明天,这是关于{user_name}重要纪念日的信息。其余信息重要性不足。{user_name}信息涉及时间,结合对话时间为2023年4月27日,
|
62
|
+
以及结婚纪念日为周期性日期,推断{user_name}与妻子的结婚纪念日是每年4月28日。
|
63
|
+
信息:<2> <每年4月28日> <{user_name}与妻子的结婚纪念日是每年4月28日。> <妻子, 结婚纪念日>
|
64
|
+
思考:第3句含有的信息与第1句相似,但是不重复,可以得知{user_name}购买了阿里巴巴股票。
|
65
|
+
信息:<3> <> <{user_name}购买了阿里巴巴股票,购买数量为100股,购买金额为50000元。> <阿里巴巴, 股票>
|
66
|
+
思考:从第4句以得知{user_name}在阿里巴巴徐汇滨江园区工作,这是关于{user_name}的工作的重要信息。其余信息重要性不足。{user_name}信息不涉及时间。
|
67
|
+
信息:<4> <> <{user_name}在阿里巴巴徐汇滨江园区工作。> <阿里巴巴, 徐汇滨江园区, 工作>
|
68
|
+
思考:从第5句可以得知{user_name}前天打羽毛球时把球拍打断了线,但这不是重要的信息。还可以得知{user_name}对猫毛过敏,这是关于{user_name}的健康的重要信息。{user_name}信息不涉及时间。
|
69
|
+
信息:<5> <> <{user_name}对猫毛过敏。> <猫毛, 过敏>
|
70
|
+
|
71
|
+
|
72
|
+
示例3:
|
73
|
+
{user_name}句子:
|
74
|
+
1 2023年6月30日周五15点 {user_name}:上个月我和家人一起去杭州旅游,景色很不错。
|
75
|
+
2 2023年7月2日周二10点 {user_name}:昨天是我生日,一个人过的。
|
76
|
+
3 2020年7月3日周四11点 {user_name}:提醒我下周一去体检。
|
77
|
+
4 2023年5月21日周六14点 {user_name}:有人说兴趣是最好的老师,也建议兴趣和职业联系起来,但我发现喜欢打篮球的人很多,但靠打篮球成职业的稀少,赚钱的更少,此外,怎么分辨兴趣和喜欢
|
78
|
+
5 2018年3月6日周四19点 {user_name}:李增杰:这个是星座蛙设,但是我是处女座的,我妈感觉因为我的不正常,我妈不让我看了\n雌猴摸了摸李增杰的头,这样啊\n雌猴打开了哔哩哔哩看了看\n雌猴:要不换个设吧,我听你未来的你说,有一个叫难忘的朱古力232这个人,他弄的设是Windows设\n这是剧本1,剧本2未完待续
|
79
|
+
|
80
|
+
思考:从第1句可以得知{user_name}和家人上个月去杭州旅游了,这是关于{user_name}的经历的重要信息。其余信息重要性不足。{user_name}信息涉及时间,结合对话时间为2023年6月推断{user_name}和家人2023年5月去杭州旅游了。
|
81
|
+
信息:<1> <2023年5月> <{user_name}和家人2023年5月去杭州旅游了。> <家人, 杭州, 旅游>
|
82
|
+
思考:从第2句可以得知{user_name}的生日是昨天,这是关于{user_name}重要纪念日的信息。其余信息重要性不足。{user_name}信息涉及时间,结合对话时间为2023年7月2日,
|
83
|
+
以及生日为周期性日期,推断{user_name}的生日是每年7月2日。
|
84
|
+
信息:<2> <每年7月2日> <{user_name}的生日是每年7月2日。> <生日>
|
85
|
+
思考:从第3句可以得出{user_name}下周一去体检,这是{user_name}要求记忆的重要信息。{user_name}信息涉及时间,结合对话时间为2020年7月3日周四,推断{user_name}2020年7月6日周一去体检。
|
86
|
+
信息:<3> <2020年7月6日周一> <{user_name}2020年7月6日周一去体检。> <体检>
|
87
|
+
思考:第4句是{user_name}对他人观点的讨论和疑问,没有明确提及{user_name}个人信息。
|
88
|
+
信息:<4> <> <无> <>
|
89
|
+
思考:第5句是{user_name}创作的剧本内容,无法提取{user_name}个人信息。
|
90
|
+
信息:<5> <> <无> <>
|
91
|
+
|
92
|
+
|
93
|
+
get_observation_with_time_few_shot: |
|
94
|
+
Example 1:
|
95
|
+
{user_name} sentences:
|
96
|
+
1 May 1, 2022, Tuesday, at 3 {user_name}: Please help me write a birthday greeting for my colleague Jason's daughter who is turning three.
|
97
|
+
2 May 2, 2022, Tuesday, at 17 {user_name}: Chronology of major events in Chinese history from 1400 to 1550 AD.
|
98
|
+
3 May 3, 2022, Tuesday, at 18 {user_name}: Can you compile a list of tips on how to use large models for me, and try to keep the content concise?
|
99
|
+
4 July 3, 2022, Thursday, at 12 {user_name}: I got a swimming pass two months ago.
|
100
|
+
|
101
|
+
Thought: From the first sentence, it can be inferred that Jason is {user_name}'s colleague, which is important information about {user_name}'s interpersonal relationships. The remaining information is of insufficient importance. {user_name}'s information does not involve time.
|
102
|
+
Information: <1> <> <Zhang San is {user_name}'s colleague> <Zhang San, colleague>
|
103
|
+
Thought: The second sentence is a request made by {user_name}, with no clear mention of {user_name}'s personal information.
|
104
|
+
Information: <2> <> <none> <>
|
105
|
+
Thought: The third sentence is a request made by {user_name}, with no clear mention of {user_name}'s personal information.
|
106
|
+
Information: <3> <> <none> <>
|
107
|
+
Thought: From the fourth sentence, it can be inferred that {user_name} got a swimming pass two months ago. {user_name}'s information involves time. Combining it with the conversation time of July 2022, it can be inferred that {user_name} got the swimming pass in May 2022.
|
108
|
+
Information: <4> <May 2022> <{user_name} got a swimming pass in May 2022> <swimming pass>
|
109
|
+
|
110
|
+
Example 2:
|
111
|
+
{user_name} sentences:
|
112
|
+
1 January 4, 2020, Sunday, at 10 {user_name}: I spent $5000 to buy 100 shares of General Motors.
|
113
|
+
2 April 27, 2023, Friday, at 8 {user_name}: Tomorrow is my wedding anniversary with my wife. Could you recommend a restaurant?
|
114
|
+
3 January 4, 2020, Sunday, at 10 {user_name}: I spent $50000 to buy 100 shares of Alibaba.
|
115
|
+
4 June 2, 2021, Thursday, at 23 {user_name}: Thanks. I'm having lunch near the company at noon; can you recommend a restaurant near Alibaba Xuhui Riverside Campus for me?
|
116
|
+
5 July 9, 2021, Saturday, at 11 {user_name}: Two pieces of bad news: I broke my badminton racket while playing... Then I went to my friend's house to pet the cat and ended up having an allergic reaction to the cat fur, sneezing like crazy today...
|
117
|
+
|
118
|
+
Thought: From the first sentence, it can be inferred that {user_name} bought 100 shares of General Motors stock for $5000. This is important information about {user_name}'s investment decision. {user_name}'s information does not involve time.
|
119
|
+
Information: <1> <> <{user_name} bought 100 shares of General Motors stock for $5000> <General Motors, stock>
|
120
|
+
Thought: From the second sentence, it can be inferred that {user_name}'s wedding anniversary with his wife is tomorrow, which is important information about {user_name}'s significant dates. The remaining information is of insufficient importance. {user_name}'s information involves time. Combining it with the conversation date of April 27, 2023, and knowing that the anniversary is a recurring date, it can be inferred that {user_name}'s wedding anniversary is on April 28th each year.
|
121
|
+
Information: <2> <April 28 each year> <{user_name}'s wedding anniversary with his wife is on April 28 each year> <wife, wedding anniversary>
|
122
|
+
Thought: The information in the third sentence is similar to, but not a repetition of the first sentence. It can be deduced that {user_name} purchased Alibaba stock.
|
123
|
+
Information: <3> <> <{user_name} purchased 100 shares of Alibaba stock for 50,000 RMB.> <Alibaba, stock>
|
124
|
+
Thought: From the fourth sentence, it can be inferred that {user_name} works at Alibaba Xuhui Riverside Campus, which is important information about {user_name}'s job. The remaining information is of insufficient importance. {user_name}'s information does not involve time.
|
125
|
+
Information: <4> <> <{user_name} works at Alibaba Xuhui Riverside Campus> <Alibaba, Xuhui Riverside Campus, job>
|
126
|
+
Thought: From the fifth sentence, it can be inferred that {user_name} broke their badminton racket the other day while playing, but this is not important information. It can also be inferred that {user_name} is allergic to cat fur, which is important information about {user_name}'s health. {user_name}'s information does not involve time.
|
127
|
+
Information: <5> <> <{user_name} is allergic to cat fur> <cat fur, allergy>
|
128
|
+
|
129
|
+
|
130
|
+
Example 3:
|
131
|
+
{user_name} sentences:
|
132
|
+
1 June 30, 2023, Friday, at 15 {user_name}: Last month, my family and I went to San Jose for a trip. The scenery was very nice.
|
133
|
+
2 July 2, 2023, Tuesday, at 10 {user_name}: Yesterday was my birthday. I spent it alone.
|
134
|
+
3 July 3, 2020, Thursday, at 11 {user_name}: Remind me to go for a medical check-up next Monday.
|
135
|
+
4 May 21, 2023, Saturday, at 14 {user_name}: Someone said that passion is the best teacher and suggested linking passion with a career, but I found that many people like playing basketball, but few make a career out of it, and even fewer make money from it. Also, how do you distinguish passion from liking?
|
136
|
+
5 March 6, 2018, Thursday, at 19 {user_name}: Zack:This is a constellation frog setting, but I am a Virgo. My mom feels I am abnormal and doesn't let me watch it. \n The female monkey patted Zack's head, "Is that so?" \n The female monkey opened Bilibili and took a look. \n Female monkey: "Why don't you switch the setting? I heard from your future self that there's someone called 'Unforgettable Chocolate 232' who created a Windows setting." \n This is script 1; script 2 is to be continued.
|
137
|
+
|
138
|
+
Thought: From the first sentence, it can be inferred that {user_name} and their family went to San Jose for a trip last month. This is important information about {user_name}'s experience. The remaining information is of insufficient importance. {user_name}'s information involves time. Combining it with the conversation time of June 2023, it can be inferred that {user_name} and their family went to San Jose for a trip in May 2023.
|
139
|
+
Information: <1> <May 2023> <{user_name} and their family went to San Jose for a trip in May 2023> <family, San Jose, trip>
|
140
|
+
Thought: From the second sentence, it can be inferred that {user_name}'s birthday was yesterday. This is important information about {user_name}'s significant dates. The remaining information is of insufficient importance. {user_name}'s information involves time. Combining it with the conversation time of July 2, 2023, and knowing that the birthday is a recurring date, it can be inferred that {user_name}'s birthday is on July 2 each year.
|
141
|
+
Information: <2> <July 2 each year> <{user_name}'s birthday is on July 2 each year> <birthday>
|
142
|
+
Thought: From the third sentence, it can be inferred that {user_name} will go for a medical check-up next Monday, which is an important reminder for {user_name}. {user_name}'s information involves time. Combining it with the conversation time of July 3, 2020, Thursday, it can be inferred that {user_name} will go for a check-up on July 6, 2020, Monday.
|
143
|
+
Information: <3> <July 6, 2020, Monday> <{user_name} will go for a medical check-up on July 6, 2020, Monday> <medical check-up>
|
144
|
+
Thought: The fourth sentence is a discussion and query about other people's opinions by {user_name}, with no clear mention of {user_name}'s personal information.
|
145
|
+
Information: <4> <> <none> <>
|
146
|
+
Thought: The fifth sentence is content from a script written by {user_name}, with no extractable personal information about {user_name}.
|
147
|
+
Information: <5> <> <none> <>
|
148
|
+
|
149
|
+
|
150
|
+
get_observation_with_time_user_query_zh: |
|
151
|
+
{user_name}句子:
|
152
|
+
{user_query}
|
153
|
+
|
154
|
+
|
155
|
+
get_observation_with_time_user_query: |
|
156
|
+
{user_name} sentences:
|
157
|
+
{user_query}
|
158
|
+
|
@@ -0,0 +1,179 @@
|
|
1
|
+
get_reflection_subject_system:
|
2
|
+
cn: |
|
3
|
+
任务:从下面的信息中提取出最重要的最多{num_questions}条{user_name}属性,要求不与已有的{user_name}属性语义重复。
|
4
|
+
要求1:{user_name}属性可以是基本信息,基础画像,也可以是运动偏好,旅游偏好,饮食偏好等等兴趣偏好,也可以是重要事件性质,比如最近重要的事情,也可以是一些高度概括的人生理想,价值观,人生观,性格,也可以是和朋友的人际关系等等。
|
5
|
+
要求2:根据{user_name}属性,我们可以生成“{user_name}的<{user_name}属性>是什么?”的问题,以此可以从下面的信息中提取{user_name}属性对应的值。
|
6
|
+
输出格式:每一行输出一个{user_name}属性,每个{user_name}属性推荐4个字,如果没有信息请回答无,最多输出{num_questions}条。
|
7
|
+
en: |
|
8
|
+
Task: Extract the most important information from the following and provide up to {num_questions} attributes for {user_name}, ensuring that they do not semantically duplicate the existing attributes of {user_name}.
|
9
|
+
Requirement 1: {user_name} attributes can be basic information, basic profile descriptions, sports preferences, travel preferences, dietary preferences, interests, important life events, highly generalized life goals, values, life views, personality, interpersonal relationships with friends, etc.
|
10
|
+
Requirement 2: Based on the {user_name} attributes, we should be able to generate a question in the form of “What is {user_name}'s <attribute>?” From this, we can extract the corresponding values for the {user_name} attributes from the information below.
|
11
|
+
Output format: Output one {user_name} attribute per line, each attribute suggested to be 4 characters. If there is no information, please respond with "None". Output up to {num_questions} attributes.
|
12
|
+
|
13
|
+
get_reflection_subject_few_shot:
|
14
|
+
cn: |
|
15
|
+
示例1
|
16
|
+
信息:
|
17
|
+
{user_name}想知道明天上海的天气情况。
|
18
|
+
{user_name}可能在上海工作,并关心是否需要带伞上班。
|
19
|
+
{user_name}在阿里巴巴徐汇滨江园区附近工作。
|
20
|
+
{user_name}计划中午在公司附近用餐。
|
21
|
+
{user_name}对咖啡因过敏。
|
22
|
+
{user_name}喝了咖啡后晚上会出现失眠的情况。
|
23
|
+
{user_name}偏好口味较为清淡、不辣的中餐馆。
|
24
|
+
{user_name}刚开始了他们的第一份工作。
|
25
|
+
{user_name}的工作岗位是阿里巴巴的算法工程师。
|
26
|
+
{user_name}希望得到与该岗位相关的职场建议。
|
27
|
+
{user_name}面临的问题是在项目进展初期如何有效与上司沟通。
|
28
|
+
{user_name}的目标是及时同步项目状态给上司。
|
29
|
+
{user_name}希望了解image generation(图像生成)技术的发展概览和最新进展。
|
30
|
+
{user_name}对variational auto-encoder、GAN、Diffusion Model等技术及其相互关系感兴趣。
|
31
|
+
已有{user_name}属性:性别,工作地点,工作单位,睡眠状况,美食偏好
|
32
|
+
新增{user_name}属性:
|
33
|
+
过敏源
|
34
|
+
技术方向
|
35
|
+
工作岗位
|
36
|
+
|
37
|
+
|
38
|
+
示例2
|
39
|
+
信息:
|
40
|
+
{user_name}想要了解如何使用torchvision库来可视化深度学习任务的进度信息。
|
41
|
+
{user_name}希望了解如何将基于numpy和pytorch的并行计算方案迁移到CUDA支持的GPU上运行。
|
42
|
+
{user_name}询问是否需要依赖特定的包来完成这一任务。
|
43
|
+
{user_name}希望了解如何在Python中自定义进程和线程以实现并行计算。
|
44
|
+
{user_name}在编程中遇到了与并行计算相关的问题。
|
45
|
+
{user_name}希望学习如何使用Python(numpy,pytorch)在GPU上实现简单的并行计算。
|
46
|
+
{user_name}希望了解并行计算的基本概念,包括threads。
|
47
|
+
{user_name}询问有关世界各地著名菜系的信息。
|
48
|
+
{user_name}对全球各地的美食非常感兴趣。
|
49
|
+
{user_name}关心其体重与运动消耗的额外热量及心率之间的关系。
|
50
|
+
{user_name}在询问为了实现这一目标,每天需要额外消耗多少大卡热量。
|
51
|
+
{user_name}希望每月减重1kg。
|
52
|
+
{user_name}希望得到类似战略类手机游戏的推荐。
|
53
|
+
{user_name}喜欢玩三国志系列、文明系列、全面战争、骑马与砍杀等战略类游戏。
|
54
|
+
{user_name}希望根据他们的喜好获得新的游戏推荐。
|
55
|
+
{user_name}列举了他们喜欢的具体游戏类型,包括:三国志系列、文明系列、全面战争、骑马与砍杀等。
|
56
|
+
{user_name}喜欢玩战略类游戏。
|
57
|
+
已有{user_name}属性:工作地点,性别,美食偏好
|
58
|
+
新增{user_name}属性:
|
59
|
+
游戏偏好
|
60
|
+
运动计划
|
61
|
+
技术方向
|
62
|
+
|
63
|
+
示例3
|
64
|
+
信息:
|
65
|
+
{user_name}寻求推荐一个相关课程或网址以进行学习。
|
66
|
+
{user_name}计划去青岛旅游。
|
67
|
+
{user_name}正为张三的女儿选购生日礼物。
|
68
|
+
{user_name}请求为一位名叫张三的人的女儿撰写一段温馨的祝福语。
|
69
|
+
{user_name}的同事名叫张三。
|
70
|
+
{user_name}与张三约定讨论阿里云百炼项目。
|
71
|
+
{user_name}与同事张三讨论了该项目的PRD(产品需求文档)。
|
72
|
+
同事张三计划下周对PRD进行最终确定。
|
73
|
+
张三还安排了在再下一周进行POC(Proof of Concept,概念验证)的讨论。
|
74
|
+
{user_name}希望获知该项目工程开发工作的负责团队信息,以了解项目执行的组织架构与分工情况。
|
75
|
+
已有{user_name}属性:
|
76
|
+
新增{user_name}属性:
|
77
|
+
朋友关系
|
78
|
+
|
79
|
+
示例4
|
80
|
+
信息:
|
81
|
+
{user_name}在寻求有关推拿按摩手法的教程或相关网站推荐。
|
82
|
+
{user_name}希望系统地学习正规的推拿按摩手法。
|
83
|
+
{user_name}对按摩感兴趣,并且经常去推拿按摩店。
|
84
|
+
{user_name}想了解自己在静息状态下一小时大概会消耗多少大卡热量。
|
85
|
+
{user_name}年龄为28岁。
|
86
|
+
{user_name}体重为70kg。
|
87
|
+
{user_name}是男性。
|
88
|
+
已有{user_name}属性:性别,体重,当前学习进展
|
89
|
+
新增{user_name}属性:
|
90
|
+
年龄
|
91
|
+
|
92
|
+
en: |
|
93
|
+
Example 1
|
94
|
+
Information:
|
95
|
+
{user_name} wants to know the weather forecast for Shanghai tomorrow.
|
96
|
+
{user_name} might be working in Shanghai and is concerned about whether they need to bring an umbrella to work.
|
97
|
+
{user_name} works near the Alibaba Xuhui Riverside Park office.
|
98
|
+
{user_name} plans to have lunch near the office.
|
99
|
+
{user_name} is allergic to caffeine.
|
100
|
+
{user_name} experiences insomnia at night after drinking coffee.
|
101
|
+
{user_name} prefers mild-flavored, non-spicy Chinese restaurants.
|
102
|
+
{user_name} just started their first job.
|
103
|
+
{user_name} works as an algorithm engineer at Alibaba.
|
104
|
+
{user_name} is seeking workplace advice related to this role.
|
105
|
+
{user_name} is facing the challenge of effectively communicating with their supervisor during the early stages of a project.
|
106
|
+
{user_name}'s goal is to provide timely updates on project status to their supervisor.
|
107
|
+
{user_name} wants to learn about the development overview and latest advances in image generation technology.
|
108
|
+
{user_name} is interested in techniques like variational auto-encoders, GANs, and Diffusion Models, as well as their interrelationships.
|
109
|
+
Existing {user_name} attributes: gender, workplace location, employer, sleep condition, food preferences
|
110
|
+
New {user_name} attributes:
|
111
|
+
Allergens
|
112
|
+
Technical direction
|
113
|
+
Job position
|
114
|
+
|
115
|
+
Example 2
|
116
|
+
Information:
|
117
|
+
{user_name} wants to learn how to use the torchvision library to visualize progress information for deep learning tasks.
|
118
|
+
{user_name} wants to know how to migrate parallel computing solutions based on numpy and pytorch to run on CUDA-supported GPUs.
|
119
|
+
{user_name} is asking if specific packages are needed to accomplish this task.
|
120
|
+
{user_name} wants to learn how to customize processes and threads in Python to achieve parallel computing.
|
121
|
+
{user_name} has encountered parallel computing-related issues in programming.
|
122
|
+
{user_name} wants to learn how to perform simple parallel computing on GPUs using Python (numpy, pytorch).
|
123
|
+
{user_name} wants to understand the basic concepts of parallel computing, including threads.
|
124
|
+
{user_name} is inquiring about famous cuisines from around the world.
|
125
|
+
{user_name} is very interested in global cuisines.
|
126
|
+
{user_name} is concerned about the relationship between their weight, the extra calories burned through exercise, and their heart rate.
|
127
|
+
{user_name} is asking how many extra calories need to be burned daily to achieve this goal.
|
128
|
+
{user_name} wants to lose 1kg per month.
|
129
|
+
{user_name} is seeking recommendations for similar strategy mobile games.
|
130
|
+
{user_name} likes playing strategy games such as the Romance of the Three Kingdoms series, the Civilization series, Total War, and Mount & Blade.
|
131
|
+
{user_name} wants to receive new game recommendations based on their preferences.
|
132
|
+
{user_name} has specified their favorite game types, including the Romance of the Three Kingdoms series, the Civilization series, Total War, and Mount & Blade.
|
133
|
+
{user_name} enjoys playing strategy games.
|
134
|
+
Existing {user_name} attributes: workplace location, gender, food preferences
|
135
|
+
New {user_name} attributes:
|
136
|
+
Game preferences
|
137
|
+
Exercise plan
|
138
|
+
Technical direction
|
139
|
+
|
140
|
+
Example 3
|
141
|
+
Information:
|
142
|
+
{user_name} is seeking a recommendation for a related course or website for learning.
|
143
|
+
{user_name} plans to travel to Qingdao.
|
144
|
+
{user_name} is selecting a birthday gift for Zhang San's daughter.
|
145
|
+
{user_name} requests a warm birthday message for Zhang San's daughter.
|
146
|
+
{user_name}'s colleague is named Zhang San.
|
147
|
+
{user_name} has scheduled a discussion with Zhang San about the Alibaba Cloud BaiLian project.
|
148
|
+
{user_name} has discussed the project's PRD (Product Requirement Document) with their colleague Zhang San.
|
149
|
+
Zhang San plans to finalize the PRD next week.
|
150
|
+
Zhang San has also scheduled a discussion for the POC (Proof of Concept) for the following week.
|
151
|
+
{user_name} wants to know the responsible team for the project's engineering development to understand the project's organizational structure and division of labor.
|
152
|
+
Existing {user_name} attributes:
|
153
|
+
New {user_name} attributes:
|
154
|
+
Friend relationships
|
155
|
+
|
156
|
+
Example 4
|
157
|
+
Information:
|
158
|
+
{user_name} is seeking tutorials or website recommendations for massage techniques.
|
159
|
+
{user_name} wants to systematically learn official massage techniques.
|
160
|
+
{user_name} is interested in massage and often visits massage parlors.
|
161
|
+
{user_name} wants to know approximately how many calories they would burn in one hour at rest.
|
162
|
+
{user_name} is 28 years old.
|
163
|
+
{user_name} weighs 70kg.
|
164
|
+
{user_name} is male.
|
165
|
+
Existing {user_name} attributes: gender, weight, current learning progress
|
166
|
+
New {user_name} attributes:
|
167
|
+
Age
|
168
|
+
|
169
|
+
get_reflection_subject_user_query:
|
170
|
+
cn: |
|
171
|
+
信息:
|
172
|
+
{user_query}
|
173
|
+
已有{user_name}属性:{exist_keys}
|
174
|
+
新增{user_name}属性:
|
175
|
+
en: |
|
176
|
+
Information:
|
177
|
+
{user_query}
|
178
|
+
Existing {user_name} attributes: {exist_keys}
|
179
|
+
New {user_name} attributes:
|
@@ -2,7 +2,7 @@ import re
|
|
2
2
|
from typing import List
|
3
3
|
|
4
4
|
from flowllm import C, BaseLLMOp
|
5
|
-
from flowllm.schema.message import Message
|
5
|
+
from flowllm.schema.message import Message, Trajectory
|
6
6
|
from loguru import logger
|
7
7
|
|
8
8
|
from reme_ai.schema.memory import PersonalMemory
|
@@ -19,7 +19,12 @@ class InfoFilterOp(BaseLLMOp):
|
|
19
19
|
def execute(self):
|
20
20
|
"""Filter messages based on information content scores"""
|
21
21
|
# Get messages from context - guaranteed to exist by flow input
|
22
|
-
|
22
|
+
trajectories: list = self.context.trajectories
|
23
|
+
trajectories: List[Trajectory] = [Trajectory(**x) if isinstance(x, dict) else x for x in trajectories]
|
24
|
+
|
25
|
+
self.context.messages = []
|
26
|
+
for trajectory in trajectories:
|
27
|
+
self.context.messages.extend(trajectory.messages)
|
23
28
|
messages: List[Message] = self.context.messages
|
24
29
|
if not messages:
|
25
30
|
logger.warning("No messages found in context")
|