Database / ChromaDB Interview Questions
What configuration settings does ChromaDB support and how do you disable telemetry?
By default, ChromaDB sends anonymised usage telemetry to help the development team understand how the product is used. In enterprise or privacy-sensitive environments this should be disabled. ChromaDB also supports several configuration settings via environment variables and the Settings class.
import chromadb
from chromadb.config import Settings
import os
# --- Option 1: Disable telemetry via environment variable ---
os.environ["ANONYMIZED_TELEMETRY"] = "False"
# --- Option 2: Disable via Settings class ---
client = chromadb.PersistentClient(
path="./my_db",
settings=Settings(
anonymized_telemetry=False,
allow_reset=True, # enables client.reset() — wipes all data!
),
)
# --- Option 3: Disable telemetry for HttpClient ---
client_http = chromadb.HttpClient(
host="localhost",
port=8000,
settings=Settings(anonymized_telemetry=False),
)
# Settings available via Settings class
all_settings = Settings(
anonymized_telemetry=False,
allow_reset=False, # default: False — prevents accidental wipe
# chroma_db_impl="duckdb+parquet", # legacy v0.3 setting (not used in v0.4+)
)
# allow_reset=True enables client.reset() — DELETES ALL DATA
# Only use in testing environments!
client_test = chromadb.EphemeralClient(
settings=Settings(allow_reset=True)
)
client_test.create_collection("temp")
client_test.reset() # wipes everything — use in test fixtures
print(client_test.list_collections()) # []| Setting | Default | Notes |
|---|---|---|
| anonymized_telemetry | True | Set False in production for privacy |
| allow_reset | False | Set True only in test environments — reset() wipes all data |
| ANONYMIZED_TELEMETRY env var | True | Environment variable alternative to Settings class |
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
