CommunityToolkit.VectorData.Chroma
1.1.0-preview
Prefix Reserved
dotnet add package CommunityToolkit.VectorData.Chroma --version 1.1.0-preview
NuGet\Install-Package CommunityToolkit.VectorData.Chroma -Version 1.1.0-preview
<PackageReference Include="CommunityToolkit.VectorData.Chroma" Version="1.1.0-preview" />
<PackageVersion Include="CommunityToolkit.VectorData.Chroma" Version="1.1.0-preview" />
<PackageReference Include="CommunityToolkit.VectorData.Chroma" />
paket add CommunityToolkit.VectorData.Chroma --version 1.1.0-preview
#r "nuget: CommunityToolkit.VectorData.Chroma, 1.1.0-preview"
#:package CommunityToolkit.VectorData.Chroma@1.1.0-preview
#addin nuget:?package=CommunityToolkit.VectorData.Chroma&version=1.1.0-preview&prerelease
#tool nuget:?package=CommunityToolkit.VectorData.Chroma&version=1.1.0-preview&prerelease
CommunityToolkit.VectorData.Chroma
Chroma provider for Microsoft.Extensions.VectorData, by the .NET Community Toolkit.
Chroma is an open-source vector database for AI applications.
The provider is built on ChromaDotNet.Client, a .NET client for Chroma and Chroma Cloud.
Quick start
- Run Chroma with Docker:
docker run -d --name chroma -p 8000:8000 chromadb/chroma
- Install the NuGet package:
dotnet add package CommunityToolkit.VectorData.Chroma
For more information, see the Microsoft.Extensions.VectorData documentation.
Limitations
- Hybrid search needs BM25 indexes, which distributed Chroma, the one Chroma Cloud runs on, and the servers that declare sparse vector indexes have. For distributed Chroma installed elsewhere, like with the Helm chart of Chroma or an operator, set
Distributed=truein the connection string, orWithDistributedChroma()in the options of the client. On a single Chroma server, a collection does not offerIKeywordHybridSearchable, and a hybrid search throws anInvalidOperationExceptionthat says why. - On Chroma Cloud, a vector search returns at most 300 results,
Skipincluded, the default quota of Chroma Cloud: beyond that, Chroma Cloud answers with a quota error. - Chroma does not store empty lists, so an empty array or list comes back as
null. - A data property whose storage name is empty, or starts with
#,$orchroma:, throws aNotSupportedExceptionwhen the collection object is created. Chroma rejects the first ones in a write, and drops thechroma:keys from every read, so such a property would always come back asnull. - Array and list properties, like the namespaces of the
TextSearchStoreof Semantic Kernel, need Chroma 1.5.0 or later. - A collection created by another client without a space has the space l2. A search on it with a distance function of another space throws, except on Chroma 1.0.0 to 1.0.5: there the provider cannot see the space, and the search returns wrong scores without an error. Use Chroma 1.0.6 or later.
- On self-hosted Chroma 1.0.21 to 1.5.9, a vector search can miss a record after an upsert, while a get still finds it. It is KD-49 in the compatibility notes of ChromaDotNet.Client. The environment variable
RAYON_NUM_THREADS=1on the server makes it much rarer. In the client,ChromaUpsertStrategy.SkipUnchangedEmbeddingswrites a record whose vector does not change without its vector, so that write does not touch the vector index. - On self-hosted Chroma 1.5.9, while upserts of the same record run at the same time, a read can return a mix of two of them: the keys that one sets to
nulland the other writes. Once the writes end, the record is one of them. - On Chroma 1.5.9, with the cosine space and vectors that are nearly parallel, a vector search over all the records can miss some of them, and pages can repeat records. It comes from the approximate index of Chroma; with the l2 space the same records are all found.
- On Chroma Cloud, a record has at most 32 metadata keys, and a null value counts as one. The provider writes every data property, null or not. A write with null values that would take a record beyond 32 keys throws an
ArgumentException. WithWithReadsBeyondKeyQuota(), the client reads such a record first and sends only the null values of the keys it has. Two writes of the same record at the same time can then mix. - On Chroma Cloud, a metadata key has at most 36 bytes in UTF-8. With a data property whose storage name is longer, the collection is created, but every upsert throws a
VectorStoreExceptionwith the quota error of Chroma Cloud. - With two or more full-text properties, each has a BM25 index of its own, whose key is its storage name with
_bm25. On Chroma Cloud, a storage name of more than 31 bytes makes that key longer than 36 bytes: the collection is created without that index, and a hybrid search on that property throws anInvalidOperationExceptionthat says why. - On distributed Chroma, the one Chroma Cloud runs on,
Containson the full-text property throws anArgumentExceptionfor a text of fewer than 3 characters: on Chroma Cloud, and elsewhere withDistributed=truein the connection string orWithDistributedChroma()in the options of the client. Once the server has indexed the records, such a filter would find no record, and its negation every record.
The connection string does not set WithUpsertStrategy and WithReadsBeyondKeyQuota(). Set them on the options of a ChromaClient created in code, and pass it to the vector store:
var options = new ChromaConfigurationOptions("http://localhost:8000")
.WithUpsertStrategy(ChromaUpsertStrategy.SkipUnchangedEmbeddings);
builder.Services.AddChromaVectorStore(_ => new ChromaClient(options));
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- ChromaDotNet.Client (>= 2.20.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.8.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.VectorData.Abstractions (>= 10.8.2)
- System.Linq.AsyncEnumerable (>= 10.0.10)
-
.NETStandard 2.0
- ChromaDotNet.Client (>= 2.20.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.8.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.VectorData.Abstractions (>= 10.8.2)
- System.Linq.AsyncEnumerable (>= 10.0.10)
-
net10.0
- ChromaDotNet.Client (>= 2.20.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.8.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.VectorData.Abstractions (>= 10.8.2)
-
net8.0
- ChromaDotNet.Client (>= 2.20.0)
- Microsoft.Extensions.AI.Abstractions (>= 10.8.3)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.VectorData.Abstractions (>= 10.8.2)
- System.Linq.AsyncEnumerable (>= 10.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.1.0-preview | 39 | 11/10/2026 |
| 1.0.2-preview | 95 | 10/27/2026 |
| 1.0.1-preview | 250 | 10/14/2026 |
| 1.0.0-preview | 136 | 10/9/2026 |