feat: split structural neighbors vs profile-based substitutes - #222
Merged
Merged
Conversation
Two distinct nearest-neighbor searches, previously conflated under 'substitutes': - Structural neighbors (/api/neighbors) — Tanimoto over Morgan fingerprints. The look-alikes. - Substitutes (/api/substitutes) — NEW: cosine over predicted 6 taste + 164 aroma head scores. A molecule that tastes and smells like the target is the real drop-in swap regardless of structure. Vanillin -> ethyl vanillin #1 (0.94), then isovanillin, coniferaldehyde. Widen the reference set from 3,845 taste-labelled molecules to the full ~8.8k universe so any molecule can surface (ethyl vanillin wasn't a candidate before). The 170-head profile matrix is precomputed by build_profile_index.py -> profile_index.npz (gitignored) for instant startup. Surfaces synced: workbench two sections; MCP find_structural_neighbors + find_substitutes; skill; README. 22 unit tests pass. Closes #213. Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.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 #213. Substitutes rank by taste+aroma profile (vanillin → ethyl vanillin #1); structural neighbors rank by Tanimoto. Reference set widened to the full ~8.8k universe (ethyl vanillin wasn't a candidate before). 170-head profile matrix precomputed →
profile_index.npz(gitignored). Surfaces synced (workbench/MCP/skill/README). 22 unit tests pass.