-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lowering temperature to reduce AI hallucinations #149
Conversation
Also changed the |
I think + I'm not quite sure of the intuition for fixing different constants ( |
I mean, I'm not against only setting it to something that's less than 0.7, but the temperature is essentially the variability of the text response. So for creative tasks it's better if its higher, but worse if the task is objective, fact-based. OpenAI outlines this distinction quite clearly in the docs. If you want more accurate and deterministic results, you lower that to 0. So @Podidiving, I don't consider that extreme at all if one wishes to avoid hallucinations occurring because the bot decided to get less consistent with its task responses. |
Yeah, I totally agree on the fact that if you want your model to be more deterministic, you set temperature low. But in some cases you may want to get more creative response. That's why I suggested to introduce temperature as a parameter, which user can adjust |
@Podidiving I'm not sure I understand you. It is already a parameter with a default value that I changed to 0.0 instead of having it be 0.7 by default. |
All I'm saying is that maybe it's better to make this parameter customisable. E.g. in
and in Something like that P.s. default parameter is |
Alright, there you go, @Podidiving . |
Also, it was getting called as 0.7 as the temperature. So it was defaulting to 0.7, which is waaaay too high for most task agent use cases. |
With a current default temperature of 0.7 the AI is much more likely to hallucinate while completing tasks. Lowering the temperature to 0.0 should reduce the likelihood of hallucination substantially.