top | item 40484512

llama-fs: A self-organizing file system with llama 3

221 points| archb | 1 year ago |github.com

62 comments

order
[+] caseyy|1 year ago|reply
I've written something similar in python — a script that renames documents based on their contents using Ollama. It's very easy to write things like that, I recommend anyone interested in local LLMs try a fun project such as that.

My first question was why would this be a file system rather than an app or a script, but I see it's actually an Electron app and python scripts, which I think is the right approach.

I think that something that would have a UI for automatically tagging, renaming, and moving files on request but not constantly would be very handy. Also, if you could somehow steer files into binning directories ("if X, put it in bin ~/X, if Y, put the file in bin ~/Y", "if it's an invoice or deals with payment, put it in ~/Documents/Finance"), that would be cool. Finally, Windows support would be amazing.

[+] 3abiton|1 year ago|reply
I feel naming this is rather personal as we all think differently, and organize files mirroring our way of thinking. I find it odd to have an LLM do that. How often do you use it and how does it fit withing your workflow?
[+] leobg|1 year ago|reply
I’m a lawyer and do the same thing. YYMMDD_ENTITY_TOPIC is a template I use a lot when dealing with lots of documents in large cases. Regex and Keyboard Maestro were my main tools before LLMS became a thing.
[+] btbuildem|1 year ago|reply
> automatically tagging, renaming, and moving files on request but not constantly

Key point here -- I might be old, but I like my files to stay where/how I left them.

[+] TylerE|1 year ago|reply
Well, I see very good reasons for writing it as an actual file system... it allows the rest of the ecosystem to interact with it on an equal footing.
[+] haolez|1 year ago|reply
Will this actually move stuff around? I'd prefer that it mounted in another directory, giving me an organized view of my files but not actually moving them.
[+] mihalycsaba|1 year ago|reply
Exactly this. If it starts moving files around, who knows where will they end up.
[+] Areibman|1 year ago|reply
No— you have to explicitly checkmark it for the change to happen. We saw the famous OpenInterpreter tweet where the agent deleted every file on someone’s computer. We wanted to avoid that
[+] nestorD|1 year ago|reply
A `dry run` mode producing a symbolic link based reorganized copy of the folder would be nice.
[+] bossyTeacher|1 year ago|reply
Hopefully not. LLMs hallucinate. It will move some critical files somewhere random n levels deep in some node folder you will never be able to find
[+] spot5010|1 year ago|reply
Yeah, the thought of some LLM based hallucinating piece of software moving my files around gives me anxiety.
[+] accrual|1 year ago|reply
This is pretty neat. Can confirm my Downloads folder could use some help, there's usually at least one or two nested "Old Downloads" or "Sort me" folders.

I think one thing to improve the readme or landing page for this project would be a before & after for a sample ~/Downloads directory, maybe in `tree` format.

[+] nicklecompte|1 year ago|reply
A lot of people are worried about Llama screwing up, and that's a valid concern. But this is also an Electron app + a few nontrivial Python scripts for watching changes to a filesystem, yet there are zero actual tests. Just some highly unrepresentative "sample data."

I am a grumpy AI hater. But Llama is not the security/data risk here. I don't think anyone should use this unless they are interested in contributing.

[+] outofpaper|1 year ago|reply
Oh come now no need to be grumpy. We need to just accept that this is somewhere between managing your files using an algorithm that integrates a roulette wheel and a system that instead has Russian roulette built in. In either case its going to get messy.
[+] behnamoh|1 year ago|reply
Apple will probably add this feature and more to the stacks feature on macOS (a multimodal model would be very useful there). Even better: I expect Apple to use ML and local models to scan file contents and have them show up in search (e.g., on spotlight or Raycast, search for the picture of my latest receipt that I saved __somewhere__ I don't remember).
[+] verdverm|1 year ago|reply
A few months ago, while using search in finder, I noticed that it would return images with the search term in the image. They seem to be doing something ML already
[+] jjuliano|1 year ago|reply
I build a tool with similar goal a year ago: https://github.com/jjuliano/aifiles -- A CLI that manages files using AI. It helps me to organize my files and backups.

In my case, I built a local OpenAI-emulated proxy API to run against a local LLM, and used a modified OpenAI library to connect with it. This was the solution a year ago. Now, it's easier to deploy a local LLM.

[+] darajava|1 year ago|reply
No demo/example? I'm not going to run this on the basis that the developer thinks he built something that give me some pretty much unspecified benefit. I don't really understand the "incognito" mode either. What's the benefit of having it off? Why isn't it on by default?
[+] pratik_kanthi|1 year ago|reply
I would like to see something similar for my browser tabs which are always a mess. Unsure what UX considerations are needed. Thoughts?
[+] pama|1 year ago|reply
The high level strategy would be to get the browser tab contents and then ask a local LLM to organize the tabs based on their full content. If you run selenium or some developer versions of certain browsers you might be able to source the full contents directly, including any state that may not be obvious from only the URL. If the url of the tabs is enough (for most cases it should be), then there are many options and relatively easy implementations possible. Emacs has tools to communicate with browsers (though they depend on the local OS and some are limited to only certain browsers or certain OSs), so if you are happy with controlling the tabs from Emacs, you could simply reorganize/regroup the tabs within an Emacs buffer with the help of an LLM that gets the url and may open up connections to see what the trivially accessible contents aee. I would use this and might test this idea when I am not AFK. If Emacs is not an option, perhaps find an OS or extension-dependent way to reorganize the tabs.
[+] qwertox|1 year ago|reply
Also with the possibility to look at the current tab and open a new window populated with tabs from related pages you've visited earlier.
[+] philippgerard|1 year ago|reply
Arc Browser does that already, also for downloaded files. Looks neat.
[+] ilaksh|1 year ago|reply
chrome recently rolled out something that groups browser tabs together. I thought they said they used AI. But basically a bunch of youtube tabs get consolidated into a youtube button tab that toggles the group to expand.
[+] Areibman|1 year ago|reply
Alex here—- one of the team members behind the project.

We built this for the Llama3 Cerebral Valley Hackathon. The idea was this: My ~/Downloads folder is extremely messy, and I wanted an agent to fix it for me. So we built one.

LlamaFS reads file contents and metadata to Ollama with LlamaIndex, Moondream, and Whisper to understand what it’s about. It renames the files according to a specified pattern and organizes similar files into directories. Also, LlamaFS doesn’t overwrite anything until you explicitly ask it to (no risk of deleting anything precious)

One cool thing we benchmarked with AgentOps was the speed. It goes pretty fast, ~500ms per file.

[+] dwpdwpdwpdwpdwp|1 year ago|reply
“In batch mode, you

In watch mode, LlamaFS starts a daemon that watches your directory. It intercepts all filesystem operations, updates i and uses your most recent edits in context to proactively learn and how, so you don't learns predict how you rename file. e.g. if you create a folder for 2023 tax documents, and start moving 1-3 file in it, LlamaFS will automatically creates, and move the right!”

Come again? Was AI used to generate the documentation?

[+] gregwebs|1 year ago|reply
I think I would like a tool that intelligently suggested renames but doesn't automatically do them.

Arc Browser has an AI rename feature (for downloaded files). I tried it out but I had to turn it off. I love Arc Browser BTW and their AI hover summary is useful. I found poorly naming of files to be disruptive and it's a lot better if I am more involved in renaming the file- that will help me remember it.

[+] olooney|1 year ago|reply
That's the approach I took on a similar toy project[IT] I've been working on the past week (images instead of text.) It first creates a `metadata.csv` file with suggested clean filenames and a Boolean flag indicating if it thinks it needs to be changed at all. You can manually view and edit the `metadata.csv` file and only once you're happy with it do you pull the trigger by running `autorename()`. I definitely feel like you need a human in the loop for this kind of thing.

[IT]: https://github.com/olooney/image_tagger

[+] delijati|1 year ago|reply
Can i run this in a sandbox or dry ... Not that i'm not trusting my AI Overlord ;)
[+] idncsk123|1 year ago|reply
Working on something related, github.com/idncsk/canvas, canvas-server, canvas-ui-browser, always use the dev or for browser the tarbor branch, waiting on my burger in Budapest sry for the lack of details
[+] jjuliano|1 year ago|reply
That's an interesting project and concept.
[+] endofreach|1 year ago|reply
Interesting. Literally just this week i planned some time in to experiment with LLMs as a full FS. This seems not truly fair to be named "FS". But cool approach. Though this has been done in bash scripts online before. So i only dislike naming it FS. It's not an FS. Just like your productivity app is not an OS. Will check it out regardless. Congratulations anyway!
[+] zy0n911|1 year ago|reply
I created something very similar, and much simpler, to this in Go not too long ago (without Llama) called Switchboard.

it's not "self organising" in this sense, but it's an easy way (imo) to organise files across your desktop.

https://github.com/Cian911/switchboard/

[+] saintradon|1 year ago|reply
This is something where I can see infinite context windows really working. My local llm knowing where tens of thousands of files located on my computer are, what they do, which ones can be moved, which ones can't etc, how to organize them. Just cleaning up my absolutely messy space.
[+] cyanydeez|1 year ago|reply
This the type of thing I plan to implement. If there's one way to save things. Of course, it's definitely going to hide some files eventually, so hopefully you got a log file going documenting the modifications.
[+] giovanni_or2|1 year ago|reply
Sending all your personal files to an external provider seems like a recipe for a privacy disaster. Luckily, they provide an option to use your local Llama instance.