Learn/Digital FreedomOpen Source

RagConverter: Private RAG Conversion, Remade With Rust

RagConverter turns any document into RAG-ready embeddings entirely in your browser — no upload, no cloud, no data broker. Here's how the Remade with Rust stack makes it possible.

Signed by M·
Dark purple-to-navy gradient title card with white 'RAGConverter.com' wordmark and light-purple 'Private RAG. Remade with Rust.' tagline underneath

Retrieval-augmented generation is how modern AI assistants search your content instead of relying on generic training data — feed a model your research notes, medical records, or company docs, and it can answer questions grounded in what you actually know. The catch: every RAG pipeline in production today asks you to hand your documents over to a service that parses, chunks, embeds, and stores them. Private RAG has been a marketing claim more than an architecture.

RagConverter is what private RAG looks like when it actually is private. Drop a PDF, a Word doc, a spreadsheet, a photo, or an audio file into the page; the browser converts it to embeddings-ready JSONL entirely on-device and hands you the file to save. No account. No upload. No cloud API in the middle. The only network chatter is a quota counter that carries a single integer.

The reason this is possible is the Remade with Rust portfolio — MATA's set of pure-Rust rebuilds of the C/C++ primitives that every AI-media stack normally depends on. RagConverter compiles those Rust libraries to WebAssembly and runs the whole pipeline inside your tab. This article walks through why that matters, what the WASM stack looks like, and what it unlocks for private AI. If you want the broader "why memory-safe" framing first, The Importance of Remade with Rust covers it.

Why RAG Conversion Is Normally A Privacy Nightmare

Every commercial RAG pipeline breaks the same way. Your PDF gets uploaded to a document parser. Your audio gets sent to a hosted speech-recognition API. Your images go to a vision model on someone else's GPU. Each stage sees the raw content — every sentence, every medical detail, every financial figure — before anything is ever chunked or embedded. Even the "we don't store your data" services still process it in the clear, which means anyone with subpoena power, a data-broker partnership, or a compromised employee has access to it while it's in flight.

The Federal Trade Commission has been increasingly vocal about the gap between AI privacy claims and what actually happens to user data at commercial AI services. And the Electronic Frontier Foundation's work on AI privacy has documented how "we only process, we don't store" is a fig leaf when the processing itself is the exfiltration point.

The technical reason this happens is not privacy hostility — it's tooling. The document parsers, OCR engines, speech recognizers, and vision models that RAG pipelines need have historically been giant C/C++/Python codebases with heavy runtime dependencies. You cannot bundle Tesseract, Whisper, and libpoppler into a browser tab. You need a server. That is the constraint that has kept RAG cloud-shaped.

How RagConverter Runs Privately In Your Browser

RagConverter breaks the "you need a server" constraint by replacing every piece of the pipeline with a pure-Rust equivalent that compiles to WebAssembly and runs in the tab. Parsing, OCR, ASR, chunking, embedding, and serialization all happen client-side. The three subsections below walk through the stack.

WebAssembly Lets A Full RAG Pipeline Run On The Client

WebAssembly is the delivery vehicle. Rust compiles cleanly to WASM with small binary sizes and near-native performance — the compiler emits a .wasm module the browser loads and executes in a sandboxed VM at close to CPU-native speed. That combination is what makes an in-browser RAG converter viable in a way it never was with JavaScript alone or with C++ ported via Emscripten.

The RagConverter pipeline compresses into four stages inside the tab: parse (extract text, structure, and layout from the source file), chunk (split into overlapping segments sized for the target embedding model), embed (run a small transformer locally to produce vectors), and serialize (write JSONL). Each stage is a Rust crate compiled to WASM, wired together by a thin JavaScript orchestrator whose only job is to hand bytes between stages. Your document goes in as a File object; JSONL comes out as a Blob you save to disk. Nothing leaves the browser process.

The one server round-trip is a quota check that sends the string "how many free conversions do I have left" and receives an integer. That single request carries no document content and no user identifier beyond an anonymous quota token.

The Remade With Rust Engines Under The Hood

The pipeline stages are built out of the same Remade with Rust crates the rest of the MATA stack uses. Carmenta is the OCR engine — pure-Rust document and image text extraction, replacing Tesseract at a fraction of the deployment footprint. When you drop a scanned PDF or a photo of a whiteboard into RagConverter, it is Carmenta pulling the text out inside your browser.

Mercury handles audio. It is MATA's pure-Rust implementation of OpenAI Whisper — no Python runtime, no C dependencies. Drop a WAV or FLAC voice memo into RagConverter and Mercury transcribes it locally, tab-side. Argus covers vision-language understanding for image and video inputs; it describes what is in an image so the embedding captures visual content, not just filenames. All three ship as standalone crates under the FFAI umbrella on github.com/remade-with-rust.

Below the AI-media engines sits the rest of the memory-safe stack: rusty_jpeg and rusty_png for image decoding, remade_ffmpeg_rs for the audio/video demux paths, rusty_alloc as the workspace allocator. Every one of those primitives is a pure-Rust replacement for a C library with a long CVE history — and every one of them compiles to WebAssembly cleanly, which is what makes the whole pipeline browser-viable in the first place.

Output That Plugs Into Any Vector Database

RagConverter writes JSONL — one JSON object per line, each carrying an embedding vector and the source chunk. It's the universal format every vector database imports natively. That means the output plugs directly into MATA's own local-first SpaceDB, or into Chroma, Qdrant, pgvector, LanceDB, Weaviate, Pinecone, Milvus — whichever database fits your setup.

That format choice matters more than it looks. If RagConverter emitted a proprietary binary bundle that only worked with SpaceDB, you'd be trading one lock-in (cloud RAG APIs) for another (MATA-only tooling). JSONL is the opposite: it's the file format vector DBs already speak, and it means the tool is genuinely composable. A researcher can process notes at home with RagConverter and load them into a self-hosted Qdrant; a company can process HR documents locally and pipe them into a private Pinecone deployment; a MATA user can chain the whole thing into SpaceDB for a fully-local RAG stack. The pipeline is portable because the interchange format is standard.

What Private RAG Unlocks

Private RAG conversion is not just a nicer version of the same thing. It flips which category of use cases is even possible. When your documents never leave your device, you can point RAG at content categories that were previously off-limits to any cloud AI service. The three subsections below walk through what that opens up.

Your Personal Documents Stay On Your Device

The most immediate unlock is personal RAG. Research notes, journals, medical records, tax documents, therapy transcripts, private correspondence — categories of content that a rational person would never upload to a commercial AI service become RAG-able for the first time. You get an assistant that knows your medical history without a cloud provider that knows your medical history. You get a search tool over your therapist's notes that does not create a subpoena target.

The NIST AI Risk Management Framework explicitly names the "data collection surface" as one of the highest-impact risk categories in AI deployments. RagConverter's answer to that risk is architectural: the surface does not exist because the data never leaves the device. There is no processing pipeline to compromise, no employee to bribe, no data-retention policy to trust, no dataset to breach. The threat model shrinks to your own device — the same trust boundary you already accept for your existing files.

Enterprise RAG Without Vendor Lock-In

The enterprise unlock is compliance. Regulated industries — healthcare, finance, legal, defense contractors — have compliance frameworks (HIPAA, PCI-DSS, SOC 2, various sovereignty rules) that treat "data processed by third-party AI services" as a categorically different risk from "data processed locally." A cloud-hosted RAG API triggers a vendor security assessment; a browser-based RAG converter does not.

Beyond compliance, there is the cost angle. Commercial RAG APIs charge per document processed and per embedding generated. For an enterprise with a document corpus in the millions, that adds up to a real recurring bill. RagConverter's browser tier is free at any volume, and the paid API tier is priced for the "larger-than-tab" cases where a full-resolution model actually matters. Add the Freedom Guide business tab integration path — Sign in with Sovereign ID plus MATA Hiring plus this — and you get an enterprise RAG stack without a single per-monthly-active-user contract.

A Preview Of The Distributed Cloud Model

Zoom out and RagConverter is a preview of the whole distributed-cloud thesis at product scale. Every layer of the RAG stack runs on hardware the user owns: the browser tab does the conversion, SpaceDB stores the vectors, a local or edge-deployed model runs the queries. There is no data center in the loop except by explicit user choice.

That is the shape of the whole Eras of Digital Freedom roadmap in miniature. First the memory-safe primitives (Carmenta, Mercury, Argus, the codec stack, rusty_alloc). Then the applications built on top of them (RagConverter, and everything else that will follow). Then the data layer that keeps the output on-device (SpaceDB). Then the identity primitives that let users prove they created a corpus without disclosing it (Sovereign ID, mID). Every layer is memory-safe, permissively licensed, and inspectable — because the whole point is a version of the internet where individuals actually own the stack. RagConverter is the first end-user AI product built entirely from that stack. It will not be the last.