Share page:
Get Consistent Responses from OpenAI with the New Seed and JSON Features
The Wix Wiz
Dec 6, 2023
9
Tags:
Chat GPT, Chatbot, AI Chatbot, Open AI, Our Practice
Get Consistent Responses from OpenAI with the New Seed and JSON Features.
Code: https://platform.openai.com/docs/guides/text-generation/reproducible-outputs
Chat Completions are non-deterministic by default (which means model outputs may differ from request to request). That being said, we offer some control towards deterministic outputs by giving you access to the seed parameter and the system_fingerprint response field.
To receive (mostly) deterministic outputs across API calls, you can:
Set the seed parameter to any integer of your choice and use the same value across requests you'd like deterministic outputs for.
Ensure all other parameters (like prompt or temperature) are the same across requests.
Sometimes, determinism may be impacted due to necessary changes OpenAI makes to model configurations on our end. To help you keep track of these changes, we expose the system_fingerprint field. If this value is different, you may see different outputs due to changes we've made to our systems.