diff --git a/graphiti_core/prompts/summarize_nodes.py b/graphiti_core/prompts/summarize_nodes.py index c3ff3e0d..fc03d828 100644 --- a/graphiti_core/prompts/summarize_nodes.py +++ b/graphiti_core/prompts/summarize_nodes.py @@ -54,6 +54,8 @@ def summarize_pair(context: dict[str, Any]) -> list[Message]: role='user', content=f""" Synthesize the information from the following two summaries into a single succinct summary. + + Summaries must be under 500 words. Summaries: {json.dumps(context['node_summaries'], indent=2)} @@ -81,6 +83,8 @@ def summarize_context(context: dict[str, Any]) -> list[Message]: information from the provided MESSAGES. Your summary should also only contain information relevant to the provided ENTITY. + Summaries must be under 500 words. + {context['node_name']} @@ -99,6 +103,7 @@ def summary_description(context: dict[str, Any]) -> list[Message]: role='user', content=f""" Create a short one sentence description of the summary that explains what kind of information is summarized. + Summaries must be under 500 words. Summary: {json.dumps(context['summary'], indent=2)}