diff --git a/offline-backend-20260512/backend/packages/harness/deerflow/agents/ai_writing/nodes/researcher.py b/offline-backend-20260512/backend/packages/harness/deerflow/agents/ai_writing/nodes/researcher.py index ef195d83..88386ff1 100644 --- a/offline-backend-20260512/backend/packages/harness/deerflow/agents/ai_writing/nodes/researcher.py +++ b/offline-backend-20260512/backend/packages/harness/deerflow/agents/ai_writing/nodes/researcher.py @@ -142,13 +142,15 @@ async def _search_notebook( if not chunk_content: continue mat_idx += 1 + raw_score = chunk.get("score") + chunk_score = float(raw_score) if raw_score is not None else max(0.5, 0.95 - (mat_idx - 1) * 0.03) results.append(Material( id=f"nb{mat_idx:03d}", title=doc_title, content=chunk_content[:500], source=f"笔记·{doc_title}", source_type="notebook", - relevance_score=1.0, + relevance_score=chunk_score, url=doc_url, )) except Exception as e: