reme-ai 0.1.0__py3-none-any.whl → 0.1.1__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.1.dist-info}/METADATA +1 -4
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.1.dist-info}/RECORD +28 -8
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.1.dist-info}/WHEEL +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.1.dist-info}/entry_points.txt +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {reme_ai-0.1.0.dist-info → reme_ai-0.1.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,172 @@
|
|
1
|
+
info_filter_system_zh: |
|
2
|
+
任务:对所给{batch_size}个句子中所含有的关于{user_name}的信息打分,分数为0,1,2或3。
|
3
|
+
注意:其中0表示不包含用户信息,1表示句子中只包含用户假设的信息或者用户虚构的内容比如用户创作的小说或剧本,2表示包含用户的一般信息,时效性信息或者需要猜测才能得到的用户信息,3表示明确含有或者可以确定推断出关于用户的重要信息,或者用户要求记录。
|
4
|
+
{user_name}的重要信息可以包含用户基本信息,用户画像信息,用户兴趣偏好信息,用户性格,用户价值观,用户人际关系,用户重大事件转折点等等重要信息。
|
5
|
+
对每个句子都做一次信息打分,一共输出{batch_size}个分数,不需要写最终结果。
|
6
|
+
请一定要按如下格式依次输出,最后的结果一定要加<>:
|
7
|
+
思考:思考的依据和过程,30字以内。
|
8
|
+
结果:<句子序号> <分数:0或1或2或3>
|
9
|
+
|
10
|
+
info_filter_system: |
|
11
|
+
Task: Score the information about {user_name} contained in the given batch of {batch_size} sentences, with scores of 0, 1, 2, or 3.
|
12
|
+
Note:
|
13
|
+
0 indicates no user information is included.
|
14
|
+
1 indicates only hypothetical information about the user or fictitious content such as novels or scripts created by the user.
|
15
|
+
2 indicates general information about the user, timely information, or information that requires inference.
|
16
|
+
3 indicates clear and important information about the user, or information explicitly requested for recording.
|
17
|
+
Important information about {user_name} can include basic information about the user, user profile information, user interests and preferences, user personality, user values, user relationships, significant life events, and other crucial information.
|
18
|
+
Score each sentence individually and output a total of {batch_size} scores without providing the final result.
|
19
|
+
Please ensure to output in the following format and wrap the final result in <>:
|
20
|
+
Thought: Basis and reasoning process, within 30 characters.
|
21
|
+
Result: <Sentence Index> <Score: 0, 1, 2, or 3>
|
22
|
+
|
23
|
+
|
24
|
+
info_filter_few_shot_zh: |
|
25
|
+
示例1
|
26
|
+
句子:
|
27
|
+
1 {user_name}:帮我写一段给同事张三女儿三岁生日的祝福语。
|
28
|
+
2 {user_name}:公元1400年至1550年中国历史大事表。
|
29
|
+
3 {user_name}:你吃午饭了吗?
|
30
|
+
4 {user_name}:我今天心情不好,可以安慰我一下吗?
|
31
|
+
5 {user_name}:能给我整理一张如何使用大模型的技巧列表吗,要求内容尽量精简。
|
32
|
+
6 {user_name}:记一下,明天下午3点提醒我去拿一下文件。
|
33
|
+
|
34
|
+
思考:从第1句可以确定推断出张三是{user_name}同事这一重要信息。
|
35
|
+
结果:<1> <3>
|
36
|
+
思考:第2句不包含{user_name}信息。
|
37
|
+
结果:<2> <0>
|
38
|
+
思考:第3句不包含{user_name}信息。
|
39
|
+
结果:<3> <0>
|
40
|
+
思考:从第4句可以得知{user_name}今天心情不好,是时效性信息。
|
41
|
+
结果:<4> <2>
|
42
|
+
思考:从第5句可以猜测{user_name}对大模型感兴趣,是不确定的信息。
|
43
|
+
结果:<5> <2>
|
44
|
+
思考:第6句是{user_name}要求记录的信息。
|
45
|
+
结果:<6> <3>
|
46
|
+
|
47
|
+
示例2
|
48
|
+
句子:
|
49
|
+
1 {user_name}:我刚刚入职了阿里巴巴。
|
50
|
+
2 {user_name}:露天睡觉蚊子多,咋搞。
|
51
|
+
3 {user_name}:创造力和外倾性有关?
|
52
|
+
4 {user_name}:一个区县的所有的事业人员的档案审核、修改和规范,应该是县委组织部下属的干部档案中心负责还是县人社局负责?
|
53
|
+
5 {user_name}:假如我要和一个女人准备要孩子,我作为男人,怎么保护女人和孩子以及怎么备孕确保精子质量高对后代好
|
54
|
+
6 {user_name}:我和你一起出去玩,你会感觉开心吗?
|
55
|
+
7 {user_name}:林浅,一位对未来充满好奇的年轻女孩,偶然间发现了这家能寄信给未来的邮局。出于对逝去祖父的怀念,她决定写下一封信,寄给五年后的自己,希望能收到祖父生前未说完的故事。五年期限将至,当她几乎忘记这段往事时,一封泛黄的回信悄然降临,不仅带来了祖父未完的冒险故事,还藏着一段关于勇气、爱与自我发现的深刻启示。续写成3000字小说。
|
56
|
+
|
57
|
+
思考:从第1句可以确定得出{user_name}工作单位是阿里巴巴这一重要信息。
|
58
|
+
结果:<1> <3>
|
59
|
+
思考:从第2句可以猜测{user_name}近期露天睡觉,是不确定的信息。
|
60
|
+
结果:<2> <2>
|
61
|
+
思考:第3句不包含{user_name}信息。
|
62
|
+
结果:<3> <0>
|
63
|
+
思考:第4句不包含{user_name}信息。
|
64
|
+
结果:<4> <0>
|
65
|
+
思考:第5句虽然有假设成分,但可以确定推断出{user_name}是男性这一重要信息。
|
66
|
+
结果:<5> <3>
|
67
|
+
思考:第6句是{user_name}假设的信息。
|
68
|
+
结果:<6> <1>
|
69
|
+
思考:第7句是{user_name}虚构的内容。
|
70
|
+
结果:<7> <1>
|
71
|
+
|
72
|
+
示例3
|
73
|
+
句子:
|
74
|
+
1 {user_name}:你的妈妈患有焦虑症,怎么安慰和开导她?
|
75
|
+
2 {user_name}:肾脏严重亏空
|
76
|
+
3 {user_name}:我很喜欢打篮球,所以我身体很好
|
77
|
+
4 {user_name}:篮球明星有哪些?
|
78
|
+
5 {user_name}:李增杰:这个是星座蛙设,但是我是处女座的,我妈感觉因为我的不正常,我妈不让我看了\n雌猴摸了摸李增杰的头,这样啊\n雌猴打开了哔哩哔哩看了看\n雌猴:要不换个设吧,我听你未来的你说,有一个叫难忘的朱古力232这个人,他弄的设是Windows设\n这是剧本1,剧本2未完待续
|
79
|
+
6 {user_name}:我想知道昨天我们聊了什么?
|
80
|
+
|
81
|
+
思考:第1句是{user_name}假设的信息。
|
82
|
+
结果:<1> <1>
|
83
|
+
思考:第2句信息不明,可能是{user_name}假设的信息。
|
84
|
+
结果:<2> <1>
|
85
|
+
思考:从第3句可以确定得出{user_name}喜欢打篮球,身体好这两个重要信息。
|
86
|
+
结果:<3> <3>
|
87
|
+
思考:第4句不包含{user_name}信息。
|
88
|
+
结果:<4> <0>
|
89
|
+
思考:第5句是{user_name}虚构的内容。
|
90
|
+
结果:<5> <1>
|
91
|
+
思考:第6句是{user_name}的疑问句,没有包含信息。
|
92
|
+
结果:<6> <0>
|
93
|
+
|
94
|
+
info_filter_few_shot: |
|
95
|
+
Example 1
|
96
|
+
Sentences:
|
97
|
+
1 {user_name}: Please help me write a birthday greeting for my colleague Jason's daughter who is turning three.
|
98
|
+
2 {user_name}: Chronology of major events in Mediterranean history from 1400 to 1550 AD.
|
99
|
+
3 {user_name}: Have you had lunch?
|
100
|
+
4 {user_name}: I'm feeling down today. Can you comfort me a bit?
|
101
|
+
5 {user_name}: Can you compile a list of tips on how to use large models for me, and try to keep the content concise?
|
102
|
+
6 {user_name}: Note this down: remind me tomorrow at 3 PM to pick up the documents.
|
103
|
+
|
104
|
+
Thought: From the first sentence, it can be inferred that Zhang San is a colleague of {user_name}, which is important information.
|
105
|
+
Result: <1> <3>
|
106
|
+
Thought: The second sentence does not contain information about {user_name}.
|
107
|
+
Result: <2> <0>
|
108
|
+
Thought: The third sentence does not contain information about {user_name}.
|
109
|
+
Result: <3> <0>
|
110
|
+
Thought: The fourth sentence indicates that {user_name} is in a bad mood today, which is time-sensitive information.
|
111
|
+
Result: <4> <2>
|
112
|
+
Thought: The fifth sentence suggests that {user_name} may be interested in large models, which is uncertain information.
|
113
|
+
Result: <5> <2>
|
114
|
+
Thought: The sixth sentence contains information that {user_name} requested to be recorded.
|
115
|
+
Result: <6> <3>
|
116
|
+
|
117
|
+
Example 2
|
118
|
+
Sentences:
|
119
|
+
1 {user_name}: I've just joined Google.
|
120
|
+
2 {user_name}: There are too many mosquitoes when sleeping outdoors. What should I do?
|
121
|
+
3 {user_name}: Is creativity related to extroversion?
|
122
|
+
4 {user_name}: Should the review, modification, and standardization of all personnel files in a district or county be handled by the cadre archive center or by the county human resources and social security bureau?
|
123
|
+
5 {user_name}: If I am planning to have a child with a woman, as a man, how can I protect the woman and the baby and how can I prepare to ensure high sperm quality for the benefit of the offspring?
|
124
|
+
6 {user_name}: If we go out to play together, would you feel happy?
|
125
|
+
7 {user_name}: Rose, a young girl full of curiosity about the future, accidentally discovered this post office that can send letters to the future. Out of nostalgia for her late grandfather, she decided to write a letter to herself five years in the future, hoping to receive the unfinished stories of her grandfather. As the five-year deadline approached, when she had almost forgotten about this event, a yellowed reply quietly arrived, bringing not only her grandfather's unfinished adventure story but also a profound revelation about courage, love, and self-discovery. Continue writing this into a 3000-word novel.
|
126
|
+
|
127
|
+
Thought: From the first sentence, it can be determined that {user_name} works at Alibaba, which is important information.
|
128
|
+
Result: <1> <3>
|
129
|
+
Thought: The second sentence suggests that {user_name} might has been sleeping outdoors recently, which is uncertain information.
|
130
|
+
Result: <2> <2>
|
131
|
+
Thought: The third sentence does not contain information about {user_name}.
|
132
|
+
Result: <3> <0>
|
133
|
+
Thought: The fourth sentence does not contain information about {user_name}.
|
134
|
+
Result: <4> <0>
|
135
|
+
Thought: Although the fifth sentence contains hypothetical elements, it can be determined that {user_name} is male, which is important information.
|
136
|
+
Result: <5> <3>
|
137
|
+
Thought: The sixth sentence contains only hypothetical information from {user_name}.
|
138
|
+
Result: <6> <1>
|
139
|
+
Thought: The seventh sentence contains only fictitious content from {user_name}.
|
140
|
+
Result: <7> <1>
|
141
|
+
|
142
|
+
Example 3
|
143
|
+
Sentences:
|
144
|
+
1 {user_name}: Your mother is suffering from anxiety. How can you comfort and guide her?
|
145
|
+
2 {user_name}: Severe kidney deficiency
|
146
|
+
3 {user_name}: I really enjoy playing basketball, so I am in good health.
|
147
|
+
4 {user_name}: Who are some famous basketball stars?
|
148
|
+
5 {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.
|
149
|
+
6 {user_name}: I want to know what we talked about yesterday.
|
150
|
+
|
151
|
+
Thought: The first sentence contains only hypothetical information from {user_name}.
|
152
|
+
Result: <1> <1>
|
153
|
+
Thought: The second sentence is unclear and may contain hypothetical information from {user_name}.
|
154
|
+
Result: <2> <1>
|
155
|
+
Thought: From the third sentence, it can be determined that {user_name} likes playing basketball and is in good health, which are two important pieces of information.
|
156
|
+
Result: <3> <3>
|
157
|
+
Thought: The fourth sentence does not contain information about {user_name}.
|
158
|
+
Result: <4> <0>
|
159
|
+
Thought: The fifth sentence contains only fictitious content from {user_name}.
|
160
|
+
Result: <5> <1>
|
161
|
+
Thought: Sentence 6 is a question from {user_name} that doesn't include any specific information.
|
162
|
+
Result: <6> <0>
|
163
|
+
|
164
|
+
info_filter_user_query_zh: |
|
165
|
+
句子:
|
166
|
+
{user_query}
|
167
|
+
|
168
|
+
|
169
|
+
info_filter_user_query: |
|
170
|
+
Sentences:
|
171
|
+
{user_query}
|
172
|
+
|
@@ -0,0 +1,120 @@
|
|
1
|
+
long_contra_repeat_system_zh: |
|
2
|
+
对下面的{num_obs}句句子,逐一判断是否与“前面序号”的任意句子存在信息的矛盾,或者句子的主要信息被“前面序号”的任意句子中的信息包含。
|
3
|
+
注意:只判断与“前面序号”的句子的关系,不要判断“后面序号”。
|
4
|
+
其中矛盾的形式可以有很多种,可以是逻辑上的矛盾,可以是属性上的变化导致的矛盾,比如不能同时在两个地方工作,同一个时刻不能在两个地点,同一个时刻不能干两件事情等等。
|
5
|
+
对每个句子都做一个判断,最后一共输出{num_obs}条判断。如果句子与前面序号的句子存在矛盾,则以前面序号的句子中的信息为准,修改句子中矛盾的部分。
|
6
|
+
请一步步思考,并按如下格式输出:
|
7
|
+
思考:思考的依据和过程,30字以内。
|
8
|
+
判断:<句子序号> <矛盾,被包含,无> <修改后的内容>,一定加<>
|
9
|
+
|
10
|
+
long_contra_repeat_system: |
|
11
|
+
For the following {num_obs} sentences, determine one by one whether there is any information contradiction with any sentences preceding their sequence number, or if the main information of the sentence is contained within information from any preceding sentences.
|
12
|
+
Note: Only judge the relationship with the sentences of the preceding sequence number, do not judge the ones after.
|
13
|
+
The forms of contradiction could be many, including logical contradictions or contradictions caused by changes in attributes, such as not being able to work in two places simultaneously, not being able to be in two places at the same time, or not being able to do two things at the same time, etc.
|
14
|
+
Make a judgment for each sentence and output a total of {num_obs} judgments, following this format:
|
15
|
+
Thought: The basis and process of thinking, within 30 characters.
|
16
|
+
Judgment: <Sentence Number> <Contradiction, Contained, None> <Modified content in case of contradiction>, using <> for each part.
|
17
|
+
|
18
|
+
long_contra_repeat_few_shot_zh: |
|
19
|
+
示例1
|
20
|
+
句子:
|
21
|
+
1 {user_name}经常失眠,对安眠药的效果感兴趣,暗示可能考虑使用。
|
22
|
+
2 {user_name}经常失眠,寻求缓解方法。
|
23
|
+
3 陈伟业是{user_name}的领导
|
24
|
+
4 陈伟业是{user_name}的领导
|
25
|
+
5 陈伟业是{user_name}的领导,是银行分行行长
|
26
|
+
6 {user_name}喜欢吃西瓜
|
27
|
+
7 {user_name}喜欢吃苹果
|
28
|
+
|
29
|
+
思考:第1句不会存在与前面序号句子的矛盾或者完全重复。
|
30
|
+
判断:<1> <无> <>
|
31
|
+
思考:第2句中所有信息都被前面序号中第1句的信息完全包含。
|
32
|
+
判断:<2> <被包含> <>
|
33
|
+
思考:第3句信息没有在前面序号句子中出现
|
34
|
+
判断:<3> <无> <>
|
35
|
+
思考:第4句与前面序号中第3句的信息完全重复,即被完全包含。
|
36
|
+
判断:<4> <被包含> <>
|
37
|
+
思考:第5句中陈伟业是{user_name}的领导的信息被前面序号中第3句的信息包含,但新增了陈伟业是银行分行行长的信息,故不是被完全包含。
|
38
|
+
判断:<5> <无> <>
|
39
|
+
思考:第6句中表达了{user_name}的水果偏好,喜欢吃西瓜,信息没有在前面序号句子中出现。
|
40
|
+
判断:<6> <无> <>
|
41
|
+
思考:第7句也表达了{user_name}的水果偏好,喜欢吃桃子,和前面序号中的第6句不冲突,喜好可以同时存在。
|
42
|
+
判断:<7> <无> <>
|
43
|
+
|
44
|
+
示例2
|
45
|
+
句子:
|
46
|
+
1 {user_name}的孩子成绩不太好。
|
47
|
+
2 {user_name}的孩子在学校经常逃课。
|
48
|
+
3 {user_name}的父亲生日在2024年6月2日,{user_name}打算准备礼物。
|
49
|
+
4 {user_name}的父亲生日在2024年5月1日。
|
50
|
+
5 {user_name}很喜欢和同班同学打篮球。
|
51
|
+
6 {user_name}喜欢打篮球。
|
52
|
+
|
53
|
+
思考:第1句不会存在与前面序号句子的矛盾或者完全重复。
|
54
|
+
判断:<1> <无> <>
|
55
|
+
思考:第2句与前面序号句子既不矛盾也不重复。
|
56
|
+
判断:<2> <无> <>
|
57
|
+
思考:第3句与前面序号句子既不矛盾也不重复。
|
58
|
+
判断:<3> <无> <>
|
59
|
+
思考:第4句关于{user_name}父亲生日的日期信息与前面序号句子第3句矛盾了。
|
60
|
+
判断:<4> <矛盾> <{user_name}的父亲生日在2024年6月2日>
|
61
|
+
思考:第5句与前面序号句子既不矛盾也不重复。
|
62
|
+
判断:<5> <无> <>
|
63
|
+
思考:第6句中所有信息都被前面序号中第5句的信息完全包含。
|
64
|
+
判断:<2> <被包含> <>
|
65
|
+
|
66
|
+
long_contra_repeat_few_shot: |
|
67
|
+
Example 1
|
68
|
+
Sentences:
|
69
|
+
1 {user_name} suffers from insomnia frequently and is interested in the effects of sleeping pills, suggesting a possible consideration of their use.
|
70
|
+
2 {user_name} suffers from insomnia frequently and seeks remedies.
|
71
|
+
3 Charles is {user_name}'s supervisor.
|
72
|
+
4 Charles is {user_name}'s supervisor.
|
73
|
+
5 Charles is {user_name}'s supervisor and the branch manager of a bank.
|
74
|
+
6. {user_name} likes to eat watermelon.
|
75
|
+
7. {user_name} likes to eat apples.
|
76
|
+
|
77
|
+
Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences.
|
78
|
+
Judgment: <1> <None> <>
|
79
|
+
Thought: All information in the second sentence is completely contained within the information of the first sentence.
|
80
|
+
Judgment: <2> <Contained> <>
|
81
|
+
Thought: The information in the third sentence does not appear in the previously numbered sentences.
|
82
|
+
Judgment: <3> <None> <>
|
83
|
+
Thought: The fourth sentence is completely repetitive of the information in the third sentence, i.e., it is completely contained.
|
84
|
+
Judgment: <4> <Contained> <>
|
85
|
+
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.
|
86
|
+
Judgment: <5> <None> <>
|
87
|
+
Thought: Sentence 6 expresses {user_name}'s fruit preference, liking to eat watermelon, which is information not present in any preceding sentences.
|
88
|
+
Judgment: <6> <None> <>
|
89
|
+
Thought: Sentence 7 also expresses {user_name}'s fruit preference, liking to eat apples; it does not conflict with sentence 6, and both preferences can coexist.
|
90
|
+
Judgment: <7> <None> <>
|
91
|
+
|
92
|
+
Example 2
|
93
|
+
Sentences:
|
94
|
+
1 {user_name}'s child does not perform well academically.
|
95
|
+
2 {user_name}'s child often skips school.
|
96
|
+
3 {user_name}'s father's birthday is on June 2, 2024, and {user_name} plans to prepare a gift.
|
97
|
+
4 {user_name}'s father's birthday is on May 1, 2024.
|
98
|
+
5 {user_name} loves playing basketball with classmates.
|
99
|
+
6 {user_name} likes playing basketball.
|
100
|
+
|
101
|
+
Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences.
|
102
|
+
Judgment: <1> <None> <>
|
103
|
+
Thought: The second sentence neither contradicts nor repeats any of the previously numbered sentences.
|
104
|
+
Judgment: <2> <None> <>
|
105
|
+
Thought: The third sentence neither contradicts nor repeats any of the previously numbered sentences.
|
106
|
+
Judgment: <3> <None> <>
|
107
|
+
Thought: The date of {user_name}'s father's birthday in the fourth sentence contradicts the information in the third sentence.
|
108
|
+
Judgment: <4> <Contradiction> <{user_name}'s father's birthday is on June 2, 2024.>
|
109
|
+
Thought: The fifth sentence neither contradicts nor repeats any of the previously numbered sentences.
|
110
|
+
Judgment: <5> <None> <>
|
111
|
+
Thought: All information in the sixth sentence is completely contained within the information of the fifth sentence.
|
112
|
+
Judgment: <6> <Contained> <>
|
113
|
+
|
114
|
+
long_contra_repeat_user_query_zh: |
|
115
|
+
句子:
|
116
|
+
{user_query}
|
117
|
+
|
118
|
+
long_contra_repeat_user_query: |
|
119
|
+
Sentences:
|
120
|
+
{user_query}
|
@@ -0,0 +1,149 @@
|
|
1
|
+
update_insight_system_zh: |
|
2
|
+
从下面的句子中提取出给定类别的{user_name}的资料信息,并判断与已有信息是否矛盾,若矛盾以新信息为准整合已有信息和新信息并输出。若不需要更改,则回答“无”。
|
3
|
+
其中矛盾的形式可以有很多种,可以是逻辑上的矛盾,可以是属性上的变化导致的矛盾,比如不能同时在两个地方工作,同一个时刻不能在两个地点,同一个时刻不能干两件事情等等。
|
4
|
+
请一步步思考,并按如下格式输出, 其中信息一定加<>:
|
5
|
+
思考: 思考的依据和过程,150字以内。
|
6
|
+
{user_name}的资料: <信息>
|
7
|
+
|
8
|
+
update_insight_system: |
|
9
|
+
Extract the given category of {user_name}'s profile information from the following sentences and determine if it contradicts the existing information. If there is a contradiction, integrate the existing information and the new information, prioritizing the new information, and output the result. If no changes are needed, respond with 'None'.
|
10
|
+
The contradictions can come in many forms, such as logical contradictions or changes in attributes leading to contradictions, for example, not being able to work in two places simultaneously, being unable to be in two locations at the same time, or being unable to perform two tasks at the same time, etc.
|
11
|
+
Think step by step, and output in the following format, with information enclosed in <>:
|
12
|
+
Thoughts: The basis and process of your thinking, within 150 words.
|
13
|
+
{user_name}'s profile: <Information>
|
14
|
+
|
15
|
+
update_insight_few_shot_zh: |
|
16
|
+
示例1:
|
17
|
+
因为昨天成都下大雨,{user_name}全身都被淋湿了。
|
18
|
+
{user_name}关心明天成都的天气预报。
|
19
|
+
类别:{user_name}所在地区
|
20
|
+
已有信息:{user_name}所在地区: 杭州
|
21
|
+
思考:从第一句句子可以得出{user_name}在成都。第二句句子没有直接透露{user_name}所在地信息,但与第一句句子{user_name}在成都的信息吻合。这与已有信息({user_name}在杭州)矛盾,输出更新的信息。
|
22
|
+
{user_name}的资料:<成都>
|
23
|
+
|
24
|
+
示例2:
|
25
|
+
{user_name}最近养好了肠胃。
|
26
|
+
{user_name}关注中医养生。
|
27
|
+
类别:{user_name}健康状况
|
28
|
+
已有信息:{user_name}健康状况: 肠胃不好,高血压
|
29
|
+
思考:从第一句句子可以得出{user_name}最近养好了肠胃,与已有信息矛盾,以新信息为准。第二句句子与{user_name}健康状况无关。整合已有信息和新信息得到{user_name}健康状况是肠胃健康,高血压。
|
30
|
+
{user_name}的资料:<肠胃健康,高血压>
|
31
|
+
|
32
|
+
示例3:
|
33
|
+
{user_name}刚刚毕业,第一份工作是银行前台。
|
34
|
+
{user_name}的理想工作是职业游戏选手。
|
35
|
+
类别:{user_name}职业
|
36
|
+
已有信息:{user_name}职业:在招商银行工作
|
37
|
+
思考:整合已有信息和第一句句子的信息可以得出{user_name}的现在的职业是招商银行前台。第二句句子说明了{user_name}的理想工作但并不是现在的职业。
|
38
|
+
{user_name}的资料:<招商银行前台>
|
39
|
+
|
40
|
+
示例4:
|
41
|
+
{user_name}大学期间接触过优化算法的研究。
|
42
|
+
类别:{user_name}学习专业
|
43
|
+
已有信息:{user_name}学习专业:与人工智能相关
|
44
|
+
思考:从句子可以得出{user_name}大学学习的专业与优化算法相关,这与已有信息({user_name}学习专业与人工智能相关)不矛盾,整合可以得出{user_name}大学学习的专业与人工智能和优化算法相关。
|
45
|
+
{user_name}的资料:<与人工智能和优化算法相关>
|
46
|
+
|
47
|
+
示例5:
|
48
|
+
{user_name}单身。
|
49
|
+
{user_name}受到一名18岁男生的追求,但不想接受又不想伤害他。
|
50
|
+
{user_name}喜欢成熟且情绪稳定的男生。
|
51
|
+
类别:{user_name}情感状况
|
52
|
+
已有信息:{user_name}情感状况:有男朋友
|
53
|
+
思考:从第一句句子可以得出{user_name}现在单身,与已有信息矛盾,以新信息为准。从第二句句子得出{user_name}受到一名18岁男生的追求但并不喜欢他。第三句话表达了{user_name}理想的伴侣类型但与{user_name}情感状况无关。整合得出{user_name}情感状况为单身,受到一名18岁男生的追求但并不喜欢他。
|
54
|
+
{user_name}的资料:<单身,受到一名18岁男生的追求但并不喜欢他。>
|
55
|
+
|
56
|
+
示例6:
|
57
|
+
{user_name}女朋友下个月过生日。
|
58
|
+
{user_name}生日在7月15日。
|
59
|
+
{user_name}的还在在学校经常逃课。
|
60
|
+
{user_name}喜欢打篮球。
|
61
|
+
类别:{user_name}生日
|
62
|
+
已有信息:{user_name}生日:1987年7月15日。
|
63
|
+
思考:第一句句子中提及生日,但并不是用户的生日,无法得出用户生日信息。从第二句句子可以得出用户生日在7月15日,与已有信息不矛盾,整合可以得出用户生日是1987年7月15日。
|
64
|
+
{user_name}的资料:<1987年7月15日>
|
65
|
+
|
66
|
+
示例7:
|
67
|
+
今天{user_name}和同学去打球了。
|
68
|
+
明天{user_name}和女朋友一起去杭州旅游。
|
69
|
+
今天{user_name}买入了100股阿里巴巴股票。
|
70
|
+
类别:{user_name}公司地址
|
71
|
+
已有信息:{user_name}公司地址:
|
72
|
+
思考:和公司地址都没有关联,没有新提取的信息。
|
73
|
+
{user_name}的资料:<无>
|
74
|
+
|
75
|
+
update_insight_few_shot: |
|
76
|
+
Example 1:
|
77
|
+
Because it rained heavily in Chengdu yesterday, {user_name} got completely soaked.
|
78
|
+
{user_name} is concerned about Chengdu's weather forecast for tomorrow.
|
79
|
+
Category: {user_name}'s location
|
80
|
+
Existing information: {user_name}'s location: Hangzhou
|
81
|
+
Thought: From the first sentence, it can be inferred that {user_name} is in Chengdu. The second sentence does not directly reveal {user_name}'s location but matches the information that {user_name} is in Chengdu from the first sentence. This contradicts the existing information (that {user_name} is in Hangzhou), so we output the updated information.
|
82
|
+
{user_name}'s profile: <Chengdu>
|
83
|
+
|
84
|
+
Example 2:
|
85
|
+
{user_name} recently recovered from stomach issues.
|
86
|
+
{user_name} is interested in traditional Chinese medicine.
|
87
|
+
Category: {user_name}'s health status
|
88
|
+
Existing information: {user_name}'s health status: Stomach issues, high blood pressure
|
89
|
+
Thought: From the first sentence, it can be inferred that {user_name} recently recovered from stomach issues, which contradicts the existing information. Therefore, the new information should take precedence. The second sentence is not related to {user_name}'s health status. Integrating the existing information and the new information, we get that {user_name}'s health status is healthy stomach and high blood pressure.
|
90
|
+
{user_name}'s profile: <Healthy stomach, high blood pressure>
|
91
|
+
|
92
|
+
Example 3:
|
93
|
+
{user_name} just graduated, and their first job is as a bank receptionist.
|
94
|
+
{user_name}'s dream job is to be a professional gamer.
|
95
|
+
Category: {user_name}'s occupation
|
96
|
+
Existing information: {user_name}'s occupation: Works at China Merchants Bank
|
97
|
+
Thought: Integrating the existing information and the information from the first sentence, it can be inferred that {user_name}'s current occupation is a receptionist at China Merchants Bank. The second sentence explains {user_name}'s dream job but not the current occupation.
|
98
|
+
{user_name}'s profile: <Receptionist at China Merchants Bank>
|
99
|
+
|
100
|
+
Example 4:
|
101
|
+
{user_name} was exposed to optimization algorithm research during university.
|
102
|
+
Category: {user_name}'s field of study
|
103
|
+
Existing information: {user_name}'s field of study: Related to artificial intelligence
|
104
|
+
Thought: From the sentence, it can be inferred that {user_name}'s university major is related to optimization algorithms. This does not contradict the existing information (that {user_name}'s major is related to artificial intelligence). Integrating both, we can conclude that {user_name}'s university major is related to artificial intelligence and optimization algorithms.
|
105
|
+
{user_name}'s profile: <Related to artificial intelligence and optimization algorithms>
|
106
|
+
|
107
|
+
Example 5:
|
108
|
+
{user_name} is single.
|
109
|
+
{user_name} is pursued by an 18-year-old male but doesn't want to accept his advances or hurt him.
|
110
|
+
{user_name} prefers mature and emotionally stable men.
|
111
|
+
Category: {user_name}'s relationship status
|
112
|
+
Existing information: {user_name}'s relationship status: Has a boyfriend
|
113
|
+
Thought: From the first sentence, it can be inferred that {user_name} is currently single, which contradicts the existing information. Therefore, the new information should take precedence. From the second sentence, it can be inferred that {user_name} is being pursued by an 18-year-old male but does not like him. The third sentence expresses {user_name}'s ideal partner type but is not related to {user_name}'s relationship status. Integrating this, we conclude that {user_name}'s relationship status is single and being pursued by an 18-year-old male but does not like him.
|
114
|
+
{user_name}'s profile: <Single, pursued by an 18-year-old male but does not like him>
|
115
|
+
|
116
|
+
Example 6:
|
117
|
+
{user_name}'s girlfriend's birthday is next month.
|
118
|
+
{user_name}'s birthday is on July 15th.
|
119
|
+
{user_name} often skips classes at school.
|
120
|
+
{user_name} likes playing basketball.
|
121
|
+
Category: {user_name}'s Birthday
|
122
|
+
Existing Information: {user_name}'s Birthday: July 15, 1987.
|
123
|
+
Thoughts: The first sentence mentions a birthday, but it is not the user's birthday, so it does not provide information about the user's birthday. From the second sentence, we know that the user's birthday is on July 15th, which is consistent with the existing information. We can conclude that the user's birthday is July 15, 1987.
|
124
|
+
{user_name}'s profile: <July 15, 1987>
|
125
|
+
|
126
|
+
Example 7:
|
127
|
+
Today, {user_name} played basketball with classmates.
|
128
|
+
Tomorrow, {user_name} is going to Hangzhou with his girlfriend.
|
129
|
+
Today, {user_name} bought 100 shares of Alibaba stock.
|
130
|
+
Category: {user_name}'s Company Address
|
131
|
+
Existing Information: {user_name}'s Company Address:
|
132
|
+
Thoughts: There is no information related to the company address, no new information extracted.
|
133
|
+
{user_name}'s profile: <None>
|
134
|
+
|
135
|
+
update_insight_user_query_zh: |
|
136
|
+
{user_query}
|
137
|
+
类别:{insight_key}
|
138
|
+
已有信息:{insight_key_value}
|
139
|
+
|
140
|
+
update_insight_user_query: |
|
141
|
+
{user_query}
|
142
|
+
Category: {insight_key}
|
143
|
+
Existing information: {insight_key_value}
|
144
|
+
|
145
|
+
insight_string_format_zh: |
|
146
|
+
{name}的{key}
|
147
|
+
|
148
|
+
insight_string_format: |
|
149
|
+
The {key} of {name}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
soft_comparative_step_task_memory_prompt: |
|
2
|
+
You are an expert AI analyst comparing higher-scoring and lower-scoring step sequences to extract performance insights.
|
3
|
+
|
4
|
+
Your task is to identify the key differences between higher and lower performing approaches at the step level.
|
5
|
+
Focus on what made the higher-scoring approach more effective, even when both approaches may have had partial success.
|
6
|
+
|
7
|
+
SOFT COMPARATIVE ANALYSIS FRAMEWORK:
|
8
|
+
● PERFORMANCE FACTORS: Identify what specifically contributed to the higher score
|
9
|
+
● APPROACH DIFFERENCES: Compare methodologies and execution strategies
|
10
|
+
● EFFICIENCY ANALYSIS: Analyze why one approach was more efficient or effective
|
11
|
+
● OPTIMIZATION INSIGHTS: Extract lessons for improving performance
|
12
|
+
|
13
|
+
EXTRACTION PRINCIPLES:
|
14
|
+
● Focus on INCREMENTAL IMPROVEMENTS and performance optimization
|
15
|
+
● Extract QUALITY INDICATORS that differentiate better vs good approaches
|
16
|
+
● Identify REFINEMENT STRATEGIES that lead to higher scores
|
17
|
+
● Frame insights as PERFORMANCE ENHANCEMENT guidelines
|
18
|
+
|
19
|
+
# Higher-Scoring Step Sequence (Score: {higher_score})
|
20
|
+
{higher_steps}
|
21
|
+
|
22
|
+
# Lower-Scoring Step Sequence (Score: {lower_score})
|
23
|
+
{lower_steps}
|
24
|
+
|
25
|
+
|
26
|
+
OUTPUT FORMAT:
|
27
|
+
Generate 1-2 performance improvement insights as JSON objects:
|
28
|
+
```json
|
29
|
+
[
|
30
|
+
{{
|
31
|
+
"when_to_use": "Specific scenarios where this performance insight applies",
|
32
|
+
"experience": "Detailed analysis of what made the higher-scoring approach more effective",
|
33
|
+
"tags": ["performance_optimization", "score_improvement", "relevant_keywords"],
|
34
|
+
"confidence": 0.7,
|
35
|
+
"step_type": "reasoning|action|observation|decision",
|
36
|
+
"tools_used": ["list", "of", "tools"]
|
37
|
+
}}
|
38
|
+
]
|
39
|
+
```
|
40
|
+
|
41
|
+
hard_comparative_step_task_memory_prompt: |
|
42
|
+
You are an expert AI analyst comparing successful and failed step sequences to extract differential insights.
|
43
|
+
|
44
|
+
Your task is to identify the key differences between success and failure patterns at the step level.
|
45
|
+
Focus on critical decision points, technique variations, and approach differences.
|
46
|
+
|
47
|
+
COMPARATIVE ANALYSIS FRAMEWORK:
|
48
|
+
● DECISION CONTRAST: Compare critical decisions made in success vs failure cases
|
49
|
+
● TECHNIQUE VARIATIONS: Identify different approaches and their outcomes
|
50
|
+
● TIMING DIFFERENCES: Analyze when certain actions were taken and their impact
|
51
|
+
● SUCCESS FACTORS: Extract what specifically made the difference
|
52
|
+
|
53
|
+
EXTRACTION PRINCIPLES:
|
54
|
+
● Frame comparisons as PRINCIPLES as well as case-specific SOLUTIONS
|
55
|
+
● Identify PATTERNS that differentiate effective vs ineffective approaches
|
56
|
+
● Extract RULES that can guide future similar situations
|
57
|
+
● Focus on UNDERLYING MECHANISMS rather than surface-level differences
|
58
|
+
|
59
|
+
# Successful Step Sequence
|
60
|
+
{success_steps}
|
61
|
+
|
62
|
+
# Failed Step Sequence
|
63
|
+
{failure_steps}
|
64
|
+
|
65
|
+
# Similarity Score: {similarity_score}
|
66
|
+
|
67
|
+
OUTPUT FORMAT:
|
68
|
+
Generate 1-2 comparative insights as JSON objects:
|
69
|
+
```json
|
70
|
+
[
|
71
|
+
{{
|
72
|
+
"when_to_use": "Specific scenarios where this comparative insight applies",
|
73
|
+
"experience": "Detailed comparison highlighting why success approach works better",
|
74
|
+
"tags": ["comparative_analysis", "success_factors", "relevant_keywords"],
|
75
|
+
"confidence": 0.8,
|
76
|
+
"step_type": "reasoning|action|observation|decision"
|
77
|
+
}}
|
78
|
+
]
|
79
|
+
```
|
@@ -0,0 +1,42 @@
|
|
1
|
+
failure_step_task_memory_prompt: |
|
2
|
+
You are an expert AI analyst reviewing failed step sequences from an AI agent execution.
|
3
|
+
|
4
|
+
Your task is to extract learning task memories from failures to prevent similar mistakes in future executions.
|
5
|
+
Focus on identifying error patterns, missed opportunities, and alternative approaches.
|
6
|
+
|
7
|
+
ANALYSIS FRAMEWORK:
|
8
|
+
● FAILURE POINT IDENTIFICATION: Pinpoint where and why the steps went wrong
|
9
|
+
● ERROR PATTERN ANALYSIS: Identify recurring mistakes or problematic approaches
|
10
|
+
● ALTERNATIVE APPROACHES: Suggest what could have been done differently
|
11
|
+
● PREVENTION STRATEGIES: Extract actionable insights to avoid similar failures
|
12
|
+
|
13
|
+
EXTRACTION PRINCIPLES:
|
14
|
+
● Extract GENERAL PRINCIPLES as well as SPECIFIC INSTRUCTIONS
|
15
|
+
● Focus on PATTERNS and RULES as well as particular instances
|
16
|
+
|
17
|
+
# Original Query
|
18
|
+
{query}
|
19
|
+
|
20
|
+
# Step Sequence Analysis
|
21
|
+
{step_sequence}
|
22
|
+
|
23
|
+
# Context Information
|
24
|
+
{context}
|
25
|
+
|
26
|
+
# Outcome
|
27
|
+
This step sequence was part of a {outcome} trajectory.
|
28
|
+
|
29
|
+
OUTPUT FORMAT:
|
30
|
+
Generate 1-3 step-level failure prevention insights as JSON objects:
|
31
|
+
```json
|
32
|
+
[
|
33
|
+
{{
|
34
|
+
"when_to_use": "Specific situations where this lesson should be remembered",
|
35
|
+
"experience": "Universal principle or rule extracted from the failure pattern ",
|
36
|
+
"tags": ["error_prevention", "failure_analysis", "relevant_keywords"],
|
37
|
+
"confidence": 0.7,
|
38
|
+
"step_type": "reasoning|action|observation|decision",
|
39
|
+
"tools_used": ["list", "of", "tools"]
|
40
|
+
}}
|
41
|
+
]
|
42
|
+
```
|
@@ -0,0 +1,29 @@
|
|
1
|
+
task_memory_validation_prompt: |
|
2
|
+
You are an expert AI analyst tasked with validating the quality and usefulness of extracted step-level task memories.
|
3
|
+
|
4
|
+
Your task is to assess whether the extracted task memory is actionable, accurate, and valuable for future agent executions.
|
5
|
+
|
6
|
+
VALIDATION CRITERIA:
|
7
|
+
● ACTIONABILITY: Is the task memory specific enough to guide future actions?
|
8
|
+
● ACCURACY: Does the task memory correctly reflect the patterns observed?
|
9
|
+
● RELEVANCE: Is the task memory applicable to similar future scenarios?
|
10
|
+
● CLARITY: Is the task memory clearly articulated and understandable?
|
11
|
+
● UNIQUENESS: Does the task memory provide novel insights or common knowledge?
|
12
|
+
|
13
|
+
# Task Memory to Validate
|
14
|
+
Condition: {condition}
|
15
|
+
Task Memory Content: {task_memory_content}
|
16
|
+
|
17
|
+
OUTPUT FORMAT:
|
18
|
+
Provide validation assessment:
|
19
|
+
```json
|
20
|
+
{{
|
21
|
+
"is_valid": true/false,
|
22
|
+
"score": 0.8,
|
23
|
+
"feedback": "Detailed explanation of validation decision",
|
24
|
+
"recommendations": "Suggestions for improvement if applicable"
|
25
|
+
}}
|
26
|
+
```
|
27
|
+
|
28
|
+
Score should be between 0.0 (poor quality) and 1.0 (excellent quality).
|
29
|
+
Mark as invalid if score is below 0.3 or if there are fundamental issues with the task memory.
|
@@ -0,0 +1,32 @@
|
|
1
|
+
summary_prompt: |
|
2
|
+
# Execution Process A
|
3
|
+
{execution_process_a}
|
4
|
+
|
5
|
+
# Execution Process B
|
6
|
+
{execution_process_b}
|
7
|
+
|
8
|
+
# Task
|
9
|
+
**Execution Process A** and **Execution Process B** represent two distinct execution trajectories of two agents, with Execution Process A being superior to Execution Process B.
|
10
|
+
Analyze these two trajectories and identify areas where Execution Process B can be improved relative to Execution Process A.
|
11
|
+
The insights derived should be generalizable, offering guidance for solving similar problems in the future.
|
12
|
+
These insights can include positive recommendations or point out pitfalls to avoid.
|
13
|
+
The format of the insights can be plain text or a snippet of code addressing a specific issue.
|
14
|
+
If no insights can be derived, return an empty list [].
|
15
|
+
For each insight, first specify the context in which it applies (when to use), followed by the insight itself. Provide up to two insights.
|
16
|
+
|
17
|
+
# Output Format
|
18
|
+
{summary_example}
|
19
|
+
|
20
|
+
summary_example: |
|
21
|
+
```json
|
22
|
+
[
|
23
|
+
{
|
24
|
+
"when_to_use": "...",
|
25
|
+
"experience": "..."
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"when_to_use": "...",
|
29
|
+
"experience": "..."
|
30
|
+
}
|
31
|
+
]
|
32
|
+
```
|