Memory-file extraction re-mints doc concepts under variant ids — near-duplicate nodes survive dedup

Đang mở
#3,568 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ayushcodes10 đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #4606 của @ayushcodes10 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
data

Hướng nghiên cứu

Start by tracing the merge path that combines extracted nodes, then inspect graph.json and the cached extraction entry under graphify-out/cache/semantic/…. Reproduce the memory-file update case and compare the canonical and variant concept ids. Done means repeated extraction does not leave near-duplicate concept nodes and the AMBIGUOUS edge is attached to the canonical node.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary

When a saved query memory (graphify-out/memory/query_*.md) is re-extracted on --update, concepts it mentions that already exist as doc-concept nodes can be minted under a different node id, producing a duplicate that id-based dedup cannot catch.

Evidence

Repo: rails-ai-bridge, graphifyy 0.9.61.

  • Original doc extraction of docs/port-registry-resolution.md minted docs_port_registry_resolution_resolver (label "Registry Resolver").
  • A memory file describing that same concept minted docs_port_registry_resolution_registry_resolver (label "Registry Resolver (port-registry-resolution doc concept)") — same stem, different entity suffix.
  • Both nodes coexisted in graph.json; the duplicate carried an AMBIGUOUS edge that belonged on the canonical node.

The node-id rule ({stem}_{entity}) makes the id deterministic from the label, so any label variation — parenthetical qualifiers, "Registry Resolver" vs "Resolver" — forks the id. Memory files quote concepts with extra qualifiers often enough that this recurs.

Suggested fix

One of:

  1. Label-normalized dedup for concept nodes: when merging, treat a new concept node as a duplicate if its normalized label (strip parentheticals, lowercase) matches an existing node with the same stem prefix — merge edges onto the canonical id.
  2. Canonical-id resolution at extraction: memory-file extraction could resolve mentioned concepts against the existing graph's node ids before minting new ones.

Option 1 is local to the merge path and doesn't require the extractor to know the existing graph.

Workaround applied locally

Rewrote the cached extraction entry (graphify-out/cache/semantic/…) to emit the canonical id and merged the node in graph.json. Holds until the memory file changes and the cache entry invalidates.

Ngôn ngữ chính
Python
Star
124k
Fork
11.9k
Merge trung bình
2 giờ 35 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Graphify-Labs/graphify

Tất cả issue của Graphify-Labs/graphify

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.