Skip to content

add selection params#1997

Open
robbespo00 wants to merge 137 commits intomainfrom
rob/diversity
Open

add selection params#1997
robbespo00 wants to merge 137 commits intomainfrom
rob/diversity

Conversation

@robbespo00
Copy link
Copy Markdown
Contributor

No description provided.

tsmith023 and others added 30 commits March 13, 2026 12:04
…d-alpha

Remove client-side default `alpha` param for hybrid queries
dirkkul and others added 4 commits April 22, 2026 16:54
# Conflicts:
#	weaviate/proto/v1/v4216/v1/base_search_pb2.py
#	weaviate/proto/v1/v4216/v1/base_search_pb2.pyi
#	weaviate/proto/v1/v5261/v1/base_search_pb2.py
#	weaviate/proto/v1/v5261/v1/base_search_pb2.pyi
#	weaviate/proto/v1/v6300/v1/base_search_pb2.py
#	weaviate/proto/v1/v6300/v1/base_search_pb2.pyi
@g-despot g-despot requested a review from a team as a code owner April 23, 2026 08:15
@g-despot g-despot changed the base branch from main to dev/1.37 April 23, 2026 08:16
Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca

Comment thread weaviate/collections/queries/near_vector/query/executor.py
Comment thread weaviate/collections/queries/near_vector/query/executor.py Outdated
Comment thread weaviate/collections/queries/near_vector/query/executor.py
Comment thread weaviate/collections/queries/near_vector/query/sync.pyi
Comment thread weaviate/collections/classes/grpc.py
Comment thread weaviate/collections/classes/grpc.py Outdated
@g-despot g-despot changed the base branch from dev/1.37 to main April 24, 2026 07:05
# Conflicts:
#	weaviate/proto/v1/v4216/v1/base_search_pb2.py
#	weaviate/proto/v1/v4216/v1/base_search_pb2.pyi
#	weaviate/proto/v1/v5261/v1/base_search_pb2.py
#	weaviate/proto/v1/v5261/v1/base_search_pb2.pyi
#	weaviate/proto/v1/v6300/v1/base_search_pb2.py
#	weaviate/proto/v1/v6300/v1/base_search_pb2.pyi
Copy link
Copy Markdown

@orca-security-eu orca-security-eu Bot left a comment

Choose a reason for hiding this comment

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

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed SAST high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

return_metadata: The metadata to return for each object, defaults to `None`.
return_properties: The properties to return for each object.
return_references: The references to return for each object.
diversity_selection: Apply diversity selection (e.g. MMR) to the results. Requires Weaviate >= 1.37.0.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
diversity_selection: Apply diversity selection (e.g. MMR) to the results. Requires Weaviate >= 1.37.0.
diversity_selection: Apply diversity selection (e.g. MMR) to the results. Since v1.37.0.

nit(non-blocking): I think this is the more conventional way of phrasing that

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd rather be more explicit with requires so the user can't misunderstand

),
limit=3,
).objects
assert [o.uuid for o in balance_0] != [o.uuid for o in balance_1]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the goal of this is test is to see that "the client passes diversity_selection parameter to the server correctly", couldn't we just add 2 assertions here? One to check the effect of balance (i.e. order is different) and the other one to check the effect of limit (i.e. len(result) == mmr_limit).

3 distinct test cases just seems to be excessive for this. After all, 95% of the logic is server-side.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed, will try to combine them

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Similar to the comment above/below, do we need all 10 test cases for a 2-parameter config?

Comment thread weaviate/collections/classes/grpc.py Outdated
Comment thread weaviate/classes/query.py Outdated
Comment thread integration/test_collection_diversity.py Outdated
Comment thread weaviate/collections/classes/grpc.py Outdated
Comment thread weaviate/collections/classes/grpc.py
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.

9 participants