Kevin Hu
commited on
Commit
·
8f62ce9
1
Parent(s):
4e17625
Weight up title and keywords for chunks in terms of retrieval (#3750)
Browse files### What problem does this PR solve?
### Type of change
- [x] Performance Improvement
- rag/nlp/search.py +1 -1
rag/nlp/search.py
CHANGED
@@ -250,7 +250,7 @@ class Dealer:
|
|
250 |
content_ltks = sres.field[i][cfield].split()
|
251 |
title_tks = [t for t in sres.field[i].get("title_tks", "").split() if t]
|
252 |
important_kwd = sres.field[i].get("important_kwd", [])
|
253 |
-
tks = content_ltks + title_tks + important_kwd
|
254 |
ins_tw.append(tks)
|
255 |
|
256 |
sim, tksim, vtsim = self.qryr.hybrid_similarity(sres.query_vector,
|
|
|
250 |
content_ltks = sres.field[i][cfield].split()
|
251 |
title_tks = [t for t in sres.field[i].get("title_tks", "").split() if t]
|
252 |
important_kwd = sres.field[i].get("important_kwd", [])
|
253 |
+
tks = content_ltks + title_tks*2 + important_kwd*5
|
254 |
ins_tw.append(tks)
|
255 |
|
256 |
sim, tksim, vtsim = self.qryr.hybrid_similarity(sres.query_vector,
|