Miloš Švaňa

ai, python, software engineering, decision-making and more

Introducing Embeddings playground

I often find myself examining the similarity between multiple pieces of text. I calculate embeddings and determine their cosine distance. Most recently, I was thinking about hacking together a simple tool that would filter out social media posts lacking factuality and resources.

I noticed that I repeatedly write the same code whenever I need to do something with text embeddings. I figured, enough is enough.

So today I am introducing my own Embeddings playground. This simple tool lets you quickly enter different texts, calculate their embeddings, and then determine the distance of different texts from the reference text.

For now, you can only create text embeddings using the mistral-embed model from Mistral AI. And you need provide your own API key. But don’t worry. Everything runs locally in the browser.

Starting with OpenAI, I am already working on adding more embedding models. I also want to add more distance metrics and an option to compare embeddings produced by different models.

The code of Embeddings Playground is avaiable on GitHub. Feel free to check it out or open an issue.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *