Skip to content

Add bit vector support to semantic text #123187

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

Merged
merged 26 commits into from
Mar 7, 2025

Conversation

Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Feb 21, 2025

Adds bit vector support to the semantic_text field mapping and semantic query. The changes to production code are minimal, nearly all of the changes are to test code to ensure that we have good coverage with inference services that generate bit vectors.

@Mikep86 Mikep86 added >enhancement auto-backport Automatically create backport pull requests when merged :SearchOrg/Relevance Label for the Search (solution/org) Relevance team v8.19.0 v9.1.0 labels Feb 21, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @Mikep86, I've created a changelog YAML for you.

@Mikep86 Mikep86 marked this pull request as ready for review February 24, 2025 21:02
@Mikep86 Mikep86 added the :Search Relevance/Search Catch all for Search Relevance label Feb 24, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-eng (Team:SearchOrg)

@elasticsearchmachine
Copy link
Collaborator

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

@Mikep86
Copy link
Contributor Author

Mikep86 commented Feb 24, 2025

@elasticmachine update branch

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM

@Mikep86
Copy link
Contributor Author

Mikep86 commented Feb 27, 2025

@elasticmachine update branch

@Mikep86
Copy link
Contributor Author

Mikep86 commented Mar 3, 2025

@elasticmachine update branch

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -646,7 +644,7 @@ private static class StaticModel extends TestModel {
}

public static StaticModel createRandomInstance() {
TestModel testModel = randomModel(randomFrom(TaskType.TEXT_EMBEDDING, TaskType.SPARSE_EMBEDDING));
TestModel testModel = TestModel.createRandomInstance();
Copy link
Member

Choose a reason for hiding this comment

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

Nice test cleanup here 👍

@Mikep86
Copy link
Contributor Author

Mikep86 commented Mar 6, 2025

@jimczi I resolved the conflict with #123590 by implementing the ability to exclude certain similarities when creating a TestModel. LMKWYT!

@Mikep86
Copy link
Contributor Author

Mikep86 commented Mar 6, 2025

@jimczi Based on these test failures (1, 2, 3) should we be excluding DOT_PRODUCT instead? IIRC COSINE doesn't have any unit-length normalization requirements.

@Mikep86 Mikep86 merged commit db03788 into elastic:main Mar 7, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

Mikep86 added a commit to Mikep86/elasticsearch that referenced this pull request Mar 7, 2025
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Mar 11, 2025
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 >enhancement :Search Relevance/Search Catch all for Search Relevance :SearchOrg/Relevance Label for the Search (solution/org) Relevance team v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants