When should I use this instruction for RAG retrival tasks?

#11
by kk3dmax - opened

task = 'Given a web search query, retrieve relevant passages that answer the query'
when should I use this instruction for RAG retrival tasks, here are 3 options:
option 1 - use it only at buiding vector store stage;
option 2 - use it only at retrieve vector store stage;
option 3 - use it at both buiding and retrieval vector store stages.

Option 2. You use the prompt to help the model to better understand what you want to archive. In the example in the readme it used only for the query.

Owner

Yes, you only need to add instructions to the query side. The index building part does not need instruction, so the same index can be reused for different query purposes.

@intfloat Is there any benefit to using an instruction on the index to help adapt it to a specific use case?

@intfloat Is there any benefit to using an instruction on the index to help adapt it to a specific use case?

To adapt to a specific case, it is advised to add instructions on the query side. The model is not trained with instructions on the document side.

So if I just want to use this model to compare two sentences similarity, I should use it without instructions right?

Sign up or log in to comment