Skip to content

Commit

Permalink
update summary length (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
prasmussen15 authored Dec 5, 2024
1 parent ab06889 commit 7ca6121
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions graphiti_core/prompts/summarize_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down Expand Up @@ -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.
<ENTITY>
{context['node_name']}
</ENTITY>
Expand All @@ -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)}
Expand Down

0 comments on commit 7ca6121

Please sign in to comment.