When requesting multiple results, increase the temperature parameter#1005
Merged
iamdharmesh merged 3 commits intodevelopfrom Sep 11, 2025
Merged
When requesting multiple results, increase the temperature parameter#1005iamdharmesh merged 3 commits intodevelopfrom
temperature parameter#1005iamdharmesh merged 3 commits intodevelopfrom
Conversation
…we don't have negatives and we don't request too many
…hat for each result we want
…t support multiple results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the Change
Our Title Generation and Resize Content Features allow you to choose how many results you want returned (if using OpenAI, Azure OpenAI or xAI). It was reported though that often the results returned are pretty similar, if not exactly the same. While we don't have control over what results the LLMs return, one parameter we currently set is
temperature. This is supposed to determine how random the results are, from 0 to 2, 0 meaning the results should be the same each time and 2 meaning you should see significant randomness.We default that to
0.9and in this PR, a new helper function has been added that will take that default value and increase it proportionally to the number of results you want. So if you want 2 results, it will go from0.9to1.1. If you want 5 it goes from0.9to1.4. If you want 10 it goes from0.9to1.9. In theory, this should mean you get more random results as you request more results, hopefully making each result more unique.In addition, noticed we didn't have any minimum or maximum attributes on these selectors, meaning someone could enter a negative number or a super high number. Have added that in this PR to limit these from 1 to 10. There may be someone that is currently requesting more than 10 results but I'm assuming that's rare and we can adjust if someone complains :)
Closes #996
How to test the Change
Changelog Entry
Credits
Props @dkotter
Checklist: