googleapis / googleapis/python-genai

increase allowed max_return_results (currently limited to 10)

Open
#2,033 1 comment 0 reactions 1 assignee Claimed by @Venkaiahbabuneelam View on GitHub
priority: p3 type: feature request
Dominant language
Python
Stars
4k
Forks
1k
Avg merge
2d 11h
Merged PRs (30d)
40

Description

**Is your feature request related to a problem? Please describe.**
I'm limited by VertexAISearch max_results being set to 10. I have a structured datastore, and would like the tool to be able to fetch more than 10 results, ex. 25-50

**Describe the solution you'd like**
Increase the max_results type spec, or allow additional parameters like offset

**Describe alternatives you've considered**
I've considered using filters in my implementation, but it's not as easy to avoid edge cases when setting filters vs. letting the retrieval layer cast a wider net.

I've considered using offset, but it is not available, and I've considered setting the relevance threshold, but it is also not available.

**Additional context**
I understand there is an issue with overloading the context window when fetching unstructured document snippets, so maybe a higher limit should be allowed for structured datastores.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.