Would be nice to be able to filter by the similarity search score on a database level.
For example, If I wanted to return just the records that is greater than or equal to 0.80. I am able to do this in Azure Cosmos Mongo DB instance by adding a match pipeline.
BsonDocument[] pipeline =
[
new BsonDocument
{
{
"$search", new BsonDocument
{
{
"cosmosSearch", new BsonDocument
{
{ "vector", embeddings },
{ "path", indexProperty },
{ "k", 5 }
}
},
{ "returnStoredSource", true },
}
}
},
new BsonDocument
{
{
"$project", new BsonDocument
{
{ "id", 1 },
{ "name", 1 },
{ "text", 1 },
{ "url", 1 },
{ "vector", 1 },
{ "searchScore", new BsonDocument { { "$meta", "searchScore" } } }
}
}
},
new BsonDocument
{
{
"$match", new BsonDocument
{
{ "searchScore", new BsonDocument { { "$gte", 0.80 } } }
}
}
}
];
Would be nice to be able to filter by the similarity search score on a database level.
For example, If I wanted to return just the records that is greater than or equal to 0.80. I am able to do this in Azure Cosmos Mongo DB instance by adding a match pipeline.