- Semantic Search: Find documents based on meaning rather than exact keyword matches
- Retrieval Augmented Generation (RAG): Enhance LLMs with relevant context from your knowledge base
- Recommendation Systems: Build similarity-based recommendation engines
- Content Classification: Automatically categorize documents based on their semantic content
- Duplicate Detection: Identify similar or duplicate content across large document collections
Configuration
1. Configure the Chroma application
Create a Chroma application in your.upsun/config.yaml:
The example above is using a HIGH_MEMORY container. You can refer to the Container profiles documentation for more information.
2. Connect from your application
To connect to Chroma from another application in your project, add a relationship in that application configuration block: As the example useschroma as the relationship name, your application will have access to CHROMA_ environments variables.
3. Use the relationship in your application
Connect to Chroma using the relationship configuration:- Python
- Node.js
Persistent storage
The configuration includes persistent storage through mounts:.db: Stores the main Chroma database files.chroma: Stores additional Chroma metadata
Access Chroma
Chroma runs as an internal application without external HTTP access. Other applications in your project connect to it using thechroma.internal hostname through relationships.
For development and debugging, you can use port forwarding to access your Chroma instance locally:
Exposing Chroma on the public internet
If you are willing to make the Chroma database publicly accessible, add a new route to the application in the.upsun/config.yaml file:
.upsun/config.yaml
Exporting Data
Chroma stores its vector database on disk as SQLite files within the service container’s mount directory. The data is directly accessible via the mount path and can be downloaded using the CLI or rsync.-
Identify the mount path where Chroma stores its data (typically defined in your
.upsun/config.yamlas asource: servicemount pointing to the Chroma service). - Download the data directory using the CLI:
Terminal
- The downloaded directory contains the SQLite database files (
.db) used by Chroma. These can be restored by placing them back in the mount path of a new Chroma service.