Post

Has anybody in my network set up local notes (Markdown files) with an Ollama RAG/model trained on such notes? So far, below is the best shot I found. I want to play around over Christmas break and wonder about the best approaches. I collect some ideas here: www.ssp.sh/brain/second.... #obsidian

Have you looked at github.com/your-papa/ob...? It looks most what I want right now. But I'm unsure about my Zettelkasten as the note says: "Quality depends on knowledge structure and organization? I'm in the same boat as Joseph, I want a local model/RAG trained on my 7k notes.

0 reposts3 likes

Do you want an Obsidian Integration or how you want to trigger it? I set one up locally pulling in from Notion, with a custom frontend, and a Lance vectordb in the backend.

I don't mind the interface; it can be a CLI or a script. No need for a UI, the content and quality of responses matter more. How did your backend "learn" or connect based on your notion pulled data? Does Lance have a custom search/algorithm you use? Or do you add additional steps?

I use hybrid search + a reranker on top of Lance. Did some light relevant engineering and do a weighting based on the different fields (e.g. title, body, headings in the page). I did not do any query understanding because I know how to write my queries to have a good retrieval score.

My move is that I open the vault as the project folder in VSCode, and then Continue has one button to “embed codebase”, takes a few seconds, and then it’s done. I found that it’s good at finding relevant notes, but only 4-6 at a time contd

So if you ask about a topic, it’ll give you replies based on the few most relevant notes, but it’ll ignore trace mentions of the topic elsewhere. This might not be an issue if your notes are topical (like zettelkasten or so), but might hurt it it’s more free-flow braindumps

Yes, I have tried it with Flowise as well as building it from scratch using Python, Ollama and LangChain. I loaded the documents to the vector store separately and then used them in my inferencing. If you know the structure of your markdown, you can use it to better guide the chunking process.

awesome! Wdyt, to what size or amount of notes does RAG work, and when does "training" a model make more sense? I wonder as I have 7k+ notes with huge notes, that RAG might not be enough, but I'm not experienced in it, so I do not know.

Storing vector embeddings is like storing records in a database and the number of your notes will not matter. However, it does take time to vectorize it and load them into the database. Having a fast GPU or lot of CPU will help! Fine tuning is not required in these cases. RAG must be sufficient.