Visualising vector embeddings in the browser

3D visualizations and 2D plots can be a useful tool for debugging semantic search applications. To address some strange results from my app built with the Ada embeddings model, I decided to create such visualisations.

VectoSphere

Since I believe this project may be helpful to others, I am sharing it here. As long as people find it useful, I plan to continue adding new features.

Please let me know if you find this helpful or if you have any suggestions or requests.

6 Likes

Great job!
Is this an open source project and if so, would you mind sharing a link?

1 Like

Did my own OSS implementation, code available @ GitHub - stephanj/embeddings-visualization

2 Likes

Thanks! Over the past week or two, I’ve been working on making it easier to use, since it now only serves for testing my own projects. If sharing it would benefit others, I’m open to that. Do you have any suggestions or specific features you’d like to see?

Is there any npm library available to use in react js app to show the vector embeddings? In Fact i was looking for vector visualizer react component

This sounds interesting. I think there are some new changes to React native and Expo that will allow this tech stack to be used in React Native. The SpaceX app uses some variation of this stack (there are some keynotes online). I will take a look at it in the coming weekends. You can hit me up anytime if you want to discuss it.

Your app is impressive. Which techniques do you use for dimensionality reduction? I’m looking to incorporate embedding visualization into my personal project.

Hey, I’m late in responding. I utilize TSNE. I stumbled upon this repository from A. Karpathy: GitHub - karpathy/tsnejs: Implementation of t-SNE visualization algorithm in Javascript.. In the browser, I process everything within a worker. I’m eager to discuss this further and welcome suggestions. Considering open-sourcing either the app or the standalone visualization component - would be beneficial. Although I’ve noticed people using it, I’ve lacked the time to work on this lately.

1 Like

Would be interesting to see it setup like a FPV game that allows you to fly through your data and maybe shoot things you would like to review when your flight is over.