#Seeds and rewsults

1 messages · Page 1 of 1 (latest)

halcyon ledge
#

the seed parameter will give me reproducible ouput. But what I am seeing is that sometimes it add or removes some sentences when produces subsequent answers for the same question.

honest bridgeBOT
#

Hi @halcyon ledge. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The seed parameter in OpenAI's API is designed to provide mostly deterministic outputs across API calls. However, it's important to note that while the seed ensures consistency, it does not guarantee the quality of the output or absolute determinism. There is a small chance that responses differ even when request parameters and system_fingerprint match, due to the inherent non-determinism of computers [source (https://github.com/openai/openai-cookbook/blob/main/examples/Deterministic_outputs_with_the_seed_parameter.ipynb)].

To achieve mostly deterministic outputs, you should:

  • Set the seed parameter to any integer of your choice, but use the same value across requests.
  • Set all other parameters (prompt, temperature, top_p, etc.) to the same values across requests.
  • Check the system_fingerprint field in the response. The system fingerprint is an identifier for the current combination of model weights, infrastructure, and other configuration options used by OpenAI servers to generate the completion. It changes whenever you change request parameters, or OpenAI updates numerical configuration of the infrastructure serving our models.

If the seed, request parameters, and system_fingerprint all match across your requests, then model outputs will mostly be identical. However, as mentioned, there is a small chance that responses differ even when these match [source (https://github.com/openai/openai-cookbook/blob/main/examples/Deterministic_outputs_with_the_seed_parameter.ipynb)].

If you're experiencing significant variations in the outputs, it might be worth checking if all the parameters are indeed identical across requests, and whether there have been any changes in the system_fingerprint.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: