admin管理员组文章数量:1123262
I have a container named 'vectormodels', which holds items of type BgBomVectorModel
. My task is to return an array of BgBomVectorItem.
Each model comprises 200 BgBomVectorItem elements, and the container contains 1000 models in total. I know the specific models I need since my client will select a model by its ID. However, they only require 5 or 6 BgBomVectorItem elements from the selected model. Therefore, I need to perform a vector search within the array.
- We have a lot of examples vector search container collection. But not inside object
- I'm using Semantic Kernel.
- I suspect the issue lies with the Indexing Policy.
public class BgBomVectorModel
{
[VectorStoreRecordKey]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; } //<- will select by id
public List<BgBomVectorItem> BomItemsInformation { get; set; } //<- For this need Vectore Search
}
public class BgBomVectorItem
{
[VectorStoreRecordKey]
public string id { get; set; }
[VectorStoreRecordData(IsFullTextSearchable = true)]
public string Information { get; set; }
//Vector Embedding
[VectorStoreRecordVector(4, DistanceFunction.EuclideanDistance, IndexKind.Flat)]
public ReadOnlyMemory<float> DescriptionEmbedding { get; set; }
}
I have attempted to perform a vector search within a CosmosDB container, specifically searching within the array of BgBomVectorItem elements inside each BgBomVectorModel. However, most of the examples I've found so far only show vector search within container collections, not inside objects like in my case. I was expecting to retrieve a subset of BgBomVectorItem elements (5 or 6 items) from a specific model based on its ID, but it seems that the current indexing policy might be preventing the search from working correctly within the objects.
本文标签: cHow can I perform a vector search in CosmosDB using an array of objectsStack Overflow
版权声明:本文标题:c# - How can I perform a vector search in CosmosDB using an array of objects? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736561401a1944649.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论