You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate a scope in latentscope 0.3.0 using open-ai-text-embedding-3-small model, but don't use the default feature size of 1536, change it to something smaller 768.
Visit the /datasets/<DATASET_NAME>/explore/<SCOPE_NAME> route , and use the "nearest neighbor search" feature
Submitting terms in the search box has no effect. Upon checking server logs, you'll have a message like this
Bug explanation
I think the error message demonstrates why the button has no effect . The search term was embedded with the default model size of 1536 instead of with the size of the embeddings it'll be matched against
For nearest neighbors search to work, the query term's vector has to match the size of the embeddings for this scope
Possible fixes
Have the frontend pass updated dimensions through to the dimensions GET parameter, vs
The frontend shouldn't worry about this, the dimensions should be set based on the size of the features in the loaded model . In that case dimensions could be completely removed from the server's URL params since as far as I can see, the frontend does not send dimensions as a query parameter.
thanks for the detailed bug report, this does make sense and should be accounted for.
We track the dimensions for the embedding in the scope.json ( along with all the other metadata from the process) so I think it would be fine for the front end to call the nearest neighbor endpoint with the dims. The API needs to be updated to then pass the dimensions to the model. The providers that support matroyshka take it as a parameter to embed.
Bug reproduction steps
open-ai-text-embedding-3-small
model, but don't use the default feature size of1536
, change it to something smaller768
./datasets/<DATASET_NAME>/explore/<SCOPE_NAME>
route , and use the "nearest neighbor search" featureBug explanation
I think the error message demonstrates why the button has no effect . The search term was embedded with the default model size of
1536
instead of with the size of the embeddings it'll be matched againstlatent-scope/latentscope/server/search.py
Line 62 in b07a27b
For nearest neighbors search to work, the query term's vector has to match the size of the embeddings for this scope
Possible fixes
dimensions
as a query parameter.latent-scope/web/src/pages/Explore.jsx
Line 359 in b07a27b
The text was updated successfully, but these errors were encountered: