Show HN: Reor – An AI note-taking app that runs models locally
411 points| samlhuillier | 2 years ago |github.com
The four main things to know are:
1. Notes are connected automatically with vector search. You can do semantic search + related notes are automatically connected.
2. You can do RAG Q&A on your notes using the local LLM of your choice.
3. Embedding model, LLM, vector db and files are all run or stored locally.
4. Point it to a directory of markdown files (like an Obsidian vault) and it works seamlessly alongside Obsidian.
Under the hood, Reor uses Llama.cpp (node-llama-cpp integration), Transformers.js and Lancedb to power the local AI features.
Reor was built right from the start to support local models. The future of knowledge management involves using lots of AI to organize pieces of knowledge - but crucially, that AI should run as much as possible privately & locally.
It's available for Mac, Windows & Linux on the project Github: https://github.com/reorproject/reor
kepano|2 years ago
Ringz|2 years ago
michaelmior|2 years ago
toddmorey|2 years ago
pipnonsense|2 years ago
As a side-effect, I just noticed that I prefer a long markdown file with proper headings (and an outline on the side) than Milanote's board view, which initially felt like a more free form better suited for unorganized thoughts and ideas for writing that I had (I use it for my fiction writing).
I still can have documents as a list of loose thoughts, but once I am ready to organize my ideas, I just use well written and organized headers, edit the content and now I have a really useful view of my idea.
snthpy|2 years ago
pokstad|2 years ago
xenodium|2 years ago
https://xenodium.com/an-ios-journaling-app-powered-by-org-pl...
samlhuillier|2 years ago
toddmorey|2 years ago
Just wanted to say thank you so much for this perspective and fighting the good fight.
samlhuillier|2 years ago
humbleferret|2 years ago
I played around with this on a couple of small knowledge bases using an open Hermes model I had downloaded. The “related notes” feature didn't provide much value in my experience, often the link was so weak it was nonsensical. The Q&A mode was surprisingly helpful for querying notes and providing overviews, but asking anything specific typically just resulted in less than helpful or false answers. I'm sure this could be improved with a better model etc.
As a concept, I strongly support the development of private, locally-run knowledge management tools. Ideally, these solutions should prioritise user data privacy and interoperability, allowing users to easily export and migrate their notes if a new service better fits their needs. Or better yet, be completely local, but have functionality for 'plugins' so a user can import their own models or combine plugins. A bit like how Obsidian[1] allows for user created plugins to enable similar functionality to Reor, such as the Obsidan-LLM[2] plugin.
[1] https://obsidian.md/ [2] https://github.com/zatevakhin/obsidian-local-llm
dax_|2 years ago
samlhuillier|2 years ago
Working hard on improving the chunking to improve related notes section. RAG is fairly naive right now, with lots of improvements coming in the next few weeks.
ilaksh|2 years ago
mcbetz|2 years ago
If you are using Obsidian, Smart Connections in v2 (1) does also support local embeddings and shows related notes based on semantic similarity.
It's not super great on bi/multi-lingual vaults (DE + EN in my case), but it's improving rapidly and might soon support embedding models that cater for these cases as well.
(1) https://github.com/brianpetro/obsidian-smart-connections
fastball|2 years ago
I think "here be dragons", and that over-relying on AI to do all your organization for you will very possibly (probably?) cause you to become worse at thinking.
No data to back this up because it is still early days in the proliferation of such tools, but historically making learning and thinking and "knowledge management" more passive does not improve outcomes.
bhpm|2 years ago
Socrates said exactly this.
But when they came to writing, Theuth said: “O King, here is something that, once learned, will make the Egyptians wiser and will improve their memory; I have discovered a potion for memory and for wisdom.” Thamus, however, replied: “O most expert Theuth, one man can give birth to the elements of an art, but only another can judge how they can benefit or harm those who will use them. And now, since you are the father of writing, your affection for it has made you describe its effects as the opposite of what they really are. In fact, it will introduce forgetfulness into the soul of those who learn it: they will not practice using their memory because they will put their trust in writing, which is external and depends on signs that belong to others, instead of trying to remember from the inside, completely on their own. You have not discovered a potion for remembering, but for reminding; you provide your students with the appearance of wisdom, not with its reality. Your invention will enable them to hear many things without being properly taught, and they will imagine that they have come to know much while for the most part they will know nothing. And they will be difficult to get along with, since they will merely appear to be wise instead of really being so.”
GTP|2 years ago
samlhuillier|2 years ago
In some cases, hard thinking and searching for things manually can really enhance understanding and build your knowledge.
In other cases, particularly when ideating for example, you want to be given "inspiration" from other related ideas to build upon other ideas you've had previously.
I think it's a mix of both - reaching for AI as and when when you need it - but avoiding it intentionally at times as well.
hgomersall|2 years ago
ParetoOptimal|2 years ago
CrypticShift|2 years ago
- Create multiple independent "vaults" (like obsidian).
- Append links to related notes, so you can use (Obsidian's) graph view to map the AI connections.
- "Minimize" the UI to just the chat window.
- Read other formats (mainly pdfs).
- Integrate with browser history/bookmarks (maybe just a script to manually import them as markdown ?)
Thanks for Reor !
samlhuillier|2 years ago
- Multiple vaults is in fact in a PR right now: https://github.com/reorproject/reor/pull/28
- Manual linking is coming.
- Minimizing the UI to chat is interesting. Right now I guess you can drag chat to cover anything - but yes perhaps a toggle between two modes could be interesting.
- Read other formats also something in the pipeline. Just need to sort out the editor itself to support something like this. Perhaps pdfs would just be embedded into the vector db but not accessible to the editor.
- Integrating with browser history and bookmarks is a big feature. Things like web clipping and bringing in context from different places are interesting...
zarathustreal|2 years ago
haswell|2 years ago
Excited to see something already far more realized, and I’m looking forward to trying this out.
I’ve been working on a larger than small writing project using Obsidian, and my ultimate goal is to have conversations with the corpus of what I’ve written, and to use this to hone ideas and experiment with new ways of exploring the content.
Not sure if local LLMs are powerful enough yet to enable meaningful/reliable outcomes, but this is the kind of stuff that really excites me about the future of this tech.
sofixa|2 years ago
https://github.com/zatevakhin/obsidian-local-llm
https://github.com/hinterdupfinger/obsidian-ollama
Which already exist and if nothing else are decent starting points.
> Not sure if local LLMs are powerful enough yet to enable meaningful/reliable outcomes
I've dabbled, briefly, with Ollama running Mistral locally on an M1 MacBook Pro with 32GB of unified memory, and throwing a couple of hundred markdown documents at it via a RAG resulted in quite decent output to prompts asking questions about abstract contents/summariesbbased on those docs.
So I'd say we're already at a point where you can have meaningful outcomes; reliability is a whole other issue though.
wbogusz|2 years ago
Always see parallels drawn between Obsidian note structures and whole “2nd brain” idea for personal knowledge management, had seemed like a natural next step would be to implement note retrieval for intelligent references. Will have to check this out
davidy123|2 years ago
samlhuillier|2 years ago
jddj|2 years ago
nerdjon|2 years ago
I just downloaded this, I realize that it is still a new tool. But I think a critical feature needs to be context. The ability to have completely separate contexts of notes, maybe even completely different databases.
That way similar sounding to an LLM but contextually different don't get brought up. I figured that is what "new directory" did but it does not appear that way.
So is there any plans to implement a switcher for database? I can't find a way to change where it is right now.
But doing some quick tests importing some notes in it does seem very promising and I really like where you are taking it. It is just confusing notes that should be in distinct contexts.
Edit: I see this is already in PR! Awesome.
outside1234|2 years ago
I downloaded:
mistral-7b-v0.1.Q4_K_M.gguf Q4_K_M 4bits 4.37 GB 6.87 GB medium, balanced quality - recommended
Was that a good choice?
stuartriffle|2 years ago
https://openrouter.ai/rankings
elcombato|2 years ago
syncbehind|2 years ago
nerdyadventurer|2 years ago
bemusedthrow75|2 years ago
My main challenge with my notes (that I've been collecting for about 15 years) is remembering to consult them before I google.
I suppose a unified interface to both my notes via LLM and internet search would help, but then I get that with my Apple Notes and the Mac's systemwide search, if I remember to use it.
traverseda|2 years ago
But yes, a good application is probably a ways away. Still, LLM vector embedding make a good search engine pretty easy to implement, especially if you're working with small sets of well curated data where exact keyword matching might not work great.
Like if you search for "happy" you could get your happiest journal entries, even if none of them explicitly mention the word happy.
dev_tty01|2 years ago
rcarmo|2 years ago
Surprisingly, indexing sort of worked. But since I have an index.md per folder (so that media is grouped with text for every note) the editor is confused, and clicking on links always took me to a blank screen.
Also, pretty much every question gives an error message that says "Error: The default context shift strategy did not return a history that fits the context size", likely because there is too much context...
Edit: Fixed most of it by using a mistral instruct model. But the editor does not know what front matter is (neither in editing nor in previews, where front matter looks like huge heading blocks)
rcarmo|2 years ago
dvorka|2 years ago
I have been working on my note-taking application (https://github.com/dvorka/mindforger) for some time and wanted to go in the same direction. However, I gave up (for now). I used ggerganov/llama.cpp to host LLM models locally on a CPU-only machine with 32GB RAM, and used them for both RAG and note-taking use cases (like https://www.mindforger.com/index-200.html#llm). However, it did not work well for me - the performance was poor (high hardware utilization, long response times, failures, and crashes) and the actual responses were rarely useful (off-topic and impractical responses, hallucinations). I tried llama-2 7B with 4b quantization and a couple of similar models. Although I'm not happy about it, I switched to an online commercial LLM because it performs really well in terms of response quality, speed, and affordability. I frequently use the integrated LLM in my note-taking app as it can be used for many things.
Anyway, Reor "only" uses the locally hosted LLM in the generation phase of the RAG, which is a nicely constraint use case. I believe that a really lightweight LLM - I'm thinking about a tiny base model fine-tuned for summarization - could be the way to go (fast, non-hallucinating). I'm really curious to know if you have any suggestions or if you will have any in the future!
As for the vector DB, considering the resource-related problems I mentioned earlier, I was thinking about something similar to facebookresearch/faiss, which, unlike LanceDB, is not a fully-fledged vector DB. Have you made any experiments with similarity search projects or vector DBs? I would be interested in the trade-offs similar to small/large/hosted LLMs.
Overall, I think that both RAG with my personal notes as a corpus and a locally hosted generic purpose LLM for the use cases I mentioned above can take personal note-taking apps to a new level. This is the way! ;)
Good luck with your project!
SamBam|2 years ago
Just wondering what the interaction might be for someone who uses Obsidian but might turn to this occasionally.
samlhuillier|2 years ago
In short, yes it'd work seamlessly if you wanted to use it occasionally.
kingkongjaffa|2 years ago
I tried llama-2-7b-chat.Q4_K_M.gguf and phi-2.Q4_K_M.gguf and neither showed any knowledge of the notes I added to the folder.
Does anyone know of a good way to test if it's working (a prompt?) and does anyone know of other projects like this?
dkarras|2 years ago
samlhuillier|2 years ago
1. The libraries I used to run models locally didn't work inside a plugin.
2. I believe AI is a fairly big paradigm shift that requires new software.
cfcfcf|2 years ago
yosito|2 years ago
unknown|2 years ago
[deleted]
2024throwaway|2 years ago
raxxorraxor|2 years ago
I run codelama:7b on a MacBook air, and even auto complete is partially usable.
tarruda|2 years ago
erickf1|2 years ago
gavmor|2 years ago
samlhuillier|2 years ago
calebdre|2 years ago
Would you mind a pull request that spruces up the design a bit?
samlhuillier|2 years ago
mrtesthah|2 years ago
samlhuillier|2 years ago
poulpy123|2 years ago
nextaccountic|2 years ago
samlhuillier|2 years ago
sigmonsays|2 years ago
i would call it bad note taking to not be able to recall an answer you put into your notes.
I like the idea of something like this but i've struggled to find a real use case.
PeterisP|2 years ago
It is probably relevant to note that I have more than a decade of notes, and more than half of them are not written by me but are excerpts from various relevant resources, scientific papers, etc; so there are cases where, for example, I know that many years ago I had seen an interesting application of method X and should have in my notes, but I don't necessarily remember the exact keywords how it was discussed back then.
infectoid|2 years ago
I’m one of them.
This tool might actually make me take better notes.
Maybe.
donclark|2 years ago
samlhuillier|2 years ago
lenerdenator|2 years ago
alsetmusic|2 years ago
frankcort|2 years ago
clscott|2 years ago
https://help.obsidian.md/import/onenote
samlhuillier|2 years ago
donclark|2 years ago
PeterisP|2 years ago
Or don't do this at all, and rely on cloud models like most other solutions - running things locally has some benefits for privacy, control and perhaps cost, but you can get all of the same functionality without a local model.
dkwsupermanga|2 years ago
[deleted]
Donaldzibe|2 years ago
[deleted]