graphiti/graphiti_core/prompts
Daniel Chalef 296287d076 Optimize edge deduplication prompt for caching and clarity
- Restructure prompt to place invariant instructions at top and dynamic context at bottom for better LLM caching
- Change 'id' to 'idx' in edge context lists to avoid confusion with other identifiers
- Remove 'fact_type_id' from edge types context as LLM only needs fact_type_name
- Remove dynamic range values from prompt instructions (e.g., "range 0-N")
- Add debug logging before LLM call to track input sizes
- Add validation logging after LLM response to catch invalid idx values
- Clarify that duplicate_facts uses EXISTING FACTS idx and contradicted_facts uses INVALIDATION CANDIDATES idx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-02 16:50:26 -07:00
..
__init__.py chore: Fix packaging (#38) 2024-08-25 10:07:50 -07:00
dedupe_edges.py Optimize edge deduplication prompt for caching and clarity 2025-10-02 16:50:26 -07:00
dedupe_nodes.py fix: Improve deduplication ID validation and logging (#965) 2025-10-02 12:22:07 -07:00
eval.py ensure ascii default to false (#817) 2025-08-08 11:20:02 -04:00
extract_edge_dates.py prompt update (#378) 2025-04-18 00:09:12 -04:00
extract_edges.py chore: Update edge extraction prompt to paraphrase instead of quote (#957) 2025-10-01 09:05:04 -07:00
extract_nodes.py fix: Fix typo in JSON entity extraction prompt (#953) 2025-10-01 11:23:39 -05:00
invalidate_edges.py Node dedupe efficiency (#490) 2025-05-15 13:56:33 -04:00
lib.py Gemini support (#324) 2025-04-06 09:27:04 -07:00
models.py chore: update version to 0.9.3 and restructure dependencies (#338) 2025-04-08 20:47:38 -07:00
prompt_helpers.py Add support for non-ASCII characters in LLM prompts (#805) 2025-08-08 11:07:32 -04:00
summarize_nodes.py Add support for non-ASCII characters in LLM prompts (#805) 2025-08-08 11:07:32 -04:00