From 32b5d83e3960349d7882365665ade82916366684 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Thu, 2 Oct 2025 11:55:11 -0700 Subject: [PATCH] fix: Remove redundant prompt text to reduce token usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consolidate 'using these exact IDs (0 through N-1)' with following sentence to eliminate repetition. Changes: - 'using these exact IDs (0 through {N-1}). Do not skip IDs or use IDs outside this range' - 'with IDs 0 through {N-1}. Do not skip or add IDs' Saves ~15 tokens per deduplication call. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- graphiti_core/prompts/dedupe_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphiti_core/prompts/dedupe_nodes.py b/graphiti_core/prompts/dedupe_nodes.py index 7ce46be5..84ea1317 100644 --- a/graphiti_core/prompts/dedupe_nodes.py +++ b/graphiti_core/prompts/dedupe_nodes.py @@ -167,7 +167,7 @@ def nodes(context: dict[str, Any]) -> list[Message]: Task: ENTITIES contains {len(context['extracted_nodes'])} entities with IDs 0 through {len(context['extracted_nodes']) - 1}. - Your response MUST include EXACTLY {len(context['extracted_nodes'])} resolutions using these exact IDs (0 through {len(context['extracted_nodes']) - 1}). Do not skip IDs or use IDs outside this range. + Your response MUST include EXACTLY {len(context['extracted_nodes'])} resolutions with IDs 0 through {len(context['extracted_nodes']) - 1}. Do not skip or add IDs. For every entity, return an object with the following keys: {{