selamanse / chromaviz

A package for visualising Chroma vector collections in 3D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ChromaViz

A package for visualising vector embedding collections as part of the Chroma vector database.

Uses Flask, Vite, and react-three-fiber to host a live 3D view of the data in a web browser, should perform well up to 10k+ documents. Dimensional reduction is performed using PCA for colors down to 50 dimensions, followed by tSNE down to 3.

How to Use

pip install chromaviz or pip install git+https://github.com/mtybadger/chromaviz/. After installing from pip, simply call visualize_collection with a valid ChromaDB collection, and chromaviz will do the rest.

from chromaviz import visualize_collection
visualize_collection(chromadb.Collection)

It also works with Langchain+Chroma, as in:

from langchain.vectorstores import Chroma
vectordb = Chroma.from_documents(data, embeddings, ids)

from chromaviz import visualize_collection
visualize_collection(vectordb._collection)

Screenshots

Screenshot of ChromaViz on a biological dataset Screenshot of ChromaViz close up

To-Do

  • More dimensional reduction options and flexibility
  • Refactor extremely shoddy React code
  • Improve UX

About

A package for visualising Chroma vector collections in 3D

License:MIT License


Languages

Language:JavaScript 64.8%Language:Python 20.2%Language:CSS 10.7%Language:HTML 4.3%