reme-ai 0.1.0__tar.gz → 0.1.2__tar.gz
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-0.1.0 → reme_ai-0.1.2}/PKG-INFO +3 -6
- {reme_ai-0.1.0 → reme_ai-0.1.2}/pyproject.toml +7 -9
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/__init__.py +1 -1
- reme_ai-0.1.2/reme_ai/config/default.yaml +147 -0
- reme_ai-0.1.2/reme_ai/retrieve/personal/extract_time_prompt.yaml +135 -0
- reme_ai-0.1.2/reme_ai/retrieve/personal/print_memory_prompt.yaml +22 -0
- reme_ai-0.1.2/reme_ai/retrieve/task/build_query_prompt.yaml +6 -0
- reme_ai-0.1.2/reme_ai/retrieve/task/rerank_memory_prompt.yaml +25 -0
- reme_ai-0.1.2/reme_ai/retrieve/task/rewrite_memory_prompt.yaml +34 -0
- reme_ai-0.1.2/reme_ai/summary/personal/contra_repeat_prompt.yaml +127 -0
- reme_ai-0.1.2/reme_ai/summary/personal/get_observation_prompt.yaml +163 -0
- reme_ai-0.1.2/reme_ai/summary/personal/get_observation_with_time_prompt.yaml +158 -0
- reme_ai-0.1.2/reme_ai/summary/personal/get_reflection_subject_prompt.yaml +179 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/info_filter_op.py +7 -2
- reme_ai-0.1.2/reme_ai/summary/personal/info_filter_prompt.yaml +172 -0
- reme_ai-0.1.2/reme_ai/summary/personal/long_contra_repeat_prompt.yaml +120 -0
- reme_ai-0.1.2/reme_ai/summary/personal/update_insight_prompt.yaml +149 -0
- reme_ai-0.1.2/reme_ai/summary/task/comparative_extraction_prompt.yaml +79 -0
- reme_ai-0.1.2/reme_ai/summary/task/failure_extraction_prompt.yaml +42 -0
- reme_ai-0.1.2/reme_ai/summary/task/memory_validation_prompt.yaml +29 -0
- reme_ai-0.1.2/reme_ai/summary/task/simple_comparative_summary_prompt.yaml +32 -0
- reme_ai-0.1.2/reme_ai/summary/task/simple_summary_prompt.yaml +31 -0
- reme_ai-0.1.2/reme_ai/summary/task/success_extraction_prompt.yaml +42 -0
- reme_ai-0.1.2/reme_ai/summary/task/trajectory_segmentation_prompt.yaml +31 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai.egg-info/PKG-INFO +3 -6
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai.egg-info/SOURCES.txt +20 -0
- reme_ai-0.1.2/reme_ai.egg-info/requires.txt +1 -0
- reme_ai-0.1.0/reme_ai.egg-info/requires.txt +0 -4
- {reme_ai-0.1.0 → reme_ai-0.1.2}/LICENSE +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/README.md +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/app.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/config/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/config/config_parser.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/constants/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/constants/common_constants.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/constants/language_constants.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/enumeration/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/enumeration/language_constants.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/react/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/react/simple_react_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/extract_time_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/fuse_rerank_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/print_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/read_message_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/retrieve_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/semantic_rank_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/personal/set_query_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/task/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/task/build_query_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/task/merge_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/task/rerank_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/retrieve/task/rewrite_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/schema/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/schema/memory.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/contra_repeat_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/get_observation_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/get_observation_with_time_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/get_reflection_subject_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/load_today_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/long_contra_repeat_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/personal/update_insight_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/comparative_extraction_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/failure_extraction_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/memory_deduplication_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/memory_validation_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/pdf_preprocess_op_wrapper.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/simple_comparative_summary_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/simple_summary_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/success_extraction_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/trajectory_preprocess_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/summary/task/trajectory_segmentation_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/utils/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/utils/datetime_handler.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/utils/miner_u_pdf_processor.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/utils/op_utils.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/__init__.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/delete_memory_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/recall_vector_store_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/update_memory_freq_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/update_memory_utility_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/update_vector_store_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai/vector_store/vector_store_action_op.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai.egg-info/dependency_links.txt +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai.egg-info/entry_points.txt +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/reme_ai.egg-info/top_level.txt +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/setup.cfg +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/test/test1.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/test/test2.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/test/test3.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/test/test4.py +0 -0
- {reme_ai-0.1.0 → reme_ai-0.1.2}/test/test_update_insight_op.py +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: reme_ai
|
3
|
-
Version: 0.1.
|
4
|
-
Summary: Remember me
|
5
|
-
Author-email:
|
3
|
+
Version: 0.1.2
|
4
|
+
Summary: Remember me
|
5
|
+
Author-email: reme_team <reme_team@alibaba-inc.com>
|
6
6
|
License: Apache License
|
7
7
|
Version 2.0, January 2004
|
8
8
|
http://www.apache.org/licenses/
|
@@ -212,7 +212,4 @@ Requires-Python: >=3.12
|
|
212
212
|
Description-Content-Type: text/markdown
|
213
213
|
License-File: LICENSE
|
214
214
|
Requires-Dist: flowllm>=0.1.3
|
215
|
-
Requires-Dist: loguru
|
216
|
-
Requires-Dist: pydantic
|
217
|
-
Requires-Dist: numpy
|
218
215
|
Dynamic: license-file
|
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "reme_ai"
|
7
|
-
version = "0.1.
|
8
|
-
description = "Remember me
|
9
|
-
authors = [{ name = "
|
7
|
+
version = "0.1.2"
|
8
|
+
description = "Remember me"
|
9
|
+
authors = [{ name = "reme_team", email = "reme_team@alibaba-inc.com" }]
|
10
10
|
license = { file = "LICENSE" }
|
11
11
|
readme = "README.md"
|
12
12
|
requires-python = ">=3.12"
|
@@ -19,20 +19,18 @@ classifiers = [
|
|
19
19
|
|
20
20
|
dependencies = [
|
21
21
|
"flowllm>=0.1.3",
|
22
|
-
"loguru",
|
23
|
-
"pydantic",
|
24
|
-
"numpy"
|
25
22
|
]
|
26
23
|
|
27
24
|
[tool.setuptools.packages.find]
|
28
25
|
where = ["."]
|
29
26
|
include = ["reme_ai*"]
|
30
|
-
exclude = ["memoryscope*"]
|
27
|
+
exclude = ["memoryscope*", "test*", "cookbook*", "doc*", "library*", "dist*"]
|
31
28
|
|
32
29
|
[tool.setuptools.package-data]
|
33
|
-
|
34
|
-
"config/*.yaml",
|
30
|
+
reme_ai = [
|
35
31
|
"**/*.yaml",
|
32
|
+
"**/*.py",
|
33
|
+
"**/*.json",
|
36
34
|
]
|
37
35
|
|
38
36
|
[project.scripts]
|
@@ -0,0 +1,147 @@
|
|
1
|
+
# default config.yaml
|
2
|
+
backend: http
|
3
|
+
language: ""
|
4
|
+
thread_pool_max_workers: 32
|
5
|
+
ray_max_workers: 1
|
6
|
+
|
7
|
+
mcp:
|
8
|
+
transport: sse
|
9
|
+
host: "0.0.0.0"
|
10
|
+
port: 8002
|
11
|
+
|
12
|
+
http:
|
13
|
+
host: "0.0.0.0"
|
14
|
+
port: 8002
|
15
|
+
timeout_keep_alive: 600
|
16
|
+
limit_concurrency: 64
|
17
|
+
|
18
|
+
flow:
|
19
|
+
retrieve_task_memory:
|
20
|
+
flow_content: build_query_op >> recall_vector_store_op >> rerank_memory_op >> rewrite_memory_op
|
21
|
+
description: "Retrieves the most relevant top-k memory experiences from historical data based on the current query to enhance task-solving capabilities"
|
22
|
+
input_schema:
|
23
|
+
query:
|
24
|
+
type: "str"
|
25
|
+
description: "user query"
|
26
|
+
required: true
|
27
|
+
|
28
|
+
summary_task_memory:
|
29
|
+
flow_content: trajectory_preprocess_op >> (success_extraction_op|failure_extraction_op|comparative_extraction_op) >> memory_validation_op >> update_vector_store_op
|
30
|
+
description: "Summarizes conversation trajectories or messages into structured memory representations for long-term storage"
|
31
|
+
input_schema:
|
32
|
+
trajectories:
|
33
|
+
type: "list"
|
34
|
+
description: "A list of conversation trajectory information, including message content and score. This field does not need to be filled in, the system will complete it automatically."
|
35
|
+
required: false
|
36
|
+
|
37
|
+
retrieve_personal_memory:
|
38
|
+
flow_content: set_query_op >> (extract_time_op | (retrieve_memory_op >> semantic_rank_op)) >> fuse_rerank_op
|
39
|
+
description: "Retrieves the most relevant personal memories from historical data based on the query to enhance response quality"
|
40
|
+
input_schema:
|
41
|
+
query:
|
42
|
+
type: "str"
|
43
|
+
description: "user query"
|
44
|
+
required: true
|
45
|
+
|
46
|
+
summary_personal_memory:
|
47
|
+
flow_content: info_filter_op >> (get_observation_op | get_observation_with_time_op | load_today_memory_op) >> contra_repeat_op >> update_vector_store_op
|
48
|
+
description: "Consolidates user observations and memories by filtering information and removing redundancies for efficient storage"
|
49
|
+
input_schema:
|
50
|
+
trajectories:
|
51
|
+
type: "list"
|
52
|
+
description: "A list of conversation trajectory information, including message content and score. This field does not need to be filled in, the system will complete it automatically."
|
53
|
+
required: false
|
54
|
+
|
55
|
+
retrieve_task_memory_simple:
|
56
|
+
flow_content: build_query_op >> recall_vector_store_op >> merge_memory_op
|
57
|
+
description: "Retrieves the most relevant top-k memory experiences from historical data based on the current query with simplified processing"
|
58
|
+
input_schema:
|
59
|
+
query:
|
60
|
+
type: "str"
|
61
|
+
description: "current query"
|
62
|
+
required: true
|
63
|
+
|
64
|
+
summary_task_memory_simple:
|
65
|
+
flow_content: simple_summary_op >> update_vector_store_op
|
66
|
+
description: "Summarizes conversation trajectories or messages into memories using a simplified approach"
|
67
|
+
input_schema:
|
68
|
+
trajectories:
|
69
|
+
type: "list"
|
70
|
+
description: "A list of conversation trajectory information, including message content and score. This field does not need to be filled in, the system will complete it automatically."
|
71
|
+
required: false
|
72
|
+
|
73
|
+
vector_store:
|
74
|
+
flow_content: vector_store_action_op
|
75
|
+
description: "Directly operates on the vector store with various management actions"
|
76
|
+
input_schema:
|
77
|
+
action:
|
78
|
+
type: "str"
|
79
|
+
description: "vector store operations"
|
80
|
+
required: true
|
81
|
+
enum: [ copy, delete, delete_ids, dump, load ]
|
82
|
+
|
83
|
+
record_task_memory:
|
84
|
+
flow_content: update_memory_freq_op >> update_memory_utility_op >> update_vector_store_op
|
85
|
+
description: "Update the freq & utility attributes of retrieved task memories"
|
86
|
+
input_schema:
|
87
|
+
workspace_id:
|
88
|
+
type: "str"
|
89
|
+
description: "workspace id"
|
90
|
+
required: true
|
91
|
+
memory_dicts:
|
92
|
+
type: "list"
|
93
|
+
description: "A list of retrieved task memory corresponding to the current task."
|
94
|
+
required: true
|
95
|
+
update_utility:
|
96
|
+
type: "bool"
|
97
|
+
description: "Whether to update the utility attribute of the retrieved task memory."
|
98
|
+
required: true
|
99
|
+
|
100
|
+
delete_task_memory:
|
101
|
+
flow_content: delete_memory_op >> update_vector_store_op
|
102
|
+
description: "Delete task memories when utility/freq < utility_threshold and freq >= freq_threshold"
|
103
|
+
input_schema:
|
104
|
+
workspace_id:
|
105
|
+
type: "str"
|
106
|
+
description: "workspace id"
|
107
|
+
required: true
|
108
|
+
freq_threshold:
|
109
|
+
type: "int"
|
110
|
+
description: "The retrieved frequency threshold for deleting task memory."
|
111
|
+
required: true
|
112
|
+
utility_threshold:
|
113
|
+
type: "float"
|
114
|
+
description: "The utility/freq threshold for deleting task memory."
|
115
|
+
required: true
|
116
|
+
|
117
|
+
react:
|
118
|
+
flow_content: simple_react_op
|
119
|
+
description: "React to the current task with an agent"
|
120
|
+
input_schema:
|
121
|
+
query:
|
122
|
+
type: "str"
|
123
|
+
description: "user query"
|
124
|
+
required: true
|
125
|
+
|
126
|
+
llm:
|
127
|
+
default:
|
128
|
+
backend: openai_compatible
|
129
|
+
# model_name: qwen3-30b-a3b-thinking-2507
|
130
|
+
model_name: qwen3-30b-a3b-instruct-2507
|
131
|
+
params:
|
132
|
+
temperature: 0.6
|
133
|
+
|
134
|
+
embedding_model:
|
135
|
+
default:
|
136
|
+
backend: openai_compatible
|
137
|
+
model_name: text-embedding-v4
|
138
|
+
params:
|
139
|
+
dimensions: 1024
|
140
|
+
|
141
|
+
vector_store:
|
142
|
+
default:
|
143
|
+
backend: elasticsearch
|
144
|
+
embedding_model: default
|
145
|
+
# params:
|
146
|
+
# hosts: "http://localhost:9200"
|
147
|
+
# hosts: "http://11.160.132.46:8200"
|
@@ -0,0 +1,135 @@
|
|
1
|
+
time_string_format_zh: |
|
2
|
+
{year}年{month}{day}日,{year}年第{week}周,{weekday},{hour}时。
|
3
|
+
|
4
|
+
|
5
|
+
time_string_format: |
|
6
|
+
{month} {day}, {year}, {week}th week of {year}, {weekday}, at {hour}.
|
7
|
+
|
8
|
+
|
9
|
+
extract_time_system_zh: |
|
10
|
+
任务:从语句与语句发生的时间,推断并提取语句内容中指向的时间段。
|
11
|
+
回答尽可能完整的时间段。
|
12
|
+
回答的格式严格遵照示例中的已有格式规范。
|
13
|
+
若语句不涉及时间则回答无。
|
14
|
+
|
15
|
+
|
16
|
+
extract_time_system: |
|
17
|
+
Task: From the sentences and the time when they occurred, infer and extract the time periods indicated in the content of the sentences.
|
18
|
+
Answer with the most complete time periods possible.
|
19
|
+
The format of the answers must strictly adhere to the specifications in the examples provided.
|
20
|
+
If the sentence does not involve time, respond with "none."
|
21
|
+
|
22
|
+
|
23
|
+
extract_time_few_shot_zh: |
|
24
|
+
示例1:
|
25
|
+
句子:我记得你前年四月份去了阿联酋,阿联酋有哪些好玩的地方?迪拜和阿布扎比你更喜欢哪个?沙漠的景色壮观吗?
|
26
|
+
时间:1992年8月20日,1992年第34周,周一,18时。
|
27
|
+
回答:
|
28
|
+
- 年:1990 - 月:4月
|
29
|
+
|
30
|
+
示例2:
|
31
|
+
句子:后天下午三点的会议记得参加。我在日历上仔细标注了这个重要的日子,提醒自己不要错过。会议将在公司会议室举行,这是一个讨论未来发展方向的重要机会。
|
32
|
+
时间:2024年6月19日,2024年第25周,周二,13时。
|
33
|
+
回答:
|
34
|
+
- 年:2024 - 月:6月 - 日:21 - 时:15
|
35
|
+
|
36
|
+
示例3:
|
37
|
+
句子:下个月第一个周六去杭州玩。
|
38
|
+
时间:2005年7月15日,2005年第28周,周六,0时。
|
39
|
+
回答:
|
40
|
+
- 年:2005 - 月:8月 - 周:31 - 星期几:周六
|
41
|
+
|
42
|
+
示例4:
|
43
|
+
句子:上周末我们去的那个小镇真是太美了。
|
44
|
+
时间:1999年12月2日,1999年第48周,周二,8时。
|
45
|
+
回答:
|
46
|
+
- 年:1999 - 周:47 - 星期几:周六,周日
|
47
|
+
|
48
|
+
示例5:
|
49
|
+
句子:再过半小时就要宣讲了,记得准备材料。
|
50
|
+
时间:2020年6月22日,2020年第25周,周一,9时。
|
51
|
+
回答:
|
52
|
+
- 年:2020 - 月:6月 - 日:22 - 时:10
|
53
|
+
|
54
|
+
示例6:
|
55
|
+
句子:10000米长跑比赛的开始时间是3分47秒前。
|
56
|
+
时间:1987年2月17日,1987年第7周,周三,19时。
|
57
|
+
回答:
|
58
|
+
- 年:1987 - 月:2 - 日:17 - 时:19
|
59
|
+
|
60
|
+
示例7:
|
61
|
+
句子:上个月的这个时候我们还在筹备音乐会。每天都是忙碌而充实的日子,我们为音乐会的顺利举办而努力奋斗着。彩排、布景、节目安排,每一个细节都需要精心安排和准备。
|
62
|
+
时间:1995年11月24日,1995年第48周,周二,17时。
|
63
|
+
回答:
|
64
|
+
- 年:1995 - 月:10 - 日:24
|
65
|
+
|
66
|
+
示例8:
|
67
|
+
句子:我的朋友非常喜欢运动,他认为运动有助于增强身体素质。
|
68
|
+
时间:2015年1月23日,2015年第4周,周四,7时。
|
69
|
+
回答:
|
70
|
+
无
|
71
|
+
|
72
|
+
|
73
|
+
extract_time_few_shot: |
|
74
|
+
Example 1:
|
75
|
+
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?
|
76
|
+
Time: August 20, 1992, 34th week of 1992, Monday, at 18.
|
77
|
+
Answer:
|
78
|
+
- Year: 1990 - Month: 4
|
79
|
+
|
80
|
+
Example 2:
|
81
|
+
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.
|
82
|
+
Time: June 19, 2024, 25th week of 2024, Tuesday, at 13.
|
83
|
+
Answer:
|
84
|
+
- Year: 2024 - Month: 6 - Day: 21 - Hour: 15
|
85
|
+
|
86
|
+
Example 3:
|
87
|
+
Sentence: Next month on the first Saturday, let's go to Hangzhou.
|
88
|
+
Time: July 15, 2005, 28th week of 2005, Saturday, at 0.
|
89
|
+
Answer:
|
90
|
+
- Year: 2005 - Month: 8 - Week: 31 - Day of Week: 6
|
91
|
+
|
92
|
+
Example 4:
|
93
|
+
Sentence: The small town we visited last weekend was truly beautiful.
|
94
|
+
Time: December 2, 1999, 48th week of 1999, Tuesday, at 8.
|
95
|
+
Answer:
|
96
|
+
- Year: 1999 - Week: 47 - Day of Week: 6, 7
|
97
|
+
|
98
|
+
Example 5:
|
99
|
+
Sentence: The presentation will start in half an hour, remember to prepare the materials.
|
100
|
+
Time: June 22, 2020, 25th week of 2020, Monday, at 9.
|
101
|
+
Answer:
|
102
|
+
- Year: 2020 - Month: 6 - Day: 22 - Hour: 10
|
103
|
+
|
104
|
+
Example 6:
|
105
|
+
Sentence: The start time for the 10,000-meter race was 3 minutes and 47 seconds ago.
|
106
|
+
Time: February 17, 1987, 7th week of 1987, Wednesday, at 19.
|
107
|
+
Answer:
|
108
|
+
- Year: 1987 - Month: 2 - Day: 17 - Hour: 19
|
109
|
+
|
110
|
+
Example 7:
|
111
|
+
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.
|
112
|
+
Time: November 24, 1995, 48th week of 1995, Tuesday, at 17.
|
113
|
+
Answer:
|
114
|
+
- Year: 1995 - Month: 10 - Day: 24
|
115
|
+
|
116
|
+
Example 8:
|
117
|
+
Sentence: My friend loves sports very much and believes that exercise helps improve physical fitness.
|
118
|
+
Time: January 23, 2015, 4th week of 2015, Thursday, at 7.
|
119
|
+
Answer:
|
120
|
+
None
|
121
|
+
|
122
|
+
|
123
|
+
extract_time_user_query_zh: |
|
124
|
+
句子:{query}
|
125
|
+
时间:{query_time_str}
|
126
|
+
回答:
|
127
|
+
|
128
|
+
|
129
|
+
extract_time_user_query: |
|
130
|
+
Sentence: {query}
|
131
|
+
Time: {query_time_str}
|
132
|
+
Answer:
|
133
|
+
|
134
|
+
|
135
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
print_template_zh: |
|
2
|
+
========== {user_name}关于{target_name}的长期记忆 ==========
|
3
|
+
----- 观察记忆 -----
|
4
|
+
{observation_memory}
|
5
|
+
|
6
|
+
----- 洞察记忆 -----
|
7
|
+
{insight_memory}
|
8
|
+
|
9
|
+
----- 过期记忆 -----
|
10
|
+
{expired_memory}
|
11
|
+
|
12
|
+
|
13
|
+
print_template: |
|
14
|
+
========== The {user_name}'s long-term memory about {target_name} ==========
|
15
|
+
----- observation memory -----
|
16
|
+
{observation_memory}
|
17
|
+
|
18
|
+
----- insight memory -----
|
19
|
+
{insight_memory}
|
20
|
+
|
21
|
+
----- expired memory -----
|
22
|
+
{expired_memory}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
query_build: |
|
2
|
+
# Execution Process
|
3
|
+
{execution_process}
|
4
|
+
|
5
|
+
Read through the entire execution process to understand which part is currently being executed.
|
6
|
+
Generate a `query` that reflects the current state, which will later be used to search for similar problems in the database and help resolve the issue at hand.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
memory_rerank_prompt: |
|
2
|
+
You are an expert AI analyst tasked with reranking retrieved experiences based on their relevance to a specific query.
|
3
|
+
|
4
|
+
Your task is to analyze the candidates and rank them by relevance, considering:
|
5
|
+
● DIRECT RELEVANCE: How directly applicable the experience is to the current query
|
6
|
+
● SITUATION SIMILARITY: How similar the experience context is to the current situation
|
7
|
+
● ACTIONABILITY: How actionable and specific the experience is
|
8
|
+
● QUALITY: The overall quality and clarity of the experience
|
9
|
+
|
10
|
+
# Current Query
|
11
|
+
{query}
|
12
|
+
|
13
|
+
# Candidate Experiences (Total: {num_candidates})
|
14
|
+
{candidates}
|
15
|
+
|
16
|
+
OUTPUT FORMAT:
|
17
|
+
Provide a ranked list of candidate indices (0-based) from most relevant to least relevant:
|
18
|
+
```json
|
19
|
+
{{
|
20
|
+
"ranked_indices": [2, 0, 4, 1, 3],
|
21
|
+
"reasoning": "Brief explanation of ranking rationale"
|
22
|
+
}}
|
23
|
+
```
|
24
|
+
|
25
|
+
Note: Include ALL candidate indices in the ranking, even if some are less relevant.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
memory_rewrite_prompt: |
|
2
|
+
You are an expert AI assistant tasked with rewriting and reorganizing context content to make it more relevant and actionable for the current task.
|
3
|
+
|
4
|
+
Your task is to take the original context (containing multiple experiences) and rewrite it as a cohesive, task-specific guidance that directly addresses the current situation.
|
5
|
+
|
6
|
+
REWRITING GUIDELINES:
|
7
|
+
● RELEVANCE FOCUS: Emphasize the most relevant aspects of each experience. Prioritize the most relevant experiences. Use clear, direct language.
|
8
|
+
● ACTIONABLE INSIGHTS: Extract specific, actionable guidance. Make the context immediately actionable
|
9
|
+
● COHERENT NARRATIVE: Create a flowing narrative rather than disconnected tips
|
10
|
+
● SITUATIONAL AWARENESS: Adapt the guidance to the current situation
|
11
|
+
|
12
|
+
# Current Task/Query
|
13
|
+
{current_query}
|
14
|
+
|
15
|
+
# Current Trajectory
|
16
|
+
{current_context}
|
17
|
+
|
18
|
+
# Original Context Content (Multiple Experiences)
|
19
|
+
{original_context}
|
20
|
+
|
21
|
+
OUTPUT FORMAT:
|
22
|
+
Provide the rewritten context:
|
23
|
+
```json
|
24
|
+
{{
|
25
|
+
"rewritten_context": "A cohesive, task-specific context message that reorganizes and adapts the original experiences for the current task. This should be written as a unified guidance rather than separate experience items.",
|
26
|
+
}}
|
27
|
+
```
|
28
|
+
|
29
|
+
Guidelines:
|
30
|
+
- Rewrite as a unified, flowing guidance
|
31
|
+
- Adapt terminology and examples to match the current task domain
|
32
|
+
- Consolidate overlapping insights into coherent recommendations
|
33
|
+
- Prioritize experiences most relevant to the current situation
|
34
|
+
- Make the guidance feel custom-written for this specific task
|
@@ -0,0 +1,127 @@
|
|
1
|
+
contra_repeat_system_zh: |
|
2
|
+
任务:对下面的{num_obs}句句子,逐一判断是否与“前面序号”的任意句子存在信息的矛盾,或者句子的主要信息被“前面序号”的任意句子中的信息包含。
|
3
|
+
注意:对每句句子,只判断与“前面序号”的句子的关系,不要判断与“后面序号”的句子的关系。
|
4
|
+
其中矛盾的形式可以有很多种,可以是逻辑上的矛盾,可以是属性上的变化导致的矛盾,比如不能同时在两个地方工作,同一个时刻不能在两个地点,同一个时刻不能干两件事情等等。
|
5
|
+
对每个句子都做一个判断,最后一共输出{num_obs}条判断。
|
6
|
+
请一步步思考,并按如下格式输出:
|
7
|
+
思考:思考的依据和过程,30字以内。
|
8
|
+
判断:<句子序号> <矛盾,被包含,无>,一定加<>
|
9
|
+
|
10
|
+
|
11
|
+
contra_repeat_system: |
|
12
|
+
Task: For the following {num_obs} sentences, determine whether each sentence contradicts any of the previous numbered sentences or if the main information in the sentence is contained within the information from any of the previous numbered sentences.
|
13
|
+
Note: Only determine the relationship with the "previous numbered" sentences, do not judge the "later numbered" sentences.
|
14
|
+
The forms of contradiction can be varied. It can be a logical contradiction, or a contradiction due to changes in attributes, for example, not being able to work in two places at once, not being able to be in two places at the same time, not being able to do two things at the same time, etc.
|
15
|
+
Make a judgment for each sentence and output a total of {num_obs} judgments.
|
16
|
+
Think step by step and output in the following format:
|
17
|
+
Thought: Basis and process of thinking, within 30 words.
|
18
|
+
Judgment: <Sentence Number> <Contradiction, Contained, None>, must be enclosed in <>.
|
19
|
+
|
20
|
+
|
21
|
+
contra_repeat_few_shot_zh: |
|
22
|
+
示例1
|
23
|
+
句子:
|
24
|
+
1 {user_name}经常失眠,对安眠药的效果感兴趣,暗示可能考虑使用。
|
25
|
+
2 {user_name}经常失眠,寻求缓解方法。
|
26
|
+
3 陈伟业是{user_name}的领导
|
27
|
+
4 陈伟业是{user_name}的领导
|
28
|
+
5 陈伟业是{user_name}的领导,是银行分行行长
|
29
|
+
6 {user_name}喜欢吃西瓜
|
30
|
+
7 {user_name}喜欢吃苹果
|
31
|
+
|
32
|
+
思考:第1句不会存在与前面序号句子的矛盾或者完全重复。
|
33
|
+
判断:<1> <无>
|
34
|
+
思考:第2句中所有信息都被前面序号中第1句的信息完全包含。
|
35
|
+
判断:<2> <被包含>
|
36
|
+
思考:第3句信息没有在前面序号句子中出现
|
37
|
+
判断:<3> <无>
|
38
|
+
思考:第4句与前面序号中第3句的信息完全重复,即被完全包含。
|
39
|
+
判断:<4> <被包含>
|
40
|
+
思考:第5句中陈伟业是{user_name}的领导的信息被前面序号中第3句的信息包含,但新增了陈伟业是银行分行行长的信息,故不是被完全包含。
|
41
|
+
判断:<5> <无>
|
42
|
+
思考:第6句中表达了{user_name}的水果偏好,喜欢吃西瓜,信息没有在前面序号句子中出现。
|
43
|
+
判断:<6> <无>
|
44
|
+
思考:第7句也表达了{user_name}的水果偏好,喜欢吃桃子,和前面序号中的第6句不冲突,喜好可以同时存在。
|
45
|
+
判断:<7> <无>
|
46
|
+
|
47
|
+
示例2
|
48
|
+
句子:
|
49
|
+
1 {user_name}的孩子成绩不太好。
|
50
|
+
2 {user_name}的孩子在学校经常逃课。
|
51
|
+
3 {user_name}的父亲生日在2024年6月2日,{user_name}打算准备礼物。
|
52
|
+
4 {user_name}的父亲生日在2024年5月1日。
|
53
|
+
5 {user_name}很喜欢和同班同学打篮球。
|
54
|
+
6 {user_name}喜欢打篮球。
|
55
|
+
|
56
|
+
思考:第1句不会存在与前面序号句子的矛盾或者完全重复。
|
57
|
+
判断:<1> <无>
|
58
|
+
思考:第2句与前面序号句子既不矛盾也不重复。
|
59
|
+
判断:<2> <无>
|
60
|
+
思考:第3句与前面序号句子既不矛盾也不重复。
|
61
|
+
判断:<3> <无>
|
62
|
+
思考:第4句关于{user_name}父亲生日的日期信息与前面序号句子第3句矛盾了。
|
63
|
+
判断:<4> <矛盾>
|
64
|
+
思考:第5句与前面序号句子既不矛盾也不重复。
|
65
|
+
判断:<5> <无>
|
66
|
+
思考:第6句中所有信息都被前面序号中第5句的信息完全包含。
|
67
|
+
判断:<2> <被包含>
|
68
|
+
|
69
|
+
|
70
|
+
contra_repeat_few_shot: |
|
71
|
+
Example 1
|
72
|
+
Sentences:
|
73
|
+
1 {user_name} suffers from insomnia frequently and is interested in the effects of sleeping pills, suggesting a possible consideration of their use.
|
74
|
+
2 {user_name} suffers from insomnia frequently and seeks remedies.
|
75
|
+
3 Charles is {user_name}'s supervisor.
|
76
|
+
4 Charles is {user_name}'s supervisor.
|
77
|
+
5 Charles is {user_name}'s supervisor and the branch manager of a bank.
|
78
|
+
6 {user_name} loves playing basketball with classmates.
|
79
|
+
7 {user_name} likes playing basketball.
|
80
|
+
|
81
|
+
Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences.
|
82
|
+
Judgment: <1> <None>
|
83
|
+
Thought: All information in the second sentence is completely contained within the information of the first sentence.
|
84
|
+
Judgment: <2> <Contained>
|
85
|
+
Thought: The information in the third sentence does not appear in the previously numbered sentences.
|
86
|
+
Judgment: <3> <None>
|
87
|
+
Thought: The fourth sentence is completely repetitive of the information in the third sentence, i.e., it is completely contained.
|
88
|
+
Judgment: <4> <Contained>
|
89
|
+
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.
|
90
|
+
Judgment: <5> <None>
|
91
|
+
Thought: Sentence 6 expresses {user_name}'s fruit preference, liking to eat watermelon, which is information not present in any preceding sentences.
|
92
|
+
Judgment: <6> <None>
|
93
|
+
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.
|
94
|
+
Judgment: <7> <None>
|
95
|
+
|
96
|
+
Example 2
|
97
|
+
Sentences:
|
98
|
+
1 {user_name}'s child does not perform well academically.
|
99
|
+
2 {user_name}'s child often skips school.
|
100
|
+
3 {user_name}'s father's birthday is on June 2, 2024, and {user_name} plans to prepare a gift.
|
101
|
+
4 {user_name}'s father's birthday is on May 1, 2024.
|
102
|
+
5 {user_name} loves playing basketball with classmates.
|
103
|
+
6 {user_name} likes playing basketball.
|
104
|
+
|
105
|
+
Thought: The first sentence does not have any contradictions or complete repetitions with the previously numbered sentences.
|
106
|
+
Judgment: <1> <None>
|
107
|
+
Thought: The second sentence neither contradicts nor repeats any of the previously numbered sentences.
|
108
|
+
Judgment: <2> <None>
|
109
|
+
Thought: The third sentence neither contradicts nor repeats any of the previously numbered sentences.
|
110
|
+
Judgment: <3> <None>
|
111
|
+
Thought: The date of {user_name}'s father's birthday in the fourth sentence contradicts the information in the third sentence.
|
112
|
+
Judgment: <4> <Contradiction>
|
113
|
+
Thought: The fifth sentence neither contradicts nor repeats any of the previously numbered sentences.
|
114
|
+
Judgment: <5> <None>
|
115
|
+
Thought: All information in the sixth sentence is completely contained within the information of the fifth sentence.
|
116
|
+
Judgment: <6> <Contained>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
contra_repeat_user_query_zh: |
|
121
|
+
句子:
|
122
|
+
{user_query}
|
123
|
+
|
124
|
+
|
125
|
+
contra_repeat_user_query: |
|
126
|
+
Sentences:
|
127
|
+
{user_query}
|