Weight up title and keywords for chunks in terms of retrieval (#3750)

### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
This commit is contained in:
Kevin Hu 2024-11-29 16:39:55 +08:00 committed by GitHub
parent 0dafce31c4
commit 0f08b0f053
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -250,7 +250,7 @@ class Dealer:
content_ltks = sres.field[i][cfield].split()
title_tks = [t for t in sres.field[i].get("title_tks", "").split() if t]
important_kwd = sres.field[i].get("important_kwd", [])
tks = content_ltks + title_tks + important_kwd
tks = content_ltks + title_tks*2 + important_kwd*5
ins_tw.append(tks)
sim, tksim, vtsim = self.qryr.hybrid_similarity(sres.query_vector,