Skip to content
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

FR: Generate embeddings on demand #40

Closed
Mearman opened this issue Feb 12, 2023 · 3 comments
Closed

FR: Generate embeddings on demand #40

Mearman opened this issue Feb 12, 2023 · 3 comments

Comments

@Mearman
Copy link
Contributor

Mearman commented Feb 12, 2023

I must confess to being an NLP novice and not fully understanding the concept of embeddings yet. But would it be possible to only trigger generation of embeddings on a per file basis when that file is opened?

Somewhat related to:

@brianpetro
Copy link
Owner

Hi @Mearman and thanks for your willingness to contribute.

Unfortunately, this is already being done. When the file is opened, if the metadata suggests the file has changed, then it re-embeds that file.

It also makes sense to check for other file changes before generating the results to prevent returning stale results.

Since there is a cost for every embedding, the best way to make the Embeddings usage more efficient is to save them as long as possible. This means using multiple ways to detect changes so that minor changes are ignored.

And so far, it seems the biggest problem in efficiency is when the Embeddings fail to be saved at all, which turns into all Embeddings being generated every time they need to be used.

I should also mention that Embeddings are required for all files being included in the calculations. And since this app is designed to surface notes that you may have otherwise forgotten, it's important to embed all notes within relevant folders.

I hope that helps your understanding about how the Embeddings system works.

@felipemeres
Copy link

There is another Obsidian plugin that facilitates note classification using GPT: https://github.com/HyeonseoNam/auto-classifier
It would be great to have a similar feature implemented in Smart Connections so as not to have to reembed all of the notes.

@brianpetro
Copy link
Owner

@felipemeres thanks for sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants