Local LLM with Retrieval-Augmented Generation

Let’s build a simple RAG application using a local LLM through Ollama.

11 minute read

Edit (2025-03-25): I re-ran the example with a clean database and the results are better. I also cleaned up the code a bit.

Over the past few months I have been running local LLMs on my computer with various results, ranging from ‘unusable’ to ‘pretty good’. Local LLMs are becoming more powerful, but they don’t inherently “know” everything. They’re trained on massive datasets, but those are typically static. To make LLMs truly useful for specific tasks, you often need to augment them with your own data–data that’s constantly changing, specific to your domain, or not included in the LLM’s original training. The technique known as RAG aims to bridge this problem by embedding context information into a vector database that is later used to provide context to the LLM, so that it can expand its knowledge beyond the original training dataset. In this short article, we’ll see how to build a very primitive local AI chatbot powered by Ollama with RAG capabilities.

The source code used in this post is available here.

Gaia Sky gets new website

A brand new website and a brand new domain

2 minute read

Over the past few weeks I’ve been working on a new standalone website for Gaia Sky. It uses the same technology stack as my personal website (essentially Hugo), so it is a static website generated from templates and content. This is enough for Gaia Sky. I am no graphic designer or UX person, but I tried my best to make it look potable.

The new Gaia Sky website, gaiasky.space

Why did I create a standalone website instead of keeping the old section in the ZAH site? A few reasons:

Rendering volume aurorae and nebulae

Some notes on my trials and tribulations adding aurorae to Gaia Sky

14 minute read

A few weeks ago someone created an issue in the Gaia Sky Codeberg repository requesting the addition of aurorae to the Earth. They used as an example the aurora add-on in Cosmographia1, which, at the time, looked to me like it was using some kind of billboard particle system to generate the effect. I never thought it looked particularly good for an aurora; I thought Gaia Sky could do better. So I set on a quest to implement a better looking aurora object in Gaia Sky. This wee quest would involve implementing three very different approaches to aurora rendering over the span of a few weeks, plus more than half a dozen 3D volume nebulae.

In this post, I present the three different methods I implemented to render aurorae. But before anything, I need to take a small detour and talk about nebulae.

Jujutsu, a modern version control system

Jujutsu improves and simplifies on current version control systems

30 minute read

I first discovered Jujutsu a few weeks ago, and I was immediately intrigued. At first glance, it looked like a simple wrapper around Git, but the deeper I looked, the more impressed I became with its design. Jujutsu, I discovered, offers a new and fresh spin to DVCSes that leads to cleaner and simpler workflows.

In this post, I have a look at what Jujutsu has to offer, and I dive into its command line interface and workflow. My goal is that, by the end of this post, you can understand a little bit why I find this tool so cool.

On Neovim and Helix

My thoughts on where Helix stands in the modal text editor landscape

9 minute read

Today I have updated my $EDITOR variable to point to Helix instead of Neovim, and also configured Yazi to use it as the first option for text. I have used [Neo]vim since forever, so what made me switch? In this post, I discuss some of the ups and downs of both editors and what ultimately made me decide for Helix.

Just make use of just

Organize your project-specific commands with just

4 minute read

Nowadays, makefiles are ubiquitous in software. Most C and C++ projects have used them historically, and still use them as a build system. Nowadays, lots of projects written in other languages which have their own build tools also use them, not to make files, but to store and run commands in an organized manner. If this is you, you are doing it wrong. However, there is a tool designed to do just that: just.

Website design by myself. See the privacy policy.
Content licensed under CC-BY-NC-SA 4.0 .