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

Rebuilding Embeddings #17

Closed
converseKarl opened this issue Apr 19, 2024 · 3 comments
Closed

Rebuilding Embeddings #17

converseKarl opened this issue Apr 19, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@converseKarl
Copy link

If I want to clear out everything and rebuild all the embeddings what is the best approach?

For example a website may change over time and you may want to clear out the website embeddings or the entire thing and rebuild it weekly, monthly etc

@adhityan
Copy link
Collaborator

Hello, you can do that with the following methods available within RAGApplication

  1. deleteEmbeddingsFromLoader(uniqueLoaderId, true) - this can be used to remove the embeddings from a single loader
  2. deleteAllEmbeddings(true) - this will remove all the embeddings from all loaders

The parameter true is constant and is used to ensure you really mean to delete the embeddings. Not passing it or passing false would print a console warning without deleting the embeddings.

Hope this helps.

@converseKarl
Copy link
Author

converseKarl commented Apr 22, 2024

is there anyway to add a webload (url dynamically) incrementally whilst keeping existing loadings, and update the build? something along these lines?

    await ragApplication
        .setTemperature(0)
        .addLoader(new WebLoader({ url: url })) // Use the extracted URL
        .setVectorDb(new LanceDb({ path: './db' }))
        .build();

@adhityan
Copy link
Collaborator

Yes. Once you get an instance of ragapplcation, you can call the addLoader method on it at any time to add a new loader. In fact, I would recommend you add all loaders dynamically after build.

@adhityan adhityan added the question Further information is requested label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants