Skip to content

Top k cc#31

Merged
aravind10x merged 8 commits intomainfrom
topK-CC
Sep 6, 2024
Merged

Top k cc#31
aravind10x merged 8 commits intomainfrom
topK-CC

Conversation

@ashwinzyx
Copy link
Contributor

No description provided.

Copy link
Contributor

@aravind10x aravind10x left a comment

Choose a reason for hiding this comment

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

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:
Copy link
Contributor

Choose a reason for hiding this comment

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

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?

Copy link
Contributor

@aravind10x aravind10x left a comment

Choose a reason for hiding this comment

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

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.

@aravind10x aravind10x merged commit 28d86e3 into main Sep 6, 2024
@aravind10x aravind10x deleted the topK-CC branch September 6, 2024 16:30
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