braintrustdata / braintrust-proxy

https://www.braintrustdata.com/docs/guides/proxy
MIT License
266 stars 24 forks source link

Encrypt vector embeddings #44

Closed morgante closed 2 months ago

morgante commented 2 months ago

In my reading of the source code, it looks like vector embeddings are not currently encrypted. This is potentially problematic, since they are (somewhat) reversible.

Would you be open to a pull request to encrypt content using the input, so it's only retrievable when you have access to the original source text?

ankrgyl commented 2 months ago

Hi @morgante! Thanks for the report. Yes, definitely open to a PR. I'm not totally clear on where you'd want them to be encrypted that they are not (e.g. the results cache should cache the ouput), but a PR would help clarify!

morgante commented 2 months ago

Great. Specifically, I don't want the embedding to be retrievable unless you have the original input chunk. I'll put together a PR.

ankrgyl commented 2 months ago

Ok got it! I believe that to currently be the case, but I am likely missing something you're observing. Looking forward to the PR.