-
-
Notifications
You must be signed in to change notification settings - Fork 353
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
Duplicate the --save feature from openai-to-sqlite similar #230
Comments
The CREATE TABLE [similarities] (
[id] TEXT,
[other_id] TEXT,
[score] FLOAT,
PRIMARY KEY ([id], [other_id])
); For |
Maybe similarity score functions should be provided by plugins, and stored in a The same mechanism could work for chunking functions too, see: |
Since I have a migrations system in place I can ignore that idea for the moment and add it in the future if appropriate. |
I'm going to implement |
I need to land this first, since it has a migration in already: |
The migration for this will be: @embeddings_migrations()
def m006_similarities(db):
db["similarities"].create({
"collection_id": int,
"id": str,
"other_id": str,
"score": float,
}, pk=("collection_id", "id", "other_id")) |
The compound primary keys make this a bit harder, since |
This was getting a bit fiddly. decided to drop it from 0.10. |
https://github.com/simonw/openai-to-sqlite/blob/361d98a7f260a1420e6e698481f298848b922253/README.md#saving-similarity-calculations-to-the-database
This is the feature that can be used to save calculated similarity scores to the database. I use it to serve related TILs on my TILs site: https://til.simonwillison.net/llms/openai-embeddings-related-content
And this feature too:
The text was updated successfully, but these errors were encountered: