Closed ccurme closed 23 hours ago
From what I can tell response using SDK is not deterministic:
import numpy as np import openai documents = ["disallowed special token '<|endoftext|>'"] model = "text-embedding-ada-002" direct_output_1 = ( openai.OpenAI() .embeddings.create(input=documents, model=model) .data[0] .embedding ) for i in range(10): direct_output_2 = ( openai.OpenAI() .embeddings.create(input=documents, model=model) .data[0] .embedding ) print(f"{i}: {np.isclose(direct_output_1, direct_output_2).all()}")
0: True 1: True 2: True 3: True 4: False 5: True 6: True 7: True 8: True 9: True
See related discussion here: https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054
Found the same result using "text-embedding-3-small".
"text-embedding-3-small"
The latest updates on your projects. Learn more about Vercel for Git ↗︎
From what I can tell response using SDK is not deterministic:
See related discussion here: https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054
Found the same result using
"text-embedding-3-small"
.