Your File System Is Already A Graph Database

(rumproarious.com)

53 points | by alxndr 2 days ago

13 comments

  • stingraycharles 12 minutes ago
    Using the same logic, a key/value database is also a graph database?

    Isn’t the biggest benefit of graph databases the indexing and additional query constructs they support, like shortest path finding and whatnot?

    • sorokod 4 minutes ago
      Yes, the author is likely unaware of this. They see markdown files with links, so a graph and the set of those files, so a "database".
  • itmitica 17 minutes ago
    I can see over engineering when I look at one. And premature optimization.

    Anyway, why care how the data is stored? You need a catalog. You need an index. You need automation. Helps keeping order and helps with inevitable changes and flips and pivots and whims and trends and moods and backups and restoration and snapshots and history and versioning and moon travels and collaboration and compatibility and long summer evening walks and portability.

  • appsoftware 28 minutes ago
    I created AS Notes (https://www.asnotes.io) (an extension for VS Code, Antigravity etc) partly because of this use case. It works like Obsidian, being markdown based, with wikilinks, mermaid rendering and task management. In VS Code, we have access to really good Agent harnesses and can navigate our notes and documents in a file system like manner. Further, using AGENTS.md, idea files etc we can instruct the agent how to interact, add to our notes etc. I've found working with my notes like this really useful, and provided I trim anything generated by an AI that's not going to be useful, provides an investment in the information I've gathered as the information is retained in markdown rather than getting lost in multiple chatbot UI s.
  • embedding-shape 1 hour ago
    I've been playing around with the same, but trying to use local models as my Obsidian vault obviously contain a bunch of private things I'm not willing to share with for-profit companies, but I have yet to find any model that comes close to working out as well as just codex or cc with the small models, even with 96GB of VRAM to play around with.

    I've started to think about maybe a fine-tuned model is needed, specifically for "journal data retrieval" or something like that, is anyone aware of any existing models for things like this? I'd do it myself, but since I'm unwilling to send larger parts of my data to 3rd parties, I'm struggling collecting actual data I could use for fine-tuning myself, ending up in a bit of a catch 22.

    For some clients projects I've experimented with the same idea too, with less restrictions, and I guess one valuable experience is that letting LLMs write docs and add them to a "knowledge repository" tends to up with a mess, best success we've had is limiting the LLMs jobs to organizing and moving things around, but never actually add their own written text, seems to slowly degrade their quality as their context fills up with their own text, compared to when they only rely on human-written notes.

  • stared 50 minutes ago
    Filesystem is a tree - a particular, constrained graph. Advanced topics usually require a lot of interconnections.

    Maybe it is why mind maps never spoke to me. I felt that a tree structure (or even - planar graphs) were not enough to cover any sufficiently complex topic.

    • nutjob2 43 minutes ago
      If it has hard or soft links, its a proper graph.
      • zahlman 24 minutes ago
        On Linux at least, hard links can't be made to directories, except for the magic . and .. links. So this only allows for a DAG.

        Symbolic links can form a graph, and you can process them as needed using readlink etc. to traverse the graph, but they'll still be considered broken if they form a cycle.

      • calgoo 26 minutes ago
        That what i was thinking! Instead of Wiki links, use Symlinks (i guess windows would not like it?)
  • itake 59 minutes ago
    I'm wonder though:

    1. Why does AI need that folder structure? Why not a flat list of files and let the AI agent explore with BM25 / grep, etc.

    2. pre-compute compression vs compute at query time.

    Kaparthy (and you) are recommending pre-compressing and sorting based on hard coded human abstraction opinions that may match how the data might be queried into human-friendly buckets and language.

    Why not just let the AI calculate this at run time? Many of these use cases have very few files and for a low traffic knowledge store, it probably costs less tokens if you only tokenize the files you need.

    • laurowyn 54 minutes ago
      > Why does AI need that folder structure? Why not a flat list of files and let the AI agent explore with BM25 / grep, etc.

      It doesn't. The human creating the files needs it, to make it easier to traverse in future as the file count grows. At 52k files, that's a horrendous list to scroll through to find the thing you're looking for. Meanwhile, an AI can just `find . -type f -exec whatever {} \;` and be able to process it however it needs. Human doesn't need to change the way they work to appease the magic rock in the box under the desk.

      • itake 51 minutes ago
        > The human creating the files needs it

        why? The human would just talk to the AI agent. Why would they need to scroll through that many files?

        I made a similar system with 232k files (1 file might be a slack message, gitlab comment, etc). it does a decent job at answering questions with only keyword search, but I think i can have better results with RAG+BM25.

        • laurowyn 44 minutes ago
          And when the system fails for whatever reason?

          Just because AI exists doesn't mean we can neglect basic design principles.

          If we throw everything out the window, why don't we just name every file as a hash of its content? Why bother with ASCII names at all?

          Fundamentally, it's the human that needs to maintain the system and fix it when it breaks, and that becomes significantly easier if it's designed in a way a human would interact with it. Take the AI away, and you still have a perfectly reasonable data store that a human can continue using.

  • alxndr 2 days ago
    > […] the knowledge base isn’t just for research. It’s a context engineering system. You’re building the exact input your LLM needs to do useful work. > […] there’s a real difference between prompting “help me write a design doc for a rate limiting service” and prompting an LLM that has access to your project folder with six months of meeting notes, three prior design docs, the Slack thread where the team debated the approach, and your notes on the existing architecture.
  • bullen 30 minutes ago
    Yep, my distributed JSON over HTTP database uses the ext4 binary tree for indexing: http://root.rupy.se

    It can only handle 3 way multiple cross references by using 2 folders and a file now (meta) and it's very verbose on the disk (needs type=small otherwise inodes run out before disk space)... but it's incredibly fast and practially unstoppable in read uptime!

    Also the simplicity in using text and the file system sort of guarantees longevity and stability even if most people like the monolithic garbled mess that is relational databases binary table formats...

  • WillAdams 2 hours ago
    I've found a similar structure along with a naming convention useful at my day job --- the big thing is the names are such that when copied as a filepath, the filepath and extension deleted, and underscores replaced by tabs, the text may then be pasted into a spreadsheet and summed up or otherwise manipulated.

    In somewhat of an inversion, I've been getting the initial naming done by an LLM (well, I was, until CoPilot imposed file upload limits and the new VPN blocked access to it) --- for want of that, I just name each scan by Invoice ID, then use a .bat file made by concatenating columns in a spreadsheet to rename them to the initial state ready for entry.

  • exossho 1 hour ago
    I can't remember how many file structures I've already tried... LLMs seem to be a great help here. Also used CC to organize my messy harddrive.

    Now just need to find a good way to maintain the order...

    • freedomben 1 hour ago
      > Also used CC to organize my messy harddrive.

      Do you still have your prompt by chance, and willing to share it? I took a stab at this and it didn't want to make much change. I think I need to be more specific but am not sure how to do that in a general way

  • rubises 2 hours ago
    [dead]