Blog Posts

Building a RAG chatbot with Go, SolidJS, Hugo, and SQLite

Last week I released a chatbot powered by retrieval-augmented generation (RAG) for the Epistemic Technology site. Along with it, I published a high-level overview of it intended for a general audience. In this post I dive more deeply into the engineering of the chatbot, for those who are pursuing similar experiments.

All of the code for the chatbot is available in the Epistemic Technology GitHub.

The big picture

Chatbot architecture, showing various components and control flows of the application.

How should LLMs change software architecture?

One of my favorite thinkers on programming is Casey Muratori, a low-level programmer, educator, and occasional Youtuber. In “The Only Unbreakable Law”, he makes the argument that, inevitably, the structure of software reflects the structure of the organizations that produce it. For example, Microsoft Windows has five separate volume control widgets, not due to any design reason, but due to the organizational structure of the teams that worked on the operating system.

Five distinct volume control widgets in Windows

Building My Site with Cursor

Cursor is a code editor based on Microsoft’s Visual Studio Code. Initially released in 2023, it has become one of the leading AI-focused code editors. I’ve been using Cursor for a while now but hadn’t tried out some of its newer features like Agent Mode. So building a new site from scratch seemed like the perfect opportunity to experiment.

Initial Planning and Architecture

For any new project, coding or otherwise, my starting point is ChatGPT. You could use Cursor’s chat mode for this, but I still find OpenAI’s chat interface better for developing my initial thoughts. Here’s my initial prompt:

Why Epistemic Technology?

Over the coming decades, I expect artificial intelligence to revolutionize our work and lives. For those like me, working in software development or knowledge-based fields, it is already beginning to do so. How will our work and lives change? I don’t know and I don’t think anyone knows. But I want to do my utmost to be in a position where I can adapt to those changes, and make a positive impact on the world. Epistemic Technology is my attempt to do that.