-
Notifications
You must be signed in to change notification settings - Fork 45
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
Reranking #385
Reranking #385
Conversation
|
||
|
||
def test_default_reranker(mock_google_search, mock_embedding_func): | ||
reranker = RerankingByQuery(embedding_func=mock_embedding_func) |
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.
we need to have a base embedding function class since some of them are not callable. For example, SentenceTransformerEmbeddings has embed_query instead of it self being callable.
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.
I'm hoping to have an adapter for all of them so that we will not directly use the embedding from the langchain. But I think create a base embedding is a good idea.
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.
resolve conflict
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.
LGTM,
Description
Create the reranking capability for actions involving retrieval (BaseRetrieval actions). It can be activated by setting
perform_reranking
to true in the following actionsIt can be used for any actions inheriting the
BaseRetrievalAction
classType of change
Related issues
Closes #362
Checklists
To speed up the review process, please follow these checklists:
Development
make format && make lint
)make test
)See the testing guidelines for help on tests, especially those involving web services.
Code review
💔 Thank you for submitting a pull request!