Repository navigation
Docs: native find_nearest sends the query as one float32 buffer (#203) - #250
Merged
Merged
Conversation
Describe the #203 behavior where users read about find_nearest: a paragraph and the A/B table in vectors.adoc (figures copied by script from the study's score file, p50 B/A with 95% intervals), a pointer from the statement-only "A query vector" section, and the query_vector Args text of find_nearest. The find_nearest_approximate Args stay as they are: its native path (_run_approximate) does not use the float32 buffer. The which-package vector-search medians predate #203, so they are labelled as measured before it instead of being replaced by numbers that were not re-measured. The sentence with the find_nearest signature is untouched so the include_vector change (#204) rebases cleanly. Closes #249 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #249
Documents what #203 changed: on the native package
VectorIndex.find_nearestsends the query vector as onefloat32buffer whatever its form (list,float64array,float32array).how-to/vectors.adoc: a paragraph after thefind_nearestsignature sentence and a table of median latency, with the change over without it (95% interval). Measured on the native wheel26.11.1.dev0on one Linux x86_64 laptop, 11 to 12 clean pairs per figure, the wheel built before the change as the baseline. At 1536 dimensions afloat32array is 0.951 [0.945, 0.954], afloat64array 0.616 [0.614, 0.621] and a list of Python floats 0.631 [0.627, 0.635]; at 256 dimensions 0.952 [0.942, 0.96], 0.777 [0.774, 0.781] and 0.792 [0.787, 0.798]. ThevectorNeighborsstatement path did not change (1.003 [0.995, 1.014] and 1.004 [0.991, 1.006]). The figures were copied from the study's score file by script. The section also gets an explicit[[find-nearest]]anchor.how-to/databases-and-queries.adoc: the "A query vector" section says it is about statements and links to thefind_nearestsection. Thefloat32advice for statements stays.src/arcadedb/vector.py: thefind_nearestquery_vectorArgs line says the native build converts any of the forms to onefloat32buffer.find_nearest_approximateis left alone because its native path does not use the buffer.which-package.adoc: the native-versus-JVM query medians are kept and labelled as measured before Native find_nearest: send the query vector as one float32 array, not a Python list #203. They were not re-measured, so there are no new numbers there.The sentence with the
find_nearestsignature is untouched, so theinclude_vectorPR (#204) can rebase on this one. Checks run:compileandpyflakesonvector.py,pre-commiton the changed files, nopip installor em dash in the diff, and the newfind-nearestanchor exists. Not run on this machine: the Antora docs build (thedocs.ymlcheck does that) and the test suite.🤖 Generated with Claude Code