diff --git a/app/core/graph/graph_derive_edges.py b/app/core/graph/graph_derive_edges.py index 3317a82..4239e25 100644 --- a/app/core/graph/graph_derive_edges.py +++ b/app/core/graph/graph_derive_edges.py @@ -695,6 +695,7 @@ def build_edges_for_note( "source_hint": "schema_default", "confidence": PROVENANCE_PRIORITY.get("schema_default", 0.85), "is_internal": True, # Explizit als Intra-Note-Edge markieren + "virtual": True, # WP-26 v1.4: Automatisch generierte Section-Transitions sind virtuell "section_transition": f"{current_type}->{next_type}" # Debug-Info })) @@ -1102,6 +1103,7 @@ def build_edges_for_note( "source_hint": "automatic_backlink", "confidence": PROVENANCE_PRIORITY.get("derived:backlink", 0.8), "is_internal": True, + "virtual": True, # WP-26 v1.4: Automatisch generierte Backlinks sind virtuell "original_edge_kind": kind # Debug-Info: Welcher Edge-Type wurde invertiert }) diff --git a/docs/06_Roadmap/06_LH_Section_Types_Intra_Note_Edges.md b/docs/06_Roadmap/06_LH_Section_Types_Intra_Note_Edges.md index 945c124..1f4ec23 100644 --- a/docs/06_Roadmap/06_LH_Section_Types_Intra_Note_Edges.md +++ b/docs/06_Roadmap/06_LH_Section_Types_Intra_Note_Edges.md @@ -611,6 +611,7 @@ default_edge = topology["typical"][0] # "resulted_in" "provenance": "rule", "rule_id": "derived:intra_note_backlink", "source_hint": "automatic_backlink", + "virtual": True, # Automatisch generierte Backlinks sind virtuell "original_edge_kind": "derives" # Debug-Info } ``` @@ -638,7 +639,8 @@ default_edge = topology["typical"][0] # "resulted_in" "scope": "chunk", "is_internal": True, "provenance": "rule", - "rule_id": "inferred:section_transition" + "rule_id": "inferred:section_transition", + "virtual": True # Automatisch generierte Section-Transitions sind virtuell } # Backlink (automatisch erzeugt) @@ -649,7 +651,8 @@ default_edge = topology["typical"][0] # "resulted_in" "scope": "chunk", "is_internal": True, "provenance": "rule", - "rule_id": "derived:intra_note_backlink" + "rule_id": "derived:intra_note_backlink", + "virtual": True # Automatisch generierte Backlinks sind virtuell } ``` @@ -657,6 +660,8 @@ default_edge = topology["typical"][0] # "resulted_in" - Backlinks werden **nur** erstellt, wenn noch kein inverser Edge existiert - Backlinks haben immer `scope: "chunk"` (nicht `scope: "note"`) - Backlinks werden **nach** der Deduplizierung erstellt, um Duplikate zu vermeiden +- Backlinks haben `virtual: True` (automatisch generierte Edges erhalten eine Penalty von 0.5 beim Scoring im Retriever) +- Automatische Section-Transition-Edges haben ebenfalls `virtual: True` ### 4.4 Retriever-Anpassungen