imbajin commented on code in PR #412:
URL: https://github.com/apache/hugegraph-ai/pull/412#discussion_r4519890266


##########
hugegraph-llm/src/hugegraph_llm/flows/rag_flow_graph_vector.py:
##########
@@ -74,7 +74,9 @@ def prepare(
         prepared_input.max_graph_items = max_graph_items or 
huge_settings.max_graph_items
         prepared_input.topk_return_results = topk_return_results or 
huge_settings.topk_return_results
         prepared_input.topk_per_keyword = topk_per_keyword or 
huge_settings.topk_per_keyword
-        prepared_input.vector_dis_threshold = vector_dis_threshold or 
huge_settings.vector_dis_threshold
+        # Keep 0.0 meaning "exact matches only"; each consumer resolves its own
+        # configured default (VECTOR_DIS_THRESHOLD / CHUNK_DIS_THRESHOLD).
+        prepared_input.vector_dis_threshold = vector_dis_threshold

Review Comment:
   ⚠️ An explicit `0` is now forwarded as an exact-match threshold, but the 
vector stores filter with `distance < dis_threshold` (for example, 
`FaissVectorIndex.search`), so even a zero-distance result is discarded. This 
can leave both chunk and vertex retrieval empty for an exact match. Please make 
the zero boundary include exact matches across the affected stores and add a 
store-level regression test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to