Replies: 1 comment
-
Hey @greghobby yes, we thought about this a lot and discussed it in the team when developing Haystack 2.0. In a nutshell, the reason is that Haystack 1 used the retriever in indexing pipelines or whenever embeddings were created for documents: |
Beta Was this translation helpful? Give feedback.
-
I have used < v2 quite a bit in professional projects and am now just starting to get into v2.0.
In the very first tutorial, 2 separate embeddings objects are created: one for the documents as they are indexed (doc_embedder) and one for the query (text_embedder). In the tutorial, these two objects are created with the same model . There is a comment that says you need to use the same model for each variable. This makes 100% sense to me, you need to have the same embeddings to compare against when doing the retrieving.
So why then are 2 objects created? I would intuitively expect to have only one object and to reuse it for both tasks to cut down on the possibility of making a needless mistake by having mismatched embeddings.
Beta Was this translation helpful? Give feedback.
All reactions