Adding query prompt when using with sentence-transformers
#17
by
Reggie
- opened
Hi,
I'm trying to use the model with Sentence Transformers, and was wondering how the query prompt can be added for certain embeds?
model.encode(Prompts.C.format(text='some text'))
Just to confirm, the above will essentially convert my query into this: Represent this sentence for searching relevant passages: some text
Is my understanding right?
hi @Reggie , maybe you can manually set the prompts like
from angle_emb import Prompts model.encode(Prompts.C.format(text))
Sorry, I made a mistake. It should be Prompts.C.format(text=query)