Add VSIM neighbours feature to Workbench - #3929
Conversation
Opening an element of a vector set showed its embedding and its attributes — the two things Redis Insight shows — and stopped there. The question a vector set exists to answer is which elements are near this one, and answering it meant leaving the browser to type VSIM by hand. So the element view ends with Nearest: VSIM ELE <element> WITHSCORES, one bar per result in the order the server ranked them. A score runs 1 (identical) to 0 (opposite), so it is already the share of the track and the list needs no axis. The element itself comes back first, scored 1 and marked "this one" — it anchors the scale and says why it is there. Clicking a neighbour opens it and asks again, which is how a reader actually explores an embedding space: hop from a point to its neighbour and see what that one is near. Two controls, both arguments of VSIM a reader would change by hand: how many to return (5/10/25 — one more is asked for, since the element itself takes a place) and a FILTER expression. The filter is the one part of a vector set whose effect cannot be seen from a reply, and a bad expression shows the server's error rather than an empty list. The command is in the READ WITH line with the others, so a reader can take it away. Verified against a live sandbox with three 2-d vectors: the near element outranks the opposite one, the opposite one scores 0, a filter on attributes cuts the list to what matches, a broken filter reports the error, walking to a neighbour re-asks from there, and the count chips change the COUNT in the command that runs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The 5/10/25 chips borrow .rwb-chip from the KEYS heading, where it holds a word and is padded for one. With a digit in it the number sat off centre and each chip came out a different width. One fixed size, no padding, centred on both axes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Enter re-rendered the pane, so the box the reader had just typed into was gone and the caret went with it — the same thing the JSONPath box did before DOC-7028. The reply now puts the caret back where it was. The × appears only while a filter is in force and drops it in one click, the way emptying the box by hand and pressing Enter does in two. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
🧠 Redis MemoryFound 10 related items from repository history (5 new this commit):
Memory updated at fdbe872 |
A filter can leave the element itself out of its own VSIM reply — failing the expression, or having no attributes at all, is enough. The command asks for one more than the chip on the assumption that first row is the element, so without it the list showed one neighbour more than was asked for. Trimmed when the element is absent. A count chip only wrote the count, so the pane it rebuilt filled the filter box from the last submitted filter and dropped whatever had been typed since. The chip now searches with the box as it stands, which is what Search does. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fdbe872. Configure here.
| dock.vsimOptions = function () { | ||
| if (!this.vsim) this.vsim = { count: VSIM_COUNTS[0], filter: '' }; | ||
| return this.vsim; | ||
| }; |
There was a problem hiding this comment.
Search state leaks across keys
Medium Severity
vsimOptions keeps count and filter on the dock with no key. Opening another vector set still runs VSIM with the previous FILTER, so a leftover expression such as .year > 2000 can hide every neighbour on an unrelated set.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fdbe872. Configure here.


Note
Low Risk
Workbench-only UI that adds one batched Redis command per element view; no auth, data model, or backend changes.
Overview
When you open a vector-set element in the Workbench, the value pane now loads nearest neighbours via
VSIM(alongside the existingVEMB/VGETATTRreads) and shows them as a bar chart with similarity scores.Readers can change how many neighbours to fetch (5 / 10 / 25), run an optional attribute filter expression, clear the filter, and click a neighbour to drill into that element while keeping count and filter on the dock. VSIM options persist across re-renders and keyspace sweeps. Errors and empty filter results get explicit messaging; new CSS covers the controls, bars, and failed-read styling.
Reviewed by Cursor Bugbot for commit fdbe872. Bugbot is set up for automated code reviews on this repo. Configure here.