app/core/retriever.py aktualisiert
All checks were successful
Deploy mindnet to llm-node / deploy (push) Successful in 3s

This commit is contained in:
Lars 2025-12-04 11:35:53 +01:00
parent 110f0dbcf5
commit 611b0aa54e

View File

@ -141,8 +141,14 @@ def _build_hits_from_semantic(
edge_bonus = 0.0
cent_bonus = 0.0
if subgraph is not None:
# WICHTIG: Knoten im Graphen sind note_ids, nicht chunk_ids.
node_key = payload.get("note_id")
# Standard-Key wie im ursprünglichen Verhalten (für Fakes in Tests):
node_key = payload.get("chunk_id") or payload.get("note_id")
# Falls es sich um unseren echten Subgraph-Typ handelt, wissen wir,
# dass Knoten als note_id modelliert sind → dann gezielt note_id nutzen.
if isinstance(subgraph, ga.Subgraph):
node_key = payload.get("note_id")
if node_key:
try:
edge_bonus = float(subgraph.edge_bonus(node_key))