skip certainty cut-off if certainty is negative
This is a hacky workaround for now
@@ -253,7 +253,9 @@ func (e *Explorer) searchResultsToGetResponse(ctx context.Context,
// Dist is between 0..2, we need to reduce to the user space of 0..1
normalizedDist := res.Dist / 2
certainty := ExtractCertaintyFromParams(params)
- if 1-(normalizedDist) < float32(certainty) {
+ if 1-(normalizedDist) < float32(certainty) && 1-normalizedDist >= 0 {
+ // TODO: Clean this up. The >= check is so that this logic does not run
+ // non-cosine distance.
continue
}
