Build · Platform
RAG4: The Foundation
The platform and infrastructure behind much of the AI-related work you'll find here. Rebuilt from scratch four times before I got it right.
Challenge
RAG4 is named for the most straightforward reason there is: it's the fourth time I tore the whole thing down and started over. The first three weren't failures of effort, they were failures of foresight. Each one got far enough to be genuinely useful, then ran straight into the wall of my own architecture: no design system to grow into, a structure that fought every new feature instead of absorbing it, and a database that was never going to scale past the toy stage.
The name started out as an in-the-moment name for a folder in the file system that gave it separation from the previous efforts. I had realized I'd walked right into the trap that I have spent a lot of my career advising others against, which was building something quick (more than once!) without planning the foundation. Well, this time, so far, I got it right.
Build

By the fourth time, I had been building multiple RAGs and a couple of applications. I was getting a stronger sense of what I was going to need and how to plan more appropriately to support those elements, as well as an administration section that allowed me to share access, log activity, manage models and usage, and track usage; fairly standard elements of a CMS. I planned for a design system that expansion would have as a touchstone, and an architecture that made adding a new tool mostly a matter of pointing it at the right corpus, applying an interface, connecting a database, and adding it to the ever-growing navigation.
Outcome

Everything here, and probably a bit more, came from that fourth effort: the thirteen knowledge bases, the apps that read from them, live industry monitoring, and the orchestration that keeps it running. The same foundation delivers a gym workout generator in one instance and a federal accessibility checker in the next. If there's a tool I need on a Monday, it can usually reach MVP and ship before Friday, because the hardest parts are already built. New parts get added often, and they become shared services rather than one-offs; no more short-term thinking. I take a grounded, systems-thinking approach, building for reuse, not just use.
The Stack
Built and operated on hardware I own. Nothing about the work, or my notes on it, leaves it.
- Postgres with pgvector for retrieval at scale
- Qwen running locally for synthesis across every app
- Image generation, audio and voice, and inference each on dedicated GPUs, so the three never compete and a failure in one stays contained
- Docker for every service, so the whole platform is reproducible
- A shared design system and app framework, so a new tool inherits the platform instead of rebuilding it
- An orchestration agent that runs the schedules and watches the whole system
