chore(generative_ai): update model references to stable gemini models (#14117)#14460
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates multiple generative AI code samples to use 'gemini-1.5-flash' instead of 'gemini-2.0-flash-001' (and 'gemini-2.5-flash' instead of 'gemini-2.5-pro' in one case). The feedback correctly points out that in the pairwise evaluation sample, comparing 'gemini-1.5-flash' against itself defeats the purpose of a pairwise comparison, and suggests using 'gemini-1.5-pro' as the candidate model instead.
| baseline_model = GenerativeModel("gemini-1.5-flash") | ||
|
|
||
| # Candidate model for pairwise comparison | ||
| candidate_model = GenerativeModel( | ||
| "gemini-2.0-flash-001", generation_config={"temperature": 0.4} | ||
| "gemini-1.5-flash", generation_config={"temperature": 0.4} | ||
| ) |
There was a problem hiding this comment.
In a pairwise evaluation, comparing the exact same model (gemini-1.5-flash) against itself defeats the purpose of demonstrating a pairwise comparison between two different models (e.g., a lighter/faster model vs. a larger/more capable model). To make this sample more meaningful and illustrative, consider using gemini-1.5-pro as the candidate model while keeping gemini-1.5-flash as the baseline.
| baseline_model = GenerativeModel("gemini-1.5-flash") | |
| # Candidate model for pairwise comparison | |
| candidate_model = GenerativeModel( | |
| "gemini-2.0-flash-001", generation_config={"temperature": 0.4} | |
| "gemini-1.5-flash", generation_config={"temperature": 0.4} | |
| ) | |
| baseline_model = GenerativeModel("gemini-1.5-flash") | |
| # Candidate model for pairwise comparison | |
| candidate_model = GenerativeModel( | |
| "gemini-1.5-pro", generation_config={"temperature": 0.4} | |
| ) |
Description
Fixes #14117
Updated deprecated Gemini model references across generative AI code samples to stable releases (
gemini-1.5-flashandgemini-2.5-flash).Checklist
Testing
Compliance & Style
Post-Approval Actions