bitflicker64 commented on code in PR #412:
URL: https://github.com/apache/hugegraph-ai/pull/412#discussion_r4516553841
##########
hugegraph-llm/src/hugegraph_llm/nodes/index_node/vector_query_node.py:
##########
@@ -39,11 +40,17 @@ def node_init(self):
from hugegraph_llm.utils.vector_index_utils import
get_vector_index_class
# Read user configuration parameters from wk_input.
+ wk_input = cast(WkFlowInput, self.wk_input)
vector_index =
get_vector_index_class(index_settings.cur_vector_index)
embedding = Embeddings().get_embedding()
- max_items = self.wk_input.max_items if self.wk_input.max_items is
not None else 3
+ max_items = wk_input.max_items if wk_input.max_items is not None
else 3
- self.operator = VectorIndexQuery(vector_index=vector_index,
embedding=embedding, topk=max_items)
+ self.operator = VectorIndexQuery(
+ vector_index=vector_index,
+ embedding=embedding,
+ topk=max_items,
+ vector_dis_threshold=wk_input.vector_dis_threshold,
Review Comment:
Important: a `/rag` request that sends `vector_dis_threshold` (for example
`0.9`, the field's previous default) now filters chunks at that value too, so
on squared-L2 stores a chunk at cosine 0.5 is dropped where the base kept it.
Keep the request field scoped to keyword matching and let chunk retrieval use
`CHUNK_DIS_THRESHOLD` (or a separate request field).
--
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]