-
Notifications
You must be signed in to change notification settings - Fork 502
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
Add kreciprocal evaluation. #191
Conversation
if src_question == cache_question: | ||
return 1 | ||
candidates = list(self.vectordb.search(cache_dict['embedding_data'], self.top_k)) | ||
top_k_candidates = candidates[: self.top_k] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improve it, like
top_k_candidates=self.vectordb.search(cache_dict['embedding_data'], self.top_k)
""" | ||
|
||
|
||
def __init__(self, vectordb: 'gptcache.manager.vector_data.base.VectorBase', top_k: int = 3): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like: vectordb: VectorBase
|
||
:return: minimum and maximum of similarity score. | ||
""" | ||
return 0.0, 1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it may be the same as SearchDistanceEvaluation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## dev #191 +/- ##
==========================================
+ Coverage 80.33% 80.79% +0.46%
==========================================
Files 41 42 +1
Lines 1200 1234 +34
==========================================
+ Hits 964 997 +33
- Misses 236 237 +1
|
Signed-off-by: wxywb <xy.wang@zilliz.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SimFG, wxywb The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
No description provided.