New Search API AvailableDense vector search, hybrid search, and more are available in the new powerful Search API for Chroma Cloud databases.
- Python
- TypeScript
- Rust
Query
You can query a collection to run a similarity search using.query:query_texts, you can provide query_embeddings directly. You will be required to do so if your collection does not have an embedding function attached to it. The dimension of your query embedding must match the dimension of the embeddings in your collection.Python also supports query_images and query_uris as query inputs.n_results argument:ids argument lets you constrain the search only to records with the IDs from the provided list:query and get support where for metadata filtering and where_document for full-text search and regex:Get
Use.get to retrieve records by ID and/or filters without similarity ranking:Results Shape
Chroma returns.query and .get results in column-major form (arrays per field). .query results are grouped per input query; .get results are a flat list of records.
Choosing Which Data is Returned
By default, Query returnsdocuments, metadatas, and distances, and Get returns documents and metadatas.
Use include to control what comes back. ids are always returned.