Migrate Gemini 1.5-Pro models to Gemini 2.0 Flash models - #240
Conversation
There was a problem hiding this comment.
I tested this out locally with Gemini 2.0 Flash. It worked well and seemed performant. My one comment is non-blocking. As far as cost analysis and consideration of the Gemini 2.0 Flash Lite model goes, I'd lean toward the slightly better accuracy of Gemini 2.0 Flash, while monitoring costs over time. Right now, it seems like our biggest expense is running the evaluation suite. The below expense chart has spikes on days that correlate with evaluation work.
Each peak represents ~$10-15 charge. Summary certainly contributes to that cost. Unless we think the cost we are incurring is problematic, I think it is worth using the more expensive model. I'll make a Slack reminder to evaluate our spend mid-August.
| @@ -15,6 +15,8 @@ on: | |||
| options: | |||
| - gemini-2.5-pro-preview-03-25 | |||
| - gemini-1.5-pro-latest | |||
There was a problem hiding this comment.
Non-blocking: I think we could go ahead and take 1.5-pro out of the list. It feels pretty unlikely to me that we'd revert.
There was a problem hiding this comment.
Great call! Agreed. Will remove this option.
This reverts commit f557cec.
* Migrate Gemini 1.5-Pro models to Gemini 2.0 Flash models (#240) * Migrate Gemini 1.5-Pro models to Gemini 2.0 Flash models * Update summary model to Gemini 2.0 Flash * Remove Gemini 1.5 model from evaluation suite * Bump pg from 1.5.9 to 1.6.0 Bumps [pg](https://github.com/ged/ruby-pg) from 1.5.9 to 1.6.0. - [Changelog](https://github.com/ged/ruby-pg/blob/master/CHANGELOG.md) - [Commits](ged/ruby-pg@v1.5.9...v1.6.0) --- updated-dependencies: - dependency-name: pg dependency-version: 1.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Allison Morgan <allison.morgan@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Google recommends migrating Gemini 1.5 Pro models to Gemini 2.0 Flash. When I evaluated this branch (currently equivalent with main & dev), the summary performance under Gemini 1.5 Pro (current LLM) is very similar to Gemini 2.0 Flash (0.335 vs 0.333 using DeepEval's summarization score; 0.360 vs 0.386 ROUGE). These differences seem very slight to me, so this branch migrates our summarization functionality to Gemini 2.0 Flash.
Two things worth noting: (1) Gemini 2.0 Flash models will be deprecated February 26th, so we'll want to redo this analysis in seven months. (2) I also tested Gemini 2.0 Flash Lite, which is marketed as Google's cheapest model. Performance based on our DeepEval summarization score is slightly lower (0.335 vs 0.285 summarization score; 0.360 vs 0.365 ROUGE). Qualitatively, these summaries do feel really similar though so happy to re-run the Gemini 2.0 Flash Lite evaluation if you think we should?
Example Documents
Run the application locally and confirm that the document summary functionality still works for you.