Skip to content

Conversation

pmpailis
Copy link
Contributor

@pmpailis pmpailis commented Oct 3, 2024

Now that #112648 has been merged, in this PR we handle the text_similarity_reranker retriever next, so that it can be evaluated during the rewrite phase and be transformed to a flattened RankDocsRetrieverBuilder. This will enable us to support composition and many search features, including highlighting, aggregations, and collapsing.

@pmpailis
Copy link
Contributor Author

pmpailis commented Oct 4, 2024

@elasticmachine update branch

- length: { hits.hits: 2 }

- match: { hits.hits.0._id: "doc_2" }
- match: { hits.hits.0._rank: 1 }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

_rank has now been removed as with rrf.

@pmpailis pmpailis marked this pull request as ready for review October 4, 2024 08:36
@pmpailis pmpailis requested a review from a team as a code owner October 4, 2024 08:36
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 4, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

TextSimilarityRankDoc.java needs randomized serialization tests and we need to ensure whatever utilizes this named object (looks like RankDocsQueryBuilder and RankDocsRetrieverBuilder) exercise using this new named object some how.

We don't want to miss adding this new named object to the named serialization objects and such.

@pmpailis
Copy link
Contributor Author

pmpailis commented Oct 6, 2024

@elasticmachine update branch

@pmpailis
Copy link
Contributor Author

pmpailis commented Oct 7, 2024

@elasticmachine update branch

Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

I think we are getting close, I am wondering about some of the build.gradle changes & if they are actually necessary.

testImplementation(testArtifact(project(':server')))

clusterModules project(xpackModule('rank-rrf'))
clusterModules project(xpackModule('inference'))
Copy link
Member

Choose a reason for hiding this comment

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

Why is rrf requiring inference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added this to actually exercise different semantic_reranking and rrf combinations (in 800_rrf_with_text_similarity_reranker_retriever.yml ) . AFAICT clusterModules is a test-only dependency, so there shouldn't be any changes in runtime dependencies.

However, I wasn't certain myself on what place would be the best for hosting such combined tests (needing code from both inference and rank-rrf ) so I'm really open to any alternatives :)

@pmpailis
Copy link
Contributor Author

pmpailis commented Oct 7, 2024

run elasticsearch-ci/part-1

@pmpailis pmpailis added the auto-backport Automatically create backport pull requests when merged label Oct 7, 2024
@pmpailis pmpailis merged commit 4ecc5bd into elastic:main Oct 8, 2024
16 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 114085

matthewabbott pushed a commit to matthewabbott/elasticsearch that referenced this pull request Oct 10, 2024
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this pull request Oct 13, 2024
@pmpailis pmpailis deleted the text_similarity_reranker_rework branch May 27, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >non-issue :Search Relevance/Ranking Scoring, rescoring, rank evaluation. Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants