Skip to content

When requesting multiple results, increase the temperature parameter#1005

Merged
iamdharmesh merged 3 commits intodevelopfrom
feature/996
Sep 11, 2025
Merged

When requesting multiple results, increase the temperature parameter#1005
iamdharmesh merged 3 commits intodevelopfrom
feature/996

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented Sep 10, 2025

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.9 and 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 from 0.9 to 1.1. If you want 5 it goes from 0.9 to 1.4. If you want 10 it goes from 0.9 to 1.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

  1. Enable the Title Generation and Content Resizing Features, with either OpenAI, Azure OpenAI or xAI
  2. Try out these Features with different combinations of results
  3. Ensure things work and you seem to be getting unique results (kind of hard to tell this, mostly a judgement call)

Changelog Entry

Added - Increase the temperature value when requesting more results, hopefully leading to more unique results
Changed - Limit our number of suggestions input from 1 to 10

Credits

Props @dkotter

Checklist:

@dkotter dkotter added this to the 3.7.0 milestone Sep 10, 2025
@dkotter dkotter self-assigned this Sep 10, 2025
@dkotter dkotter requested review from a team and jeffpaul as code owners September 10, 2025 19:23
@github-actions github-actions bot added the needs:code-review This requires code review. label Sep 10, 2025
@dkotter dkotter requested review from iamdharmesh and removed request for a team and jeffpaul September 10, 2025 19:46
Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dkotter. LGTM.

@iamdharmesh iamdharmesh merged commit 4ecbba8 into develop Sep 11, 2025
20 checks passed
@iamdharmesh iamdharmesh deleted the feature/996 branch September 11, 2025 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider modifying the "temperature" param when requesting multiple results

2 participants