mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-15 09:15:54 +08:00
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:
parent
0dafce31c4
commit
0f08b0f053
@ -250,7 +250,7 @@ class Dealer:
|
|||||||
content_ltks = sres.field[i][cfield].split()
|
content_ltks = sres.field[i][cfield].split()
|
||||||
title_tks = [t for t in sres.field[i].get("title_tks", "").split() if t]
|
title_tks = [t for t in sres.field[i].get("title_tks", "").split() if t]
|
||||||
important_kwd = sres.field[i].get("important_kwd", [])
|
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)
|
ins_tw.append(tks)
|
||||||
|
|
||||||
sim, tksim, vtsim = self.qryr.hybrid_similarity(sres.query_vector,
|
sim, tksim, vtsim = self.qryr.hybrid_similarity(sres.query_vector,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user