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] RAG and Ollama embedding model #30

Open
wwjCMP opened this issue Apr 29, 2024 · 4 comments
Open

[FR] RAG and Ollama embedding model #30

wwjCMP opened this issue Apr 29, 2024 · 4 comments

Comments

@wwjCMP
Copy link

wwjCMP commented Apr 29, 2024

Now using the Ollama embedding model to implement RAG in the Obsidian plugin has become quite common. I wonder if this plugin will be extended in this aspect next.

@cephalization
Copy link
Member

I am not familiar, do you have any references?

@blindmansion
Copy link
Member

Yep embeddings are something we've been thinking about implementing soon as well. We may even piggyback off of the smart connections embeddings, as they enable other plugins to use the ones it creates for a vault.

Still thinking about how to implement them in a way that makes sense for cannoli.

@oyajiru
Copy link

oyajiru commented Nov 1, 2024

I'm not a developer, but I love using Cannoli for AI-powered workflows in Obsidian, and I am very interested in this to enhance drafting research papers and fiction.

Would it be possible to integrate a lightweight vector database like Milvus Lite into Cannoli to create on-the-fly Retrieval-Augmented Generation (RAG) databases for each workflow? This could allow users to bypass token limits and use larger language models on consumer hardware by limiting their token contexts to fit within system memory. I believe this could also help limit hallucinations.

The idea is:

  1. On-the-fly RAG databases using Milvus Lite:
    Would it be possible to integrate a lightweight vector database like Milvus Lite into Cannoli to create on-the-fly Retrieval-Augmented Generation (RAG) databases for each workflow? This could allow users to bypass token limits and use larger language models on consumer hardware, even with lower token contexts.

  2. Advanced data management features:
    a. Selective data removal: Implement a feature to remove specific obsolete information, possibly by "reversing the arrows" from the knowledge input node to the one representing the database.
    b. Information editing: Allow users to edit existing information by adding it to the reference node, updating the vector representations whenever the content of a knowledge node is changed.

Benefits:

  • Enables use of larger, more capable models without requiring extensive hardware resources.
  • Allows for more dynamic and contextually rich interactions within Cannoli workflows.
  • Provides users with greater control over their knowledge base, allowing for data refinement and updates. All within the canvas.

Implementation considerations:

  1. I believe Milvus Lite supports complex delete expressions, which could be leveraged for selective data removal.
  2. The Python client for Milvus allows for data insertion, updating, and deletion, which could be used to implement the editing feature.

What are your thoughts on this? Would this be feasible to implement, and do you see any potential challenges or alternative approaches?

Thank you for considering these suggestions and for your fantastic work on Cannoli!

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

4 participants