We replaced RAG with a virtual filesystem for our AI documentation assistant
TL;DR Highlight
Mintlify swapped sandboxes for a fake shell over Chroma, cutting session startup from 46s to 100ms.
Who Should Read
A backend developer whose docs assistant's RAG misses answers spread across pages or exact syntax.
Core Mechanics
- RAG only sees top-K chunks
- The assistant got stuck when answers spanned multiple pages.
- It also missed exact syntax that didn't land in the top-K results.
- Real sandboxes were too slow and costly
- P90 session creation was about 46 seconds, including GitHub clone and setup.
- At 850,000 conversations a month with 1 vCPU, 2 GiB RAM and 5-minute sessions, they computed over $70,000 a year (naive, Daytona pricing).
- ChromaFs fakes a shell
- It is a virtual filesystem that turns UNIX commands into queries against the existing Chroma DB.
- It plugs into the IFileSystem interface of just-bash, a TypeScript reimplementation of bash from Vercel Labs.
- Boot time ~100ms, marginal cost ~$0
- Sandbox: p90 boot ~46s and ~$0.0137 per conversation.
- ChromaFs: ~100ms and ~$0 marginal cost since it reuses the existing DB.
- The directory tree lives in memory
- A gzipped JSON (__path_tree__) is stored in Chroma and loaded at init.
- ls, cd and find then run locally with no network calls.
- Inaccessible files are pruned from the tree
- Paths are filtered by the user's session token, and the same filter applies to every Chroma query.
- The agent cannot even reference a pruned path.
- Grep runs in two stages
- Chroma's $contains/$regex finds candidate files first (coarse filter).
- Candidates are prefetched into Redis and just-bash does the fine filtering in memory.
- All writes throw EROFS
- The system is stateless, so no session cleanup is needed.
- One agent cannot corrupt another's view.
Community Reactions
- Experience using both VFS and RAG
- One commenter uses LLM-based semantic chunking, metadata with fact triples and chunk links, and voyage contextual embeddings.
- They said that over tens of thousands of documents, a VFS alone would be inefficient, so they combine both.
- Opinion that RAG wasn't really replaced
- A commenter noted ChromaFs still queries Chroma on every command, so only the interface changed.
- They argued agents don't need better search, they need grep.
- Latency concerns
- Commenters said each ls and grep adds an inference cycle, causing multi-step latency.
- Several asked how many hops are typical and what response times look like.
- Opinion that agent loops beat classic RAG
- A commenter said a closed loop of iteratively refined grep queries is a superset of what reranking does.
- They said old-fashioned RAG is dead and vector search must be re-engineered for agentic workflows.
- Doubt about messy organizations
- One commenter doubted this fits organizations whose information isn't hierarchical or easily partitioned.
How to Apply
- Give your docs a grep-only agent first
- Today, build an agent with only grep, cat and ls over your markdown docs folder.
- Run 10 identical questions against your current RAG and log accuracy and latency.
- Build a read-only virtual FS over your vector DB
- If chunks have page and chunk_index metadata, implement readFile by querying by page and joining chunks in chunk_index order.
- Make every write method throw an error.
- Put access info into the path tree
- Store isPublic and groups per page.
- Prune the tree by the user's permissions at session start and apply the same filter to every query.
- Split grep into two stages
- Use the vector DB's string or regex filter to pick candidate files only.
- Cache the candidates and finish with an in-memory grep.
Try It
# Paste into Claude Code (simplified version of the article's method: filesystem-style doc search)
You are a read-only docs assistant who can only read markdown under {{docs folder path}}.
Rules:
1. Before answering, explore with ls, find, grep -ri and cat. Don't rely on memory.
2. For exact syntax or parameters, grep for the literal string and cat the full page to verify.
3. If the answer spans pages, read all relevant pages and synthesize.
4. Never modify or create files.
5. End your answer with the file paths you read as sources.
Question: {{question}}Terminology
Related Papers
FutureBench: A Renewable Framework for Evaluating Knowledge-Context Conflict in LLMs
Adding 'verify and prioritize the passage' to RAG prompts raised false-passage adoption; a knowledge-priority warning fixed it.
Faster Retrieval for Better, More Efficient RAG
Small neural nets learned query routing, hitting the same recall up to 8x faster in IVF search
Memorilla: Latent Semantic Memory for LLMs
Compressing documents into 16 memory tokens beat full-context accuracy on FactKG.
What the Author Wrote, What the Agent Reads: Silent Cue Loss in Enterprise Document Ingestion
Preserving red text and highlights in docx ingestion lifted marked-requirement F1 from 0.150 to 0.690.
Multimodal Reranking Is a System One Decision
One multiple-choice question to a VLM over 16 candidates reranks them, beating a dedicated 2B reranker.
You could have invented transformers from memory
Viewing linear, MLP and attention layers as memory stores: capacity goes ~64 to ~2,700 to over a million
Pointing AI at archives found a forgotten meteorite, lost rhinos, and more
Embedding search plus a cheap filter model surfaced unrecorded events in 400 years of archives
EmbeddingGemma 2: An open, lightweight multimodal embedding model
One open 740M model embeds text, images, audio and video into a single shared vector space
Related Resources
- https://www.mintlify.com/blog/how-we-built-a-virtual-filesystem-for-our-assistant
- https://softwaredoug.com/blog/2026/01/08/semantic-search-wit...
- https://github.com/sunir/bashguard
- https://github.com/vercel/ai/blob/main/skills/use-ai-sdk/SKI...
- https://github.com/emson/elfmem
- https://wire.wise-relations.com/use-cases/replace-rag/
- https://zby.github.io/commonplace/notes/charting-the-knowled...