Commit fe19482
fix(summary): exclude duplicate edges from node summary generation (#1223)
* fix(summary): exclude duplicate edges from node summary generation
When resolving extracted edges, edges that match existing edges in the
graph were still being passed to node summary generation, causing facts
to be duplicated in summaries.
Changes:
- Update resolve_extracted_edges to return new_edges (non-duplicates)
- Update _extract_and_resolve_edges to pass through new_edges
- Pass only new_edges to extract_attributes_from_nodes in add_episode
- An edge is considered "new" if its resolved UUID matches extracted UUID
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: bump version to 0.27.1
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 6e90bc6 commit fe19482
File tree
4 files changed
+45
-13
lines changed- graphiti_core
- utils/maintenance
- tests/utils/maintenance
4 files changed
+45
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
443 | | - | |
444 | | - | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
445 | 454 | | |
446 | 455 | | |
447 | 456 | | |
| |||
455 | 464 | | |
456 | 465 | | |
457 | 466 | | |
458 | | - | |
| 467 | + | |
459 | 468 | | |
460 | 469 | | |
461 | 470 | | |
| |||
464 | 473 | | |
465 | 474 | | |
466 | 475 | | |
467 | | - | |
| 476 | + | |
468 | 477 | | |
469 | 478 | | |
470 | 479 | | |
| |||
700 | 709 | | |
701 | 710 | | |
702 | 711 | | |
| 712 | + | |
| 713 | + | |
703 | 714 | | |
704 | 715 | | |
705 | 716 | | |
| |||
917 | 928 | | |
918 | 929 | | |
919 | 930 | | |
920 | | - | |
| 931 | + | |
921 | 932 | | |
922 | 933 | | |
923 | 934 | | |
| |||
931 | 942 | | |
932 | 943 | | |
933 | 944 | | |
934 | | - | |
| 945 | + | |
| 946 | + | |
935 | 947 | | |
936 | 948 | | |
937 | 949 | | |
938 | 950 | | |
939 | 951 | | |
940 | 952 | | |
941 | | - | |
| 953 | + | |
942 | 954 | | |
943 | 955 | | |
944 | 956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
310 | 320 | | |
311 | 321 | | |
312 | 322 | | |
| |||
444 | 454 | | |
445 | 455 | | |
446 | 456 | | |
447 | | - | |
| 457 | + | |
| 458 | + | |
448 | 459 | | |
449 | 460 | | |
| 461 | + | |
450 | 462 | | |
451 | 463 | | |
452 | 464 | | |
453 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
454 | 471 | | |
| 472 | + | |
455 | 473 | | |
456 | 474 | | |
457 | 475 | | |
458 | 476 | | |
459 | 477 | | |
460 | 478 | | |
461 | | - | |
| 479 | + | |
462 | 480 | | |
463 | 481 | | |
464 | 482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
| |||
431 | 432 | | |
432 | 433 | | |
433 | 434 | | |
434 | | - | |
| 435 | + | |
435 | 436 | | |
436 | 437 | | |
437 | 438 | | |
| |||
445 | 446 | | |
446 | 447 | | |
447 | 448 | | |
| 449 | + | |
448 | 450 | | |
449 | 451 | | |
450 | 452 | | |
| |||
0 commit comments