refine using rerank model (#2553)

### What problem does this PR solve?

#2552

### Type of change

- [x] Performance Improvement
This commit is contained in:
Kevin Hu 2024-09-24 12:38:18 +08:00 committed by GitHub
parent d9c2a128a5
commit ecf441c830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -348,7 +348,7 @@ class Dealer:
ins_tw.append(tks)
tksim = self.qryr.token_similarity(keywords, ins_tw)
vtsim,_ = rerank_mdl.similarity(" ".join(keywords), [rmSpace(" ".join(tks)) for tks in ins_tw])
vtsim,_ = rerank_mdl.similarity(query, [rmSpace(" ".join(tks)) for tks in ins_tw])
return tkweight*np.array(tksim) + vtweight*vtsim, tksim, vtsim