Skip to content

Add effort to Search Mode - #99

Merged
CShorten merged 1 commit into
mainfrom
add-effort-to-search-mode
Jul 30, 2026
Merged

Add effort to Search Mode#99
CShorten merged 1 commit into
mainfrom
add-effort-to-search-mode

Conversation

@CShorten

@CShorten CShorten commented Jul 28, 2026

Copy link
Copy Markdown
Member

What's Changed

Adds an optional effort: Literal["low", "medium", "high"] parameter to Search Mode, available on both QueryAgent.search() and AsyncQueryAgent.search(). Higher effort may improve result quality at the expense of increased latency and cost. Defaults to None (no behavior change for existing callers).

qa.search(
  "Comparisons of Setwise and Listwise rerankers.", 
  effort="high"
)

The parameter is threaded through the searcher and stored on it, so it persists across pagination, response.next() sends the same effort value on every page. This follows the same pattern as the existing filtering and diversity_weight parameters.

Changes

  • weaviate_agents/query/classes/request.py: add effort field to SearchModeRequestBase (included in both generation and execution requests)
  • weaviate_agents/query/search.py: accept and store effort on _BaseQueryAgentSearcher, include it in request bodies
  • weaviate_agents/query/query_agent.py: add effort parameter to sync and async search() with docstrings
  • test/query_agent/test_query_model.py: tests for effort being sent, persisting across pagination, and defaulting to None

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

Copy link
Copy Markdown

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

@CShorten
CShorten merged commit 9c3e1a0 into main Jul 30, 2026
13 checks passed
@CShorten
CShorten deleted the add-effort-to-search-mode branch July 30, 2026 13:59
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