The Logic Behind Checking The Type of The First Element only in the embedding_retrieval Function in the InMemoryDocumentStore
#10076
TaMaN2031A
started this conversation in
General
Replies: 1 comment 1 reply
-
|
My impression is that this a trade-off: it quickly checks the type without scanning the whole vector. I also checked other document stores in https://github.com/deepset-ai/haystack-core-integrations and most of them don't perform this check at all: they just let type errors surface later. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Whenever you have time, I have a small question regarding the type checking in the
embedding_retrievalFunction in theInMemoryDocumentStore.Here is the code snippet:
If we are interested in making sure that the
query_embeddinglist is float from start to end, why are we checking the type of the first element only?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions