Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The value of vector_similarity returned by the api/v1/retrieval interface of ragflow is always 0 #3587

Open
1 task done
bewithme opened this issue Nov 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bewithme
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

RAGFlow workspace code commit ID

none

RAGFlow image version

infiniflow/ragflow:v0.13.0

Other environment information

Linux 10-60-207-244 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Actual behavior

this is request body
`{
"question": "xxxxxxx",
"dataset_ids": ["7b78e9aaa7e811ef84dc0242ac1b0006"],
"page":1,
"rerank_id": "gte-rerank@Tongyi-Qianwen",
"similarity_threshold": 0.2,
"size": 10,
"top_k": 5,
"vector_similarity_weight": 0.30000000000000004

}`

this is response body chunk
{"code":0,"data":{"chunks":[{"content":"xxxxxxx","id":"bf9d0c25ec76ea0eea3f0eec3ce2b531","img_id":"7b78e9aaa7e811ef84dc0242ac1b0006-bf9d0c25ec76ea0eea3f0eec3ce2b531","important_keywords":[],"kb_id":"7b78e9aaa7e811ef84dc0242ac1b0006","positions":[[68.0,90.0,534.0,613.0,624.0],[68.0,89.0,533.0,629.0,736.0],[68.0,295.0,739.0,772.0,782.0],[69.0,267.0,711.0,171.0,185.0],[69.0,88.0,532.0,391.0,402.0],[69.0,90.0,534.0,748.0,759.0],[69.0,295.0,739.0,772.0,782.0],[70.0,88.0,532.0,78.0,842.0],[71.0,88.0,532.0,0.0,109.0],[70.0,295.0,739.0,772.0,782.0],[71.0,88.0,532.0,136.0,147.0],[71.0,88.0,532.0,152.0,164.0]],"similarity":0.6629022502370199,"term_similarity":0.9470032146243141,"vector_similarity":0.0},

Expected behavior

vector_similarity is not 0

Steps to reproduce

1.run  docker-compose -f docker-compose-gpu.yml up -d 

2.log in and create kb and upload file

3.call the interface "api/v1/retrieval" by python code

Additional information

No response

@bewithme bewithme added the bug Something isn't working label Nov 22, 2024
@liwenju0
Copy link
Contributor

可以检查一下rerank模型服务是不是出问题了。
如果rerank有问题,会返回0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants