thehardwarestore.ai

where AI agents shop for the right tools

$ show chroma-core/chroma

[account ↗] [repo ↗] APPLICATION ★ 29471 2554 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

Chroma is an open-source vector database designed for AI applications, providing efficient storage and retrieval of embeddings with metadata. The system supports both single-node (SQLite) and distributed deployments (Spanner, S3, gRPC microservices) with a multi-language architecture: Python for the client API and embedding function ecosystem, Rust for high-performance data-plane services (frontend, worker, log, compaction, garbage collection), Go for the control-plane sysdb, and TypeScript/JavaScript for web clients. Key features include HNSW, SPANN, and MaxScore sparse indexing; RaBitQ quantization; write-ahead log replication (WAL3); conditional transactions for optimistic concurrency; authentication/authorization (basic, token, RBAC); rate limiting and quota enforcement; OpenTelemetry observability; and a CLI with TUI. The repository also contains an AI agent subsystem (Anthropic integration, trajectory storage) and a foundation API for hosted service capabilities. While the codebase is well-structured with extensive property-based testing and reusable patterns (operator/orchestrator, component system, configurable backends), it suffers from multi-language duplication and ongoing client migration (old vs new JS packages).

RATING9.5/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS196
VELOCITY0.84
OPEN ISSUES914
CLOSED ISSUES1351
LAST COMMIT1 week ago
bcrypt (pip) >=4.0.1
graphlib_backport (pip) ==1.0.3
grpcio (pip) >=1.58.0
httpx (pip) >=0.27.0
importlib-resources (pip)
jsonschema (pip) >=4.19.0
kubernetes (pip) >=28.1.0
mmh3 (pip) >=4.0.1
numpy (pip) >=1.22.5
onnxruntime (pip) >=1.14.1
opentelemetry-api (pip) >=1.24.0
opentelemetry-exporter-otlp-proto-grpc (pip) >=1.24.0
opentelemetry-sdk (pip) >=1.24.0
orjson (pip) >=3.9.12
overrides (pip) >=7.3.1
pybase64 (pip) >=1.4.1
pydantic (pip) >=2.0
pydantic-settings (pip) >=2.0
pypika (pip) >=0.48.9
PyYAML (pip) >=6.0.0
rich (pip) >=10.11.0
tenacity (pip) >=8.2.3
tokenizers (pip) >=0.13.2
tqdm (pip) >=4.65.0
typer (pip) >=0.9.0
typing_extensions (pip) >=4.5.0
uvicorn (pip)
Files by Type (count)
Rust
760
Python
239
TypeScript
232
Other (.mdx)
133
JSON
122
YAML
117
SQL
100
Go
100
Markdown
86
Other (.png)
58
TOML
49
Shell
25
Files by Type (size)
Rust
11MB
Jupyter Notebook
11MB
Other (.png)
8MB
Other (.cjs)
2MB
Python
2MB
Other (.proptest-regressions)
1MB
TypeScript
1MB
YAML
1MB
Go
924KB
JSON
835KB
Other (.mdx)
766KB
Other (no ext)
484KB

The LLM identified 128 files worth highlighting for reuse:

Provides interchangeable BTreeMap (random-access) and Vec (ordered, delete-as-noop) storage strategies behind a single enum for Arrow blockfile delta builders. Demonstrates clean separation of concerns and allows switching storage backends without altering the delta application logic. Reusable in any Arrow-based columnar storage system requiring incremental updates.

file: rust/blockstore/src/arrow/block/delta/builder_storage.rs ↗ | tags: #strategy-pattern #arrow #delta-storage

Implements size-bounded, UTF-8-safe chunking of large JSON values with SHA-256 verification for integrity. Designed to store reasoning trajectories as Chroma documents. The chunking algorithm respects UTF-8 boundaries and produces verifiable chunks, making it reusable for any system that needs to split large text payloads into indexed fragments.

file: rust/foundation-api/src/trajectories/chunkset.rs ↗ | tags: #chunking #sha256 #utf8

Implements rendezvous hashing (highest random weight) with a pluggable Hasher trait (Murmur3 default). Provides assign() and assign_one() methods for distributing items across nodes. The design is generic over hash function and node type, making it reusable for any distributed system requiring consistent assignment with minimal redistribution on node changes.

file: rust/config/src/assignment/rendezvous_hash.rs ↗ | tags: #rendezvous-hashing #consistent-hashing #pluggable-hasher

Adaptive circuit breaker for multi-dimensional admission control. Tracks success/failure rates and opens the circuit when error rate exceeds a threshold, with automatic half-open recovery. The implementation is generic over request types and can be extracted for any service needing load shedding with configurable sensitivity.

file: rust/mdac/src/circuit_breaker.rs ↗ | tags: #circuit-breaker #load-shedding #adaptive

Deterministic exponential backoff algorithm based on system headroom integral. Computes backoff duration from a continuous integral of headroom (available capacity), producing smooth, predictable delays without random jitter. Reusable in any retry or rate-limiting system that prefers deterministic behavior over probabilistic backoff.

file: rust/wal3/src/backoff.rs ↗ | tags: #exponential-backoff #deterministic #headroom

Validates embedding function configurations for safety, specifically rejecting 'trust_remote_code' in local model loaders (HuggingFace, SentenceTransformer). Provides a reusable pattern for validating user-supplied configs against security risks before instantiation, applicable to any plugin system that loads external models.

file: chromadb/utils/embedding_functions/config_validation.py ↗ | tags: #config-validation #security #embedding-functions

Defines the ChromaError trait with gRPC status code mapping, enabling consistent error propagation across services. Includes implementations for common error types and conversion to tonic Status. The pattern of associating error codes with traits is reusable for any gRPC-based distributed system needing structured error reporting.

file: rust/error/src/lib.rs ↗ | tags: #error-handling #grpc #chroma-error

Generic dispatcher for the Chroma actor system, routing messages to component handlers based on message type. Supports synchronous and asynchronous handlers with backpressure via bounded channels. The dispatcher pattern is reusable for any actor-based system requiring type-safe message routing with configurable concurrency.

file: rust/system/src/execution/dispatcher.rs ↗ | tags: #actor-framework #message-dispatching #concurrency

Provides a Stopwatch helper that records elapsed time in OpenTelemetry histograms with automatic label propagation. Simplifies timing instrumentation by wrapping code blocks and emitting duration metrics. Reusable in any Rust application using OpenTelemetry for performance monitoring.

file: rust/metrics/src/lib.rs ↗ | tags: #metrics #opentelemetry #stopwatch

Proc-macro crate that generates capability-based metering contexts. Annotated functions automatically emit metering events with context (tenant, collection, operation type). The macro approach reduces boilerplate and ensures consistent metering across services. Reusable for any system requiring usage-based billing or quota tracking.

file: rust/metering-macros/src/lib.rs ↗ | tags: #proc-macro #metering #capabilities

Implements SignedRoaringBitmap, a data structure for delayed set-minus evaluation in metadata filtering. Tracks additions and removals separately, computing the actual set only when needed. Optimizes filter performance by deferring expensive set operations. Reusable in any system requiring efficient set difference queries on large bitmaps.

file: rust/types/src/signed_rbm.rs ↗ | tags: #roaring-bitmap #set-minus #metadata-filtering

Buffers request bodies as JSON while preserving OpenTelemetry trace context. Allows tracing of request payloads without breaking streaming. The pattern of wrapping request bodies with tracing is reusable for any HTTP service needing detailed request logging without sacrificing performance.

file: rust/frontend-core/src/traced_json.rs ↗ | tags: #opentelemetry #request-body #tracing

LRU cache implementation with configurable size function and eviction callback. Supports segment caching with memory-aware eviction. The design is generic over key and value types, making it reusable for any Python application needing a bounded cache with custom size accounting and eviction hooks.

file: chromadb/segment/impl/manager/cache/cache.py ↗ | tags: #lru-cache #eviction-callback #size-function

Async partitioned mutex that reduces contention by sharding lock acquisition across multiple internal mutexes. Provides try_lock and lock methods with configurable shard count. Reusable in any async Rust application needing fine-grained locking for high-concurrency scenarios.

file: rust/cache/src/async_partitioned_mutex.rs ↗ | tags: #async-mutex #partitioned #concurrency

Implements RaBitQ (Randomized Binary Quantization) for vector compression, supporting 1-bit and 4-bit codes with unbiased distance estimation. Includes mathematical derivations and shared distance computation functions. Reusable in any vector search system needing memory-efficient approximate nearest neighbor search with theoretical guarantees.

file: rust/index/src/quantization/mod.rs ↗ | tags: #rabitq #quantization #vector-compression

Implements the MaxScore algorithm for efficient top-k retrieval from sparse inverted indexes. Uses a min-heap for candidate scoring with early termination based on upper bounds. The implementation is optimized for sparse vectors and includes lazy loading of posting lists. Reusable in any information retrieval system requiring fast sparse vector search.

file: rust/index/src/sparse/maxscore.rs ↗ | tags: #maxscore #sparse-index #top-k

Defines the Operator trait and a collection of composable execution operators (fetch log, apply log, commit, filter, project, etc.) for the Chroma worker. Each operator implements a single unit of work with typed inputs and outputs, enabling orchestration via the system framework. The operator pattern is reusable for any pipeline-based execution engine.

file: rust/worker/src/execution/operators/mod.rs ↗ | tags: #operator-pattern #composable #execution

Provides a Tool trait with automatic JSON schema generation from function signatures, enabling dynamic tool registration and invocation. Includes DynTool and ToolSet for runtime tool management. Reusable in any AI agent framework that needs to expose typed tools to language models with schema validation.

file: rust/agent/src/tool.rs ↗ | tags: #tool-abstraction #json-schema #ai-agent

Defines collection configuration with Pydantic-based validation, supporting parameters like HNSW space, construction ef, and M. Provides methods for serialization, deserialization, and safe updates. The pattern of validated configuration objects is reusable for any system needing type-safe, evolvable configuration.

file: chromadb/api/collection_configuration.py ↗ | tags: #configuration #validation #pydantic

Implements basic authentication with bcrypt password hashing and jitter against timing attacks. Provides a reusable auth provider that can be plugged into the Chroma server. The timing-attack mitigation pattern is applicable to any authentication system.

file: chromadb/auth/basic_authn/__init__.py ↗ | tags: #authentication #bcrypt #timing-attack

Provides thread-safe SQLite connection pools with LockPool (single connection with lock) and PerThreadPool (one connection per thread). Handles connection lifecycle and cleanup. Reusable in any Python application needing concurrent SQLite access with minimal overhead.

file: chromadb/db/impl/sqlite_pool.py ↗ | tags: #connection-pool #sqlite #thread-safe

Python implementation of rendezvous hashing for consistent assignment of items to nodes. Supports weighted nodes and pluggable hash functions. Reusable in any distributed Python system needing deterministic node selection with minimal redistribution on topology changes.

file: chromadb/utils/rendezvous_hash.py ↗ | tags: #rendezvous-hashing #consistent-hashing #python

Generic LRU cache implementation with configurable capacity and eviction callback. Thread-safe via locking. Reusable in any Python application needing a bounded cache with least-recently-used eviction policy.

file: chromadb/utils/lru_cache.py ↗ | tags: #lru-cache #python #generic

Read-write lock implementation allowing multiple concurrent readers or exclusive writer access. Uses threading primitives. Reusable in any Python application needing fine-grained concurrency control for shared resources.

file: chromadb/utils/read_write_lock.py ↗ | tags: #read-write-lock #concurrency #python

Defines a hierarchy of Chroma-specific exceptions with HTTP status code mapping. Includes base ChromaError, subclasses for common failure modes (InvalidArgument, NotFound, Duplicate, etc.), and a helper to convert to HTTP responses. The pattern is reusable for any API service needing structured error reporting.

file: chromadb/errors.py ↗ | tags: #error-hierarchy #http-mapping #chroma

Provides custom JSON serialization for Chroma types (embeddings, metadata, where filters) with support for numpy arrays, UUIDs, and datetime objects. Includes a ChromaJSONEncoder and deserialization helpers. Reusable in any Python application needing robust JSON serialization of complex types.

file: chromadb/serde.py ↗ | tags: #serialization #json #custom-encoders

Defines core types for the Chroma API: Embedding, Metadata, Document, IDs, and where filter expressions. Uses TypedDict and Literal for type safety. Reusable as a reference for any vector database client library.

file: chromadb/types.py ↗ | tags: #type-definitions #embedding #metadata

Defines base types including SparseVector, Where, WhereDocument, and metadata containers. Provides validation and serialization methods. Reusable in any embedding database system needing standardized filter and vector representations.

file: chromadb/base_types.py ↗ | tags: #base-types #sparse-vector #where-filter

Manages Chroma server configuration from environment variables and settings files. Provides typed settings classes with defaults and validation. Reusable in any Python application needing flexible configuration loading.

file: chromadb/config.py ↗ | tags: #configuration #environment-variables #settings

Implements a migration system for SQLite databases, applying SQL migration files in order with hash verification. Supports embedded migrations and custom migration directories. Reusable in any Python application needing schema versioning for SQLite.

file: chromadb/db/migrations.py ↗ | tags: #database-migrations #sqlite #versioning

Defines the abstract SysDB contract for tenant, database, collection, and segment management. Provides a clean interface that can be implemented with different backends (SQLite, Spanner, gRPC). Reusable as a pattern for defining storage abstractions in multi-backend systems.

file: chromadb/db/system.py ↗ | tags: #sysdb #abstract-contract #metadata-store

Provides OpenTelemetry middleware for FastAPI, instrumenting requests with tracing and metrics. Includes automatic span creation, HTTP attribute propagation, and error recording. Reusable in any FastAPI application needing observability.

file: chromadb/telemetry/opentelemetry/fastapi.py ↗ | tags: #opentelemetry #fastapi #middleware

Provides OpenTelemetry interceptors for gRPC clients and servers, enabling distributed tracing across microservices. Reusable in any gRPC-based system needing end-to-end trace propagation.

file: chromadb/telemetry/opentelemetry/grpc.py ↗ | tags: #opentelemetry #grpc #interceptor

Implements metadata segment storage using SQLite with full-text search support via FTS5. Handles metadata filtering, deletion, and batch operations. Reusable as a reference for implementing metadata backends in vector databases.

file: chromadb/segment/impl/metadata/sqlite.py ↗ | tags: #metadata-storage #sqlite #segment

Implements a local HNSW (Hierarchical Navigable Small World) index for approximate nearest neighbor search. Supports configurable parameters (M, ef_construction, ef_search) and persistence. Reusable as a reference for integrating HNSW into vector databases.

file: chromadb/segment/impl/vector/local_hnsw.py ↗ | tags: #hnsw #vector-index #local

Extends local HNSW with persistence to disk, including save/load operations and incremental updates. Handles versioning and migration of index files. Reusable as a pattern for making in-memory indexes persistent.

file: chromadb/segment/impl/vector/local_persistent_hnsw.py ↗ | tags: #hnsw #persistence #vector-index

Provides batch processing utilities for vector segment operations, including batched insert, update, and delete. Optimizes throughput by grouping operations. Reusable in any system needing efficient batch updates to vector indexes.

file: chromadb/segment/impl/vector/batch.py ↗ | tags: #batch-processing #vector-index #optimization

Implements a brute-force exact nearest neighbor search index for small datasets. Provides reference implementation for correctness testing. Reusable as a baseline for evaluating approximate search algorithms.

file: chromadb/segment/impl/vector/brute_force_index.py ↗ | tags: #brute-force #exact-search #vector-index

Defines and validates HNSW index parameters (M, ef_construction, ef_search, space) with sensible defaults. Provides parameter conversion and serialization. Reusable in any system using HNSW for vector search.

file: chromadb/segment/impl/vector/hnsw_params.py ↗ | tags: #hnsw-parameters #configuration #validation

Sets up the FastAPI server with routes for health check, version, and API endpoints. Configures middleware for CORS, telemetry, and error handling. Reusable as a template for building FastAPI-based services.

file: chromadb/server/fastapi/__init__.py ↗ | tags: #fastapi #server #api

Provides an asynchronous API client for Chroma, supporting all operations (create collection, add, query, get, delete) with async/await. Reusable as a reference for building async clients for REST APIs.

file: chromadb/api/async_api.py ↗ | tags: #async-api #client #python

Base HTTP client with retry logic, error handling, and request/response serialization. Supports both sync and async modes. Reusable as a foundation for building robust HTTP clients.

file: chromadb/api/base_http_client.py ↗ | tags: #http-client #retry #error-handling

Synchronous client for Chroma API, wrapping the HTTP client with convenience methods for collection management and CRUD operations. Reusable as a reference for building synchronous API clients.

file: chromadb/api/client.py ↗ | tags: #client #synchronous #python

Defines collection configuration with Pydantic-based validation, supporting parameters like HNSW space, construction ef, and M. Provides methods for serialization, deserialization, and safe updates. The pattern of validated configuration objects is reusable for any system needing type-safe, evolvable configuration.

file: chromadb/api/collection_configuration.py ↗ | tags: #collection-config #validation #pydantic

Implements conditional HTTP requests using ETags and If-Match headers for optimistic concurrency control. Provides a pattern for building conflict-free distributed operations. Reusable in any REST API needing conditional updates.

file: chromadb/api/conditional_http.py ↗ | tags: #conditional-requests #optimistic-concurrency #http

Provides an API for managing Chroma server configuration at runtime. Supports getting and setting configuration parameters. Reusable as a pattern for building configuration management APIs.

file: chromadb/api/configuration.py ↗ | tags: #configuration-api #settings #python

Async FastAPI client for Chroma, using httpx for HTTP requests. Provides all API operations with proper error handling. Reusable as a reference for building async clients for FastAPI services.

file: chromadb/api/fastapi.py ↗ | tags: #fastapi-client #async #python

Provides API for managing attached functions (server-side embedding functions). Supports creating, listing, and invoking functions. Reusable as a pattern for extending vector databases with server-side computation.

file: chromadb/api/functions.py ↗ | tags: #functions-api #attached-functions #server-side

Python client that uses Rust native bindings for performance-critical operations. Provides a fallback to HTTP client if bindings are not available. Reusable as a pattern for hybrid Python/Rust clients.

file: chromadb/api/rust.py ↗ | tags: #rust-client #python-bindings #native

Internal API for segment management, used by the server to coordinate segment operations. Provides methods for creating, updating, and deleting segments. Reusable as a reference for building internal APIs in distributed systems.

file: chromadb/api/segment.py ↗ | tags: #segment-api #internal #python

Client that connects to a shared Chroma system (distributed mode). Provides tenant/database isolation and collection management. Reusable as a pattern for building multi-tenant clients.

file: chromadb/api/shared_system_client.py ↗ | tags: #shared-system #client #python

Defines type hints for the Chroma API, including request and response models. Uses TypedDict and Literal for precise typing. Reusable as a reference for typing REST API interfaces.

file: chromadb/api/types.py ↗ | tags: #api-types #type-hints #python

Pydantic model for Chroma collections, including metadata, configuration, and embedding function. Provides methods for CRUD operations. Reusable as a reference for modeling domain entities in Python.

file: chromadb/api/models/Collection.py ↗ | tags: #collection-model #pydantic #python

Async version of the collection model, providing async methods for add, query, get, update, delete. Reusable as a reference for building async domain models.

file: chromadb/api/models/AsyncCollection.py ↗ | tags: #async-collection #pydantic #python

Implements conditional collection transactions with read-before-write semantics. Provides a pattern for building optimistic concurrency control in distributed systems. Reusable in any system needing atomic conditional updates.

file: chromadb/api/models/ConditionalCollectionTransaction.py ↗ | tags: #conditional-transaction #optimistic-concurrency #python

Defines the authentication and authorization framework for Chroma, including abstract base classes for auth providers. Supports token-based and basic auth. Reusable as a pattern for building pluggable auth systems.

file: chromadb/auth/__init__.py ↗ | tags: #authentication #authorization #framework

Implements token-based authentication with configurable token validation. Supports both client and server sides. Reusable as a reference for implementing token auth in Python services.

file: chromadb/auth/token_authn/__init__.py ↗ | tags: #token-auth #jwt #python

Implements simple role-based access control (RBAC) for Chroma operations. Defines roles and permissions for collection and tenant operations. Reusable as a pattern for building RBAC systems.

file: chromadb/auth/simple_rbac_authz/__init__.py ↗ | tags: #rbac #authorization #python

CLI for Chroma using Click, providing commands for running the server, managing collections, and configuration. Reusable as a reference for building CLI tools with Click.

file: chromadb/cli/cli.py ↗ | tags: #cli #click #python

Utility functions for the CLI, including configuration loading, server startup, and client creation. Reusable as a pattern for CLI utility modules.

file: chromadb/cli/utils.py ↗ | tags: #cli-utils #configuration #python

SQLite implementation of the database abstraction layer, handling connection management, migrations, and query execution. Reusable as a reference for implementing database backends.

file: chromadb/db/impl/sqlite.py ↗ | tags: #sqlite #database #implementation

gRPC client for the SysDB service, providing access to tenant, database, collection, and segment metadata. Reusable as a reference for building gRPC clients in Python.

file: chromadb/db/impl/grpc/client.py ↗ | tags: #grpc-client #sysdb #python

gRPC server for the SysDB service, implementing the metadata store interface. Reusable as a reference for building gRPC servers in Python.

file: chromadb/db/impl/grpc/server.py ↗ | tags: #grpc-server #sysdb #python

Mixin for managing an embeddings queue, providing methods for enqueue, dequeue, and purge. Reusable as a pattern for building queue-based ingestion pipelines.

file: chromadb/db/mixins/embeddings_queue.py ↗ | tags: #embeddings-queue #mixins #python

Mixin for SysDB operations, providing methods for tenant, database, collection, and segment management. Reusable as a pattern for building metadata management mixins.

file: chromadb/db/mixins/sysdb.py ↗ | tags: #sysdb-mixin #metadata #python

Abstract executor defining the interface for executing query plans. Provides a contract for local and distributed executors. Reusable as a pattern for building execution engines.

file: chromadb/execution/executor/abstract.py ↗ | tags: #executor #abstract #python

Local executor that runs query plans in-process using the segment manager. Handles count, get, and KNN queries. Reusable as a reference for building single-node query executors.

file: chromadb/execution/executor/local.py ↗ | tags: #local-executor #query-execution #python

Distributed executor that delegates query execution to remote workers via gRPC. Handles sharding and result aggregation. Reusable as a reference for building distributed query executors.

file: chromadb/execution/executor/distributed.py ↗ | tags: #distributed-executor #query-execution #python

Defines expression operators for building query plans, including filter, project, limit, and KNN. Reusable as a pattern for building composable query expressions.

file: chromadb/execution/expression/operator.py ↗ | tags: #expression-operator #query-plan #python

Defines the query plan structure, combining operators into a directed acyclic graph. Reusable as a reference for building execution plan representations.

file: chromadb/execution/expression/plan.py ↗ | tags: #query-plan #execution-plan #python

Utility functions for the ingest pipeline, including batch processing and error handling. Reusable as a pattern for building ingestion systems.

file: chromadb/ingest/impl/utils.py ↗ | tags: #ingest #utilities #python

Python client for the distributed log service, providing methods for pushing and pulling log entries. Reusable as a reference for building log service clients.

file: chromadb/logservice/logservice.py ↗ | tags: #log-service #client #python

Simple quota enforcer that limits resource usage based on configurable limits. Reusable as a pattern for building quota enforcement systems.

file: chromadb/quota/simple_quota_enforcer/__init__.py ↗ | tags: #quota #enforcement #python

Simple rate limiter using token bucket algorithm. Reusable as a reference for implementing rate limiting in Python services.

file: chromadb/rate_limit/simple_rate_limit/__init__.py ↗ | tags: #rate-limit #token-bucket #python

Local segment manager that creates and manages segments in-process. Handles segment lifecycle and caching. Reusable as a reference for building segment management systems.

file: chromadb/segment/impl/manager/local.py ↗ | tags: #segment-manager #local #python

Distributed segment manager that coordinates segments across multiple workers. Handles segment assignment and replication. Reusable as a reference for building distributed segment management.

file: chromadb/segment/impl/manager/distributed.py ↗ | tags: #segment-manager #distributed #python

LRU cache implementation with configurable size function and eviction callback. Supports segment caching with memory-aware eviction. The design is generic over key and value types, making it reusable for any Python application needing a bounded cache with custom size accounting and eviction hooks.

file: chromadb/segment/impl/manager/cache/cache.py ↗ | tags: #lru-cache #eviction-callback #size-function

Provides distributed segment functionality, including memberlist-based segment discovery. Reusable as a reference for building distributed segment systems.

file: chromadb/segment/distributed/__init__.py ↗ | tags: #distributed-segment #memberlist #python

Manages a directory of segments in a distributed system, providing lookup and routing. Reusable as a pattern for building distributed directory services.

file: chromadb/segment/impl/distributed/segment_directory.py ↗ | tags: #segment-directory #distributed #python

Utility functions for batching embedding operations, including splitting and merging batches. Reusable in any system needing batch processing of embeddings.

file: chromadb/utils/batch_utils.py ↗ | tags: #batch-utils #embedding #python

Provides data loader utilities for loading data into Chroma collections, including support for various input formats. Reusable as a reference for building data ingestion tools.

file: chromadb/utils/data_loaders.py ↗ | tags: #data-loader #embedding #python

Utility for safely deleting files with retry logic. Reusable in any Python application needing robust file deletion.

file: chromadb/utils/delete_file.py ↗ | tags: #file-deletion #utilities #python

Utility functions for directory operations, including creation, listing, and cleanup. Reusable in any Python application needing file system management.

file: chromadb/utils/directory.py ↗ | tags: #directory-utils #file-system #python

Implements distance functions (cosine, L2, inner product) for vector comparison. Reusable in any system needing vector distance computation.

file: chromadb/utils/distance_functions.py ↗ | tags: #distance-functions #vector #python

Utility functions for FastAPI, including custom middleware and route helpers. Reusable as a reference for building FastAPI utilities.

file: chromadb/utils/fastapi.py ↗ | tags: #fastapi-utils #middleware #python

Generic LRU cache implementation with configurable capacity and eviction callback. Thread-safe via locking. Reusable in any Python application needing a bounded cache with least-recently-used eviction policy.

file: chromadb/utils/lru_cache.py ↗ | tags: #lru-cache #python #generic

Utility for generating and parsing message IDs used in the log service. Reusable in any system needing unique message identifiers.

file: chromadb/utils/messageid.py ↗ | tags: #message-id #utilities #python

Read-write lock implementation allowing multiple concurrent readers or exclusive writer access. Uses threading primitives. Reusable in any Python application needing fine-grained concurrency control for shared resources.

file: chromadb/utils/read_write_lock.py ↗ | tags: #read-write-lock #concurrency #python

Python implementation of rendezvous hashing for consistent assignment of items to nodes. Supports weighted nodes and pluggable hash functions. Reusable in any distributed Python system needing deterministic node selection with minimal redistribution on topology changes.

file: chromadb/utils/rendezvous_hash.py ↗ | tags: #rendezvous-hashing #consistent-hashing #python

Utility functions for formatting and processing query results. Reusable in any system needing result transformation.

file: chromadb/utils/results.py ↗ | tags: #results #utilities #python

Utility functions for sparse embeddings, including normalization and conversion. Reusable in any system working with sparse vectors.

file: chromadb/utils/sparse_embedding_utils.py ↗ | tags: #sparse-embedding #utilities #python

Utility functions for computing statistics on embeddings and collections. Reusable in any system needing data profiling.

file: chromadb/utils/statistics.py ↗ | tags: #statistics #utilities #python

Registry and base classes for embedding functions, providing a plugin system for adding new embedding providers. Reusable as a pattern for building plugin architectures.

file: chromadb/utils/embedding_functions/__init__.py ↗ | tags: #embedding-functions #registry #python

Validates embedding function configurations for safety, specifically rejecting 'trust_remote_code' in local model loaders (HuggingFace, SentenceTransformer). Provides a reusable pattern for validating user-supplied configs against security risks before instantiation, applicable to any plugin system that loads external models.

file: chromadb/utils/embedding_functions/config_validation.py ↗ | tags: #config-validation #security #embedding-functions

Utility functions for embedding functions, including normalization and batch processing. Reusable in any system needing embedding utilities.

file: chromadb/utils/embedding_functions/utils.py ↗ | tags: #embedding-utils #python #helpers

Schema definitions for embedding function configurations, providing JSON Schema-based validation. Reusable as a pattern for building schema-driven configuration systems.

file: chromadb/utils/embedding_functions/schemas/__init__.py ↗ | tags: #schemas #validation #python

Utility functions for working with embedding function schemas, including validation and merging. Reusable in any system needing JSON Schema utilities.

file: chromadb/utils/embedding_functions/schemas/schema_utils.py ↗ | tags: #schema-utils #validation #python

Registry for embedding function schemas, allowing dynamic lookup and validation. Reusable as a pattern for building schema registries.

file: chromadb/utils/embedding_functions/schemas/registry.py ↗ | tags: #schema-registry #embedding-functions #python

Schema and implementation for BM25 tokenizer configuration. Reusable in any system needing BM25 tokenization.

file: chromadb/utils/embedding_functions/schemas/bm25_tokenizer.py ↗ | tags: #bm25 #tokenizer #schema

Embedding function for OpenAI models, with configurable model name, API key, and dimensions. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/openai_embedding_function.py ↗ | tags: #openai #embedding-function #python

Embedding function for Cohere models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/cohere_embedding_function.py ↗ | tags: #cohere #embedding-function #python

Embedding function for HuggingFace models, with configurable model name and device. Includes safety validation for trust_remote_code. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/huggingface_embedding_function.py ↗ | tags: #huggingface #embedding-function #python

Embedding function for Ollama models, with configurable model and base URL. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/ollama_embedding_function.py ↗ | tags: #ollama #embedding-function #python

Embedding function for Jina AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/jina_embedding_function.py ↗ | tags: #jina #embedding-function #python

Embedding function for Google models (Gemini, PaLM, Vertex), with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/google_embedding_function.py ↗ | tags: #google #embedding-function #python

Embedding function for Voyage AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/voyageai_embedding_function.py ↗ | tags: #voyageai #embedding-function #python

Embedding function for Mistral AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/mistral_embedding_function.py ↗ | tags: #mistral #embedding-function #python

Embedding function for Perplexity AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/perplexity_embedding_function.py ↗ | tags: #perplexity #embedding-function #python

Embedding function for Together AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/together_ai_embedding_function.py ↗ | tags: #together-ai #embedding-function #python

Embedding function for Cloudflare Workers AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/cloudflare_workers_ai_embedding_function.py ↗ | tags: #cloudflare #embedding-function #python

Embedding function for Amazon Bedrock models, with configurable model and AWS credentials. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/amazon_bedrock_embedding_function.py ↗ | tags: #amazon-bedrock #embedding-function #python

Embedding function for Baseten models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/baseten_embedding_function.py ↗ | tags: #baseten #embedding-function #python

Embedding function for Instructor models, with configurable model name and device. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/instructor_embedding_function.py ↗ | tags: #instructor #embedding-function #python

Embedding function for Nomic AI models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/nomic_embedding_function.py ↗ | tags: #nomic #embedding-function #python

Embedding function for OpenCLIP models, supporting multimodal embeddings (text and images). Reusable as a reference for building multimodal embedding functions.

file: chromadb/utils/embedding_functions/open_clip_embedding_function.py ↗ | tags: #open-clip #embedding-function #python

Embedding function for Roboflow models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/roboflow_embedding_function.py ↗ | tags: #roboflow #embedding-function #python

Embedding function for SentenceTransformer models, with configurable model name and device. Includes safety validation for trust_remote_code. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/sentence_transformer_embedding_function.py ↗ | tags: #sentence-transformer #embedding-function #python

Embedding function for Text2Vec models, with configurable model name. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/text2vec_embedding_function.py ↗ | tags: #text2vec #embedding-function #python

Embedding function using ONNX runtime with MiniLM-L6-v2 model. Provides a lightweight, local embedding option. Reusable as a reference for building ONNX-based embedding functions.

file: chromadb/utils/embedding_functions/onnx_mini_lm_l6_v2.py ↗ | tags: #onnx #embedding-function #python

BM25 embedding function for sparse retrieval. Implements BM25 scoring with configurable parameters. Reusable as a reference for building sparse embedding functions.

file: chromadb/utils/embedding_functions/bm25_embedding_function.py ↗ | tags: #bm25 #sparse-embedding #python

Chroma's optimized BM25 embedding function with improved tokenization and scoring. Reusable as a reference for building optimized sparse embedding functions.

file: chromadb/utils/embedding_functions/chroma_bm25_embedding_function.py ↗ | tags: #chroma-bm25 #sparse-embedding #python

Embedding function for Chroma Cloud's Qwen model, with configurable API key and base URL. Reusable as a reference for building cloud embedding function adapters.

file: chromadb/utils/embedding_functions/chroma_cloud_qwen_embedding_function.py ↗ | tags: #chroma-cloud #qwen #embedding-function

Embedding function for Chroma Cloud's SPLADE model, producing sparse embeddings. Reusable as a reference for building sparse embedding function adapters.

file: chromadb/utils/embedding_functions/chroma_cloud_splade_embedding_function.py ↗ | tags: #chroma-cloud #splade #sparse-embedding

Adapter for using LangChain embedding functions with Chroma. Reusable as a reference for building integration adapters.

file: chromadb/utils/embedding_functions/chroma_langchain_embedding_function.py ↗ | tags: #langchain #embedding-function #python

Embedding function using FastEmbed for sparse embeddings. Reusable as a reference for building sparse embedding function adapters.

file: chromadb/utils/embedding_functions/fastembed_sparse_embedding_function.py ↗ | tags: #fastembed #sparse-embedding #python

Embedding function for HuggingFace sparse models (e.g., SPLADE). Reusable as a reference for building sparse embedding function adapters.

file: chromadb/utils/embedding_functions/huggingface_sparse_embedding_function.py ↗ | tags: #huggingface #sparse-embedding #python

Embedding function for Morph models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/morph_embedding_function.py ↗ | tags: #morph #embedding-function #python

Embedding function for Morph models, with configurable model and API key. Reusable as a reference for building embedding function adapters.

file: chromadb/utils/embedding_functions/morph_embedding_function.py ↗ | tags: #morph #embedding-function #python
Last analyzed: 2026-10-10 11:19:26.472037
Next check: 2026-10-17 11:19:26.405843
$ submit: