Skip to content

Add score threshold option for searching in index#683

Open
basitanees wants to merge 2 commits intodevelopmentfrom
add-score-threshold-index-model
Open

Add score threshold option for searching in index#683
basitanees wants to merge 2 commits intodevelopmentfrom
add-score-threshold-index-model

Conversation

@basitanees
Copy link
Collaborator

No description provided.


def search(self, query: str, top_k: int = 10, filters: List[IndexFilter] = []) -> ModelResponse:
def search(
self, query: str, top_k: int = 10, filters: List[IndexFilter] = [], score_threshold: float = 0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add this a filter object?
Operator Larger, Smaller etc and then a value. Add this as a indexFilder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmetgunduz Coming back to this. IndexFilter is generally meant for metadata filtering, thats why I think, it would make more sense if score_threshold is kept separate? We can give a more meaningful name for this.

@ahmetgunduz
Copy link
Contributor

@basitanees Any update here? It has been hanging for a while now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments