Skip to content

v0.3.0

Choose a tag to compare

@Laurianti Laurianti released this 05 Oct 08:56
· 41 commits to main since this release

Minor release of ChromaDotNet.VectorData: hybrid search on Chroma Cloud, built on ChromaDotNet.Client 2.8.0. No breaking change to the API of the provider: package validation against 0.2.0 finds none.

dotnet add package ChromaDotNet.VectorData

New

  • Hybrid search on Chroma Cloud: HybridSearchAsync fuses the ranks of the vector search and of a BM25 search of the keywords in a full-text indexed string property. A record without any of the keywords gets nothing from the BM25 search, as in a keyword search.
  • CreateBm25Indexes in ChromaCollectionOptions and ChromaVectorStoreOptions: creating the collection also creates a BM25 index, a sparse vector index of Chroma, for each full-text indexed string property, and the client computes the BM25 vectors of the records as it writes them. A collection created by another Chroma client, like the Python one, with a chroma_bm25 index works too.
// client is a ChromaClient for Chroma Cloud, and Hotel has a full-text indexed string property, as in the README:
// [VectorStoreData(IsFullTextIndexed = true)] public string? Name { get; set; }
var collection = new ChromaCollection<string, Hotel>(client, "hotels-hybrid", new() { CreateBm25Indexes = true });
await collection.EnsureCollectionExistsAsync();

var results = collection.HybridSearchAsync(new float[] { 0.1f, 0.2f, 0.3f, 0.4f }, ["pool", "spa"], top: 5);
  • ChromaDotNet.Client 2.8.0: on Chroma Cloud, reads and writes of more than 300 records go in pages and batches by themselves, without WithBatchSplitting.
  • Package: the description says that the project is a community project, not affiliated with Chroma; the chroma-cloud tag; the LICENSE in the package.

ChromaDotNet.Client 2.8.0 changes the API of the client, like the names of its methods, which end in Async: code that uses ChromaClient directly needs the changes in its release notes.

Tested

The Microsoft.Extensions.VectorData conformance tests pass against Chroma 1.5.0, 1.5.9 and the latest release, and on Chroma Cloud, hybrid search included.

Package: ChromaDotNet.VectorData 0.3.0