-
Notifications
You must be signed in to change notification settings - Fork 0
Add Linear Projection adapter layer for feedback-driven query vector transformation #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feedback-loop
Are you sure you want to change the base?
Conversation
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
…ithout punctuation Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
…reservation Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
…-chunking-class Add semantic chunking strategy using embedding similarity with sliding window
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
|
@copilot I have updated some code, take a pull and update the adapter service to store the model in local file by default and only use mongo if flag is enabled. |
…when ADAPTER_USE_MONGO=true Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
…logging Co-authored-by: ankit-programmer <36553178+ankit-programmer@users.noreply.github.com>
Updated the adapter service to use local file storage by default. MongoDB storage is now only used when |
Implements a learnable adapter layer that transforms query vectors to better match relevant chunk vectors based on user feedback. The adapter is a single dense layer initialized as identity matrix, trained via MSE loss when users upvote search results.
Core Components
src/models/adapter.ts- MongoDB schema for persisting adapter weights per collectionsrc/service/adapter.ts- TensorFlow.js linear projection with:ADAPTER_USE_MONGO=true)Integration Points
retrievePoints()for fetching vectors by IDUsage Flow
Configuration
ADAPTER_USE_MONGOfalsetrueto use MongoDB for model storageADAPTER_STORAGE_PATH./adapter_modelsDependencies
@tensorflow/tfjs@4.22.0(no known vulnerabilities)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.