[SERVER-82866] Some vector values are getting rounded to the nearest int, causing a BSON type error at $vectorSearch query time Created: 30/Oct/23 Updated: 22/Nov/23 |
|
| Status: | Needs Verification |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Henry Weller | Assignee: | Henry Weller |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | internal-user | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Assigned Teams: |
Server Triage
|
| Participants: |
| Description |
| Comments |
| Comment by Paul Done [ 22/Nov/23 ] | ||
|
Reproducer provided | ||
| Comment by Henry Weller [ 20/Nov/23 ] | ||
|
Reassigning to Paul Done to provide more details on how he was able to produce this for the sake of those following this ticket | ||
| Comment by Paul Done [ 15/Nov/23 ] | ||
|
henry.weller@mongodb.com thoughts on this? ^ | ||
| Comment by Paul Done [ 02/Nov/23 ] | ||
|
henry.weller@mongodb.com this will be a problem for our users of $vectorSearch because when they receive the embeddings from the LLM for their "query string" they will have to write code that walks all 1536 elements in the array and BSON-ifies each number to BSON Doubles. This seems alike a BIG problem for our Vector Search story. | ||
| Comment by Durran Jordan [ 31/Oct/23 ] | ||
|
Hi henry.weller@mongodb.com. The Node driver does not perform any special conversion of values for specific aggregation stages, so the application must force the correct types. -1, 0, 1 will always be assumed to be int32 so the app must force doubles by making them floating point numbers or specifically using the Double constructor. Example:
| ||
| Comment by PM Bot [ 30/Oct/23 ] | ||
|
Hi henry.weller@mongodb.com, thank you for submitting this ticket! The team is going to investigate and reply back with more info after the investigation is completed. |