ChromaDB (Vector Storage)
Notes and gotchas when using ChromaDB as the vector store:
Metadata types
- ChromaDB accepts only simple types in metadata:
str,int,float,bool. - The code filters out
Nonevalues before saving to Chroma. If you neednull, store a sentinel string like"<null>".
Windows file locks
- On Windows, SQLite-based backends can keep file handles open. To avoid "PermissionError" during cleanup:
- Call
client.close()to stop background services and close the vector client before deleting files. - If you see
PermissionError, add a shorttime.sleep(2)andgc.collect()before retrying.
Performance tuning
- Set
operation_mode=onlineto use managed embeddings for faster startup. - Tune
n_resultsandsearch_tierto control how many vectors are retrieved.
Backup and restore
- Chroma stores its DB files in the
storage_path/chromadirectory. Back up this folder to preserve vectors.
» See also: docs/storage/networkx.md