refine prompt of graph memory extract entities for search (#2013)

This commit is contained in:
Xiang Wang
2024-11-07 16:23:16 +08:00
committed by GitHub
parent 6f051036d9
commit b9e22beecb

View File

@@ -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},
],