Files
xinmi/internal/application/service/chat_pipeline/rerank_scope_test.go
T

19 lines
462 B
Go
Raw Normal View History

package chatpipeline
import (
"testing"
"github.com/Tencent/WeKnora/internal/types"
)
func TestRerankFallbackMinScoreForExplicitScope(t *testing.T) {
if got := rerankFallbackMinScore(nil); got != 0.15 {
t.Fatalf("default fallback minimum = %v, want 0.15", got)
}
targets := types.SearchTargets{{DisableRecallThresholds: true}}
if got := rerankFallbackMinScore(targets); got != 0 {
t.Fatalf("explicit-scope fallback minimum = %v, want 0", got)
}
}