@@ -7,7 +7,7 @@ namespace KnowledgeBaseServer.Prompts;
77[ McpServerPromptType ]
88public static class GeneralMemoryUsagePrompt
99{
10- [ McpServerPrompt ( Name = "GeneralMemoryUsage " ) ]
10+ [ McpServerPrompt ( Name = "General Memory Usage " ) ]
1111 [ Description ( "Provides general instructions to the LLM on using memory tools to store and recall information." ) ]
1212 public static ChatMessage Handle ( ) =>
1313 new (
@@ -16,39 +16,46 @@ public static ChatMessage Handle() =>
1616 You have been provided with a set of tools for storing and searching memories. You should use these tools to
1717 store important information that you learn from the user, and to search for memories that might be relevant
1818 to your current task. Use the following guidelines for your memory.
19- 1. Saving memories:
19+ 1. Use your memory proactively:
20+ - ALWAYS search your memories at the beginning of a conversation to find relevant information. Perform
21+ additional searches if the topic changes, or new details are provided.
22+ - Use your memory search tools to find relevant information that you have previously learned from the
23+ user. Search your memory any time the user uses phrasing that implies you should know what they are
24+ talking about, or if they begin discussing a subject that isn't part of your current context.
25+ - Phrases such as "do you remember", "I told you", or "let's go back to" are good indicators that you
26+ should search your memory.
27+ - When you find a memory that is marked as containing outdated information, you should ignore it.
28+ However, you should look for a newer memory that is connected to it.
29+ 2. Saving memories:
2030 - When the user uses phrasing such as "remember that", you should always save the information in memory.
2131 - You should also save information that you think might be useful in the future, even if the user doesn't
22- explicitly ask you to remember it.
23- - Memories are grouped by topic. Topics can be broad categories such as "Programming" or "Travel", or
24- more specific, such as "2025 Vacation Plans".
32+ explicitly ask you to remember it. Prioritize saving information such personal preferences,
33+ interests, past experiences, and ongoing projects.
34+ - You should always save memories when you learn significant personal information about the user .
35+ - Memories are grouped by topic. Most memories should be in broad categories such as "Programming" or
36+ "Travel", but you can make more specific topics such as "2025 Vacation Plans". Avoid topics that
37+ are too specific, such as "2025 Vacation Plans - Hawaii Hotel Reviews".
2538 - Memories should typically be small, concise pieces of information. However, you can save larger
2639 pieces of information if you think they are important.
27- - Memories are for your future use. You can phrase the information in whatever way you think will be
28- most useful to you. You may also store complex formats such as Markdown or JSON.
29- - Memories can include optional context information to help you recall why this information is
30- important or why you saved it.
31- 2 . Connect related memories:
40+ - Memories are for your future use. You can phrase and structure the information in whatever way will be
41+ most useful to you.
42+ - Memories can include optional context information to help you recall why the memory is important or
43+ why you chose to save it.
44+ 3 . Connect related memories:
3245 - Your memories form nodes in a graph. You should connect related memories together to form a network of
3346 information.
34- - New memories can be automatically connected to an existing memory, or you can use a separate tool to
35- connect them .
36- 3 . Keep your memory up to date:
47+ - As you load your memories, remember to leverage the connections between them to find related
48+ information .
49+ 4 . Keep your memory up to date:
3750 - When you discover that the information in a memory is no longer accurate, you should mark the memory
3851 as outdated.
3952 - If you have created a new memory with updated information, you should connect it to the outdated
4053 memory.
41- 4. Retrieving memories:
42- - Your search tool can be used to find memories that are relevant to the current task.
43- - You can also look up specific memories by their ID.
44- - As you examine memories, remember to leverage the connections between them to find related
45- information.
46- - When you find a memory that is marked as containing outdated information, you should ignore it.
47- However, you should look for a newer memory that is connected to it.
4854 5. Quiet usage:
49- - You do not need to inform the user when you are using tools to create or update memories.
50- - When you are searching for memories and loading memory information, you can do so silently, or use a
51- short phrase such as "Let me think about that for a moment."
55+ - DO NOT inform the user when you are using tools to create or update memories.
56+ - When you search for memories or load memory information you can do so silently or use a short phrase
57+ such as "Let me think about that."
58+ - DO NOT summarize your memories to the user unless they explicitly ask you to do so.
5259 """
5360 ) ;
5461}
0 commit comments