Merged
Conversation
TopK with CrossEncoder Ragas Update==0.1.16
aravind10x
reviewed
Sep 6, 2024
Contributor
aravind10x
left a comment
There was a problem hiding this comment.
Thoughts on extending this change to other compressors as well?
| code_string = f"""retriever=c.as_retriever(search_type='{kwargs['search_type']}', search_kwargs={{'k': {kwargs['search_kwargs']}}})""" | ||
| document_compressor_pipeline=kwargs['retriever_kwargs'].get('document_compressor_pipeline',None) | ||
| if document_compressor_pipeline is not None: | ||
| if 'CrossEncoderReranker' in document_compressor_pipeline: |
Contributor
There was a problem hiding this comment.
Does it make sense to do this for all compressors? Esp. EmbeddingsFilter, LLMChainFilter etc. can all show impact only when there's a good number of candidate documents on which this logic can be applied.
What do you think?
aravind10x
approved these changes
Sep 6, 2024
Contributor
aravind10x
left a comment
There was a problem hiding this comment.
We'll revisit other compressors and figure out a way to dynamically retrieve more docs and then apply top k post compression/filtering.
For now, let's ship top k change for Cross encoder re-ranker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.