graphiti/graphiti_core
Daniel Chalef 5ca8b9565c
fix: Improve deduplication ID validation and logging (#965)
* fix: Improve deduplication ID validation and logging

- Add comprehensive logging to verify IDs sent to LLM (sent vs received)
- Enhance prompt with explicit ID bounds (0 through N-1)
- Add validation warnings for missing and extra IDs from LLM responses
- Improve error message clarity for invalid dedupe IDs
- Log actual IDs sent to LLM to confirm no index leakage

This helps diagnose cases where the LLM returns IDs outside the valid
range (e.g., ID 19 when only 0-18 were sent).

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove redundant logging parameter

Address reviewer comment about redundant third parameter in debug log statement.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Address reviewer comments on list slicing and prompt clarity

- Fix list slicing bug: change <= to < to avoid gap when exactly 20 elements
  (previously would skip element 10 when showing 21 elements)
- Consolidate redundant prompt phrasing while maintaining clarity
  (reduced from 3 sentences to 2, keeping essential constraints)

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove redundant prompt text to reduce token usage

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 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-02 12:22:07 -07:00
..
cross_encoder fix typo and model selector (#843) 2025-08-18 11:15:45 -04:00
driver Graph quality updates (#922) 2025-09-23 17:53:39 -04:00
embedder OpenSearch Integration for Neo4j (#896) 2025-09-09 10:51:46 -04:00
llm_client Make natural language extraction configurable (#943) 2025-09-30 11:09:03 -04:00
migrations cleanup (#894) 2025-09-05 11:30:46 -04:00
models OpenSearch Integration for Neo4j (#896) 2025-09-09 10:51:46 -04:00
prompts fix: Improve deduplication ID validation and logging (#965) 2025-10-02 12:22:07 -07:00
search fix-fulltext-syntax-error (#914) 2025-09-23 10:52:44 -04:00
telemetry feat: add telemetry with PostHog and update Docker configurations (#633) 2025-06-27 12:23:30 -07:00
utils fix: Improve deduplication ID validation and logging (#965) 2025-10-02 12:22:07 -07:00
__init__.py chore: Fix packaging (#38) 2024-08-25 10:07:50 -07:00
edges.py OpenSearch updates (#906) 2025-09-14 01:43:37 -04:00
errors.py Add group ID validation and error handling (#618) 2025-06-24 09:33:54 -07:00
graph_queries.py Graph quality updates (#922) 2025-09-23 17:53:39 -04:00
graphiti.py Allow Edge extraction to keep discovered edge labels (#950) 2025-09-29 21:32:47 -07:00
graphiti_types.py ensure ascii default to false (#817) 2025-08-08 11:20:02 -04:00
helpers.py fix-fulltext-syntax-error (#914) 2025-09-23 10:52:44 -04:00
nodes.py OpenSearch updates (#906) 2025-09-14 01:43:37 -04:00
py.typed Add py.typed file (#105) 2024-09-11 08:44:06 -04:00