Where can vectors live in Azure Cosmos DB for NoSQL?
Why C is the answer
In the documents, alongside your data
Microsoft says you can store vectors directly in documents, next to the other properties.
In detail
- Vectors can live in the documents, next to the data.
- This avoids syncing a second database.
Use case
An illustrative scenario, not a real incident.
A product app stores embeddings in the same Cosmos DB documents as its data, so one query can use both.
See it in different ways
flowchart LR A["Text"] --> B["Embedding model"] B --> C["Vector stored with the item"] D["Query embedding"] --> E["Similarity search"] C --> E E --> F["Closest items"]
mindmap
root((Cosmos DB))
Query cost
Use the partition key
Write cost
Index only what you query
Vectors
Stored in the documents
Changes
Change feedflowchart LR S0["Document"] --> S1["Embedding field"] --> S2["Vector query"]
Key point: Vectors can live in the documents.
Why the other options are wrong
- A. In the partition key of each container
- A partition key is not for vectors.
- B. Only in a separate vector database outside of Cosmos DB
- A separate database is not required.
- D. Only in Azure Blob Storage, referenced by a URL
- Blob Storage is not required.

