feat(matching): rank with semantic embeddings and explain matches by evidence
This commit is contained in:
1 parent
facc1789b1
commit
24b64d698a
215 files changed
+16951
-327
No files matched your search
@@ -68,10 +68,14 @@ type scoreInput struct {
|
||||
policy domain.MatchingPolicy
|
||||
skills []requestedSkill
|
||||
evidence []evidenceSource
|
||||
// semantics is the calibrated Sem in micro units, or nil when it is
|
||||
// unknown and the neutral value applies.
|
||||
semantics *int64
|
||||
}
|
||||
|
||||
// computeScores applies the FR09 model. Unknown components are neutral: Dom,
|
||||
// Sem, Fr, and Rsp use the neutral value, T is neutral because there is no
|
||||
// computeScores applies the FR09 model. Sem is the calibrated similarity when
|
||||
// stored vectors give one. Unknown components are neutral: Dom, Sem without
|
||||
// vectors, Fr, and Rsp use the neutral value, T is neutral because there is no
|
||||
// comparable real cohort, and V is zero because no competition evidence
|
||||
// exists, which is not a penalty.
|
||||
func computeScores(input scoreInput) scores {
|
||||
@@ -80,6 +84,9 @@ func computeScores(input scoreInput) scores {
|
||||
result := scores{
|
||||
domain: neutral, semantics: neutral, t: neutral, freshness: neutral, responsive: neutral,
|
||||
}
|
||||
if input.semantics != nil {
|
||||
result.semantics = *input.semantics
|
||||
}
|
||||
result.skills = make([]skillOutcome, 0, len(input.skills))
|
||||
var weighted, weights int64
|
||||
for _, skill := range input.skills {
|
||||
|
||||
Reference in new issue
Block a user