why

This started as a PoC i developed for a client.

I’ve wanted to develop a portable, simple to use RAG application which could run on most hardware. Mainly as a demonstrator of the technology to potential clients and as a starting base for simpler systems.

I needed it to be lightweight and run on a laptop, so that I could take it on-site and showcase in person, online or offline.

I’ve built it months ago but figured I might as well update and publish it.

tech

I’ve settled on Tauri v2 application framework. This allows me to build cross-platform, web technologies on the frontend, Rust on the backend.

I like compiled languages. Tauri is built on Rust, so the language for backend logic is already chosen for me. I’m developing mostly with the use of LLMs, so I dont mind. It’d be another story if I had to write Rust line by line, by hand.

I used the Mistral inference library (not to be confused with the French Mistral AI company). I chose it because I wanted something written natively in Rust and I did not want to use an ollama sidecar or other arrangements with Tauri.

Sidecars bother me a little as the communication channels between the main and sidecar processes are exposed to other running software. It doesnt feel cleanly integrated. You can secure those channels but idk, it just bothers me.

Mistral lib doesnt have the same level of maturity and the Rust crate is stuck on an older version (0.8.1 at the time of writing), blocked by some other dependencies in the chain iirc. I had to ‘vendor’ Mistral library from a recent working commit and get it integrated for local inference. It’ll run small models just fine.

The user interface is built using Svelte. I find Svelte intuitive. I never liked React much, despite it being the most common and abundant UI library. When building web interfaces I prefer to default to native capabilities baked into HTML/CSS and let the browser’s native code do the heavy lifting. So I avoid JS UIs like React. When I do have to build a frontend, I tend to go for Svelte. The way components are structured just makes more sense to me, and I like that the compilation is done ahead of time.

results

Overall I’m happy with how it turned out. Performance varies by hardware, but as a demonstrator it does the job and gives people a better understanding of what rag can do. For those of us in tech, it can be easy to forget that most people havent interacted with a tonne of different AI systems, for most of the world “AI” means a clever chatbot or some amorphous thing that’s coming for their job. It’s nice to be able to show people that these are just tools, and tools can be learned.

Ragtag document library with an upload area and a list of indexed documents

Ragtag settings for inference, retrieval, and storage in dark mode

Source can be found at MRKups/ragtag .