Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector Index support in azcosmos #23889

Open
ntttorris opened this issue Dec 25, 2024 · 5 comments
Open

Vector Index support in azcosmos #23889

ntttorris opened this issue Dec 25, 2024 · 5 comments
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@ntttorris
Copy link

Description

I try to use the following code to create a container and the index. But I cannot find the vector index setting and field.

resp, err := db.CreateContainer(
		ctx,
		azcosmos.ContainerProperties{
			ID: "vector-index-test",
			PartitionKeyDefinition: azcosmos.PartitionKeyDefinition{
				Paths: []string{"/partition"},
			},
			IndexingPolicy: &azcosmos.IndexingPolicy{
				IndexingMode: azcosmos.IndexingModeConsistent,
				Automatic:    true,
				IncludedPaths: []azcosmos.IncludedPath{
					{
						Path: "/numericId/?",
					},
					{
						Path: "/tags/*",
					},
					{
						Path: "/external/?",
					},
				},
				ExcludedPaths: []azcosmos.ExcludedPath{
					{
						Path: "/embedding/*",
					},
				},
			},
			UniqueKeyPolicy: &azcosmos.UniqueKeyPolicy{
				UniqueKeys: []azcosmos.UniqueKey{
					{
						Paths: []string{"/numericId"},
					},
				},
			},
		},
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Dec 25, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @MehaKaushik @Pilchie @wmengmsft.

@ntttorris
Copy link
Author

/assign @jliusan

@jliusan jliusan assigned jliusan and unassigned jliusan Dec 25, 2024
@Pilchie
Copy link
Member

Pilchie commented Dec 29, 2024

Thanks - also tagging @analogrelay and @TheovanKraay. Note that while it's relatively easy to add the create options here, that doesn't solve the fact that the go sdk doesn't support cross partition query aggregation, which is often required for vector queries.

Can you tell us more about your planned use case? Would you be able to make use of vector search without any client side aggregation of results from multiple partitions?

@ntttorris
Copy link
Author

Thanks - also tagging @analogrelay and @TheovanKraay. Note that while it's relatively easy to add the create options here, that doesn't solve the fact that the go sdk doesn't support cross partition query aggregation, which is often required for vector queries.

Can you tell us more about your planned use case? Would you be able to make use of vector search without any client side aggregation of results from multiple partitions?

Thanks for replying.
In my use case, doing vector search without client side aggregation is OK. I'm thinking about searching from several different partitions then do a reranking procedure with local reranking model with python. Could you just support vector search in single partition in the azcosmos sdk? which will be really helpful.

@Pilchie
Copy link
Member

Pilchie commented Dec 30, 2024

We'll take a look at it (probably next week, when more folks are back from holidays), and see what the effort looks like.

Note - if you're already re-ranking in Python, you could use the Python SDK, which does have this support already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants