From b9e22beecb3857a4c3dc80b6a565bf52c176d0e8 Mon Sep 17 00:00:00 2001 From: Xiang Wang <376752150@qq.com> Date: Thu, 7 Nov 2024 16:23:16 +0800 Subject: [PATCH] refine prompt of graph memory extract entities for search (#2013) --- mem0/memory/graph_memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mem0/memory/graph_memory.py b/mem0/memory/graph_memory.py index 55d644c9..7fcfdd7b 100644 --- a/mem0/memory/graph_memory.py +++ b/mem0/memory/graph_memory.py @@ -175,7 +175,7 @@ class MemoryGraph: messages=[ { "role": "system", - "content": f"You are a smart assistant who understands the entities, their types, and relations in a given text. If user message contains self reference such as 'I', 'me', 'my' etc. then use {filters['user_id']} as the source node. Extract the entities.", + "content": f"You are a smart assistant who understands the entities, their types, and relations in a given text. If user message contains self reference such as 'I', 'me', 'my' etc. then use {filters['user_id']} as the source node. Extract the entities. ***DO NOT*** answer the question itself if the given text is a question.", }, {"role": "user", "content": query}, ],