# Can text-embedding-ada-002 be made deterministic?

**URL:** <https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054>\
**Category:** API\
**Tags:** embeddings, ada\
**Created:** [August 8, 2023, 12:14am UTC](https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054 "2023-08-08T00:14:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![curt.kennedy](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/curt.kennedy/32/709249_2.png) [@curt.kennedy](https://community.openai.com/u/curt.kennedy)\
**Post date:** [August 8, 2023, 11:40pm UTC](https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054/6 "2023-08-08T23:40:05Z")

</div>

@anon10827405 mentioned a GitHub repo a while back that mentioned the hidden/undocumented “encoding\_format” parameter.

[https://community.openai.com/t/discrepancy-in-embeddings-precision/78666/7?u=curt.kennedy](https://community.openai.com/t/discrepancy-in-embeddings-precision/78666/7)

Which then points to this repo:

> **[GitHub - EliahKagan/embed-encode: Base64-encoded embeddings from the OpenAI API](https://github.com/EliahKagan/embed-encode)**
>
> Base64-encoded embeddings from the OpenAI API

Maybe give that a shot? I know it’s undocumented and could be pulled at any time … haven’t tried it myself.

But based on setting this to “float” it seems to have helped, as mentioned over here:

> [@Discrepancy in embeddings precision](https://community.openai.com/t/discrepancy-in-embeddings-precision/78666/10):
>
> Hmm ok so something interesting. Yesterday I went and tested getting embeddings using the openai python library with the default settings. As suggested in this thread, embedding the same text twice results in slightly different embeddings. The cosine sim between the two embeddings was ~0.999. I then used encoding\_format="float" which overrides the default of base64 and lo and behold embedding the same text twice resulted in identical vectors. So I changed to use that in my code. However, I went …

---

_[View the full topic](https://community.openai.com/t/can-text-embedding-ada-002-be-made-deterministic/318054)._
