From f632a8ae9e619981fd8fffdaf1a34dccf27be795 Mon Sep 17 00:00:00 2001 From: Jack Ryan <61809814+jackaldenryan@users.noreply.github.com> Date: Tue, 30 Sep 2025 10:00:14 -0500 Subject: [PATCH] Improve JSON entity extraction prompt (#949) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add guideline to extract entities from all JSON properties, not just primary fields like name/user. This ensures comprehensive entity extraction while maintaining the existing exclusion of date properties. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- graphiti_core/prompts/extract_nodes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphiti_core/prompts/extract_nodes.py b/graphiti_core/prompts/extract_nodes.py index d5774213..3b98a84a 100644 --- a/graphiti_core/prompts/extract_nodes.py +++ b/graphiti_core/prompts/extract_nodes.py @@ -152,7 +152,8 @@ Indicate the classified entity type by providing its entity_type_id. Guidelines: 1. Always try to extract an entities that the JSON represents. This will often be something like a "name" or "user field -2. Do NOT extract any properties that contain dates +2. Extract all entities mentioned in all other properties throughout the JSON structure +3. Do NOT extract any properties that contain dates """ return [ Message(role='system', content=sys_prompt),