mirror of
				https://github.com/infiniflow/ragflow.git
				synced 2025-11-04 11:49:37 +00:00 
			
		
		
		
	refine using rerank model (#2553)
### What problem does this PR solve? #2552 ### Type of change - [x] Performance Improvement
This commit is contained in:
		
							parent
							
								
									d9c2a128a5
								
							
						
					
					
						commit
						ecf441c830
					
				@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user