Skip to content

Commit b1f2ca7

Browse files
deduplicate sources in local search context (#1468)
Co-authored-by: Alonso Guevara <alonsog@microsoft.com>
1 parent 5ff2d3c commit b1f2ca7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

graphrag/query/structured_search/local_search/mixed_context.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ def _build_text_unit_context(
334334
num_relationships = count_relationships(
335335
entity_relationships, selected_unit
336336
)
337+
text_unit_ids_set.add(text_id)
337338
unit_info_list.append((selected_unit, index, num_relationships))
338339

339340
# sort by entity_order and the number of relationships desc

0 commit comments

Comments
 (0)