You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: adjust skill prompt and fix some bugs (#988)
* feat: skill with history (#986)
* feat: skill with history
* feat: pass chat-history into skill
* feat: modify chat-history passing in skills
* feat: modify code
* fix: we don't need to pass history in part B
* fix: process skill memory
* feat: we do not return None with few history now
* feat: update skill
* feat: modify _split_task_chunk_by_llm
* feat: filter by embedding
* feat: modify skill
---------
Co-authored-by: yuan.wang <yuan.wang@yuanwangdebijibendiannao.local>
Co-authored-by: Wang Daoji <75928131+Wang-Daoji@users.noreply.github.com>
* feat: skill with history (#987)
* feat: skill with history
* feat: pass chat-history into skill
* feat: modify chat-history passing in skills
* feat: modify code
* fix: we don't need to pass history in part B
* fix: process skill memory
* feat: we do not return None with few history now
* feat: update skill
* feat: modify _split_task_chunk_by_llm
* feat: filter by embedding
* feat: modify skill
* feat: reinforce update rule
---------
Co-authored-by: yuan.wang <yuan.wang@yuanwangdebijibendiannao.local>
Co-authored-by: Wang Daoji <75928131+Wang-Daoji@users.noreply.github.com>
---------
Co-authored-by: yuan.wang <yuan.wang@yuanwangdebijibendiannao.local>
Co-authored-by: Wang Daoji <75928131+Wang-Daoji@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/memos/templates/skill_mem_prompt.py
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,9 @@
78
78
# Existing Skill Memories
79
79
{old_memories}
80
80
81
+
# Chat_history
82
+
{chat_history}
83
+
81
84
# Conversation Messages
82
85
{messages}
83
86
@@ -86,6 +89,11 @@
86
89
2. **Universality**: All fields except "example" must remain general and scenario-independent.
87
90
3. **Similarity Check**: If similar skill exists, set "update": true with "old_memory_id". Otherwise, set "update": false and leave "old_memory_id" empty.
88
91
4. **Language Consistency**: Match the conversation language.
92
+
5. **History Usage Constraints**:
93
+
- `chat_history` serves only as auxiliary context to supplement stable preferences or methodologies that are not explicitly stated in `messages` but may affect skill abstraction.
94
+
- `chat_history` may be considered only when it provides information **missing from `messages`** and **relevant to the current task’s goals, execution approach, or constraints**.
95
+
- `chat_history` must not be the primary source of a skill, and may only be used to enrich auxiliary fields such as `preference` or `experience`.
96
+
- If `chat_history` does not provide any valid information beyond what already exists in `messages`, or contains only greetings or background content, it must be completely ignored.
"others": {"Section Title": "Content here", "reference.md": "# Reference content for this skill"},
102
110
"update": false,
103
-
"old_memory_id": ""
111
+
"old_memory_id": "",
112
+
"whether_use_chat_history": false,
113
+
"content_of_related_chat_history": ""
104
114
}
105
115
```
106
116
@@ -119,6 +129,10 @@
119
129
- **examples**: Complete output templates showing the final deliverable format and structure. Should demonstrate how the task result looks when this skill is applied, including format, sections, and content organization. Content can be abbreviated but must show the complete structure. Use markdown format for better readability
120
130
- **update**: true if updating existing skill, false if new
121
131
- **old_memory_id**: ID of skill being updated, or empty string if new
132
+
- **whether_use_chat_history**: Indicates whether information from chat_history that does not appear in messages was incorporated into the skill
133
+
- **content_of_related_chat_history**:
134
+
If whether_use_chat_history is true, provide a high-level summary of the type of historical information used (e.g., “long-term preference: prioritizes cultural attractions”); do not quote the original dialogue verbatim
0 commit comments