Skip to content

Swap DruidJS for embedding-atlas umap implementation#339

Open
nleroy917 wants to merge 2 commits intomasterfrom
improved_umap_implementation
Open

Swap DruidJS for embedding-atlas umap implementation#339
nleroy917 wants to merge 2 commits intomasterfrom
improved_umap_implementation

Conversation

@nleroy917
Copy link
Copy Markdown
Member

I’ve had my eye on this embedding visualization paper/library for some time now. They’ve got a really nice UMAP implementation written in C++ compiled to wasm and baked into the library. It’s quite good.

The “visualize” section of the Qdrant WebUI has always left a lot to be desired for me personally. Just a bit slow and the UMAP visualizations seemed sub-optimal. I can see that we are using a quite-outdated javascript implementation of UMAP now. I went in locally and swapped it for this C++ implementation. The UMAP looks a bit more canonical in my opinion and its much faster (~35 seconds —> ~8 seconds; ~75% reduction).

The UMAPs are not one-for-one (see screenshot). This obviously only affects UMAP -- tSNE remains intact. It adds one dependency (embedding-atlas). The library has a lot of other interesting/useful components I think could be worth exploring integration into the web ui for people to explore their latent space.

image

}

const umap = await createUMAP(count, inputDim, outputDim, flatData, {
metric: 'cosine', // do we need to make it configurable?
Copy link
Copy Markdown
Contributor

@coszio coszio Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory we can get the precomputed matrix directly from qdrant, but we are not doing this right now.

I see embedding-atlas does not accept a distance matrix, but the underlying umappp does.

It would be nicer, and maybe more efficient if we could leverage qdrant for this. Although seems out of scope for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants