Query instruction for instruct embedding model


I’m using Weaviate with integrated ollama embedding. The model that I use is BAAI/bge-reranker-large-en-v1.5.

According to HuggingFace page:

If you need to search the relevant passages to a query, we suggest to add the instruction to the query; in other cases, no instruction is needed, just use the original query directly. In all cases, no instruction needs to be added to passages.

So I decided to use this query instruction followed by my initial query but I was wondering if Weaviate already do that internally ? If not, could be a nice option to add !


1 Like

hi @switch !!

I have checked, and we do not have this feature. Yet.

I believe that the best route here is to create a feature request by opening an issue in our GH repo:

So we can lobby it into our roadmap

For now, you will need to vectorize your objects yourself and prepend the instruction :grimacing:

What do you think on how this feature would be? Maybe adding a default instruction to the collection vectorizer?

Additionally, or alternatively, maybe pointing a property to be used as instruction, and this property would be concatenated first?

Thanks for pointing this out!