Add virtual attribute for automatically generated edges
- Introduced a `virtual` attribute for automatically generated section transitions and backlinks in the graph edge definitions, indicating their virtual nature. - Updated documentation to reflect the addition of the `virtual` attribute for both section transitions and backlinks, clarifying its implications for scoring in the retriever. - Enhanced the understanding of edge types by specifying that these automatically generated edges will receive a penalty during scoring.
This commit is contained in:
parent
52ed079067
commit
eba2e5d602
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user