Best Practices for Query/Passage Prefixes?
#29
by
timdim
- opened
Does anyone know if there's a specific query or passage prefix we should be using with the model in SentenceTransformer? The code exmaples imply that documents are encoded without a special prefix. How is it for queries?
There is and the code snippets for Transformers and vLLM have it, but not for sentence-transformers for some reason. The template is
Instruct: {instruct}
Query: {query}
where instruct is a task description, the readme gives an example "Given a web search query, retrieve relevant passages that answer the query".
The code is given as the function get_detailed_instruct
in the readme.