Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 200a632

Browse files
committed
FIX: Restore the accidentally deleted query prefix.
1 parent f5cf101 commit 200a632

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/embeddings/strategies/truncation.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def prepare_target_text(target, vdef)
2828
end
2929

3030
def prepare_query_text(text, vdef, asymetric: false)
31-
qtext = asymetric ? "#{vdef.asymmetric_query_prefix} #{text}" : text
31+
asymmetric_query_prefix = "Represent this sentence for searching relevant passages:"
32+
qtext = asymetric ? "#{asymmetric_query_prefix} #{text}" : text
3233
max_length = vdef.max_sequence_length - 2
3334

3435
vdef.tokenizer.truncate(text, max_length)

0 commit comments

Comments
 (0)