Skip to content

Commit

Permalink
refine prompt of graph memory extract entities for search (#2013)
Browse files Browse the repository at this point in the history
  • Loading branch information
GingerMoon authored Nov 7, 2024
1 parent 6f05103 commit b9e22be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mem0/memory/graph_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _search(self, query, filters, limit=100):
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},
],
Expand Down

0 comments on commit b9e22be

Please sign in to comment.