I Built an Offline AI That Answers Survival Questions Over Mesh Radio

The Problem

During natural disasters, communications go down. People lose internet, cell service, everything. In Puerto Rico after Hurricane Maria, the average was 41 days without connectivity. People died not because survival knowledge doesn't exist, but because they couldn't access it when they needed it.

Meshtastic

Meshtastic is a project I first learned about last summer. It's an open source mesh networking protocol that creates an offline, text-based communication network using cheap LoRa radios. It stays online even when the internet and power are out. Anyone within range of a node with a Meshtastic device can communicate with anyone else on the network.

That "anyone" can be extended to AI.

I thought, wouldn't it be cool if you could host a medical and survival channel on a Meshtastic node for your community? Like a knowledge base that anyone on the mesh could query. I couldn't find an active project doing this, so I built it.

The Constraints

Because this is offline and running a local LLM, it needs to be low power. Nobody is running an RTX 5090 off a generator during a disaster. So it needs to be a small model that can run on an average laptop.

The problem with small models is they hallucinate. They're not as capable as the cloud-hosted LLMs you're used to. When we're talking about medical and survival information, accuracy matters. Bad instructions can be worse than no instructions.

The Solution

I built a RAG (retrieval-augmented generation) system. Instead of relying on the small LLM's training data alone, RAG gives it a tool to pull from a curated knowledge base of public domain survival and medical content and provide precise, source-cited instructions. This significantly reduces the risk of hallucination because the model is referencing actual documents rather than generating from memory.

The RAG connects to Ollama for local model inference. I built a simple browser-based UI for direct use, and a CLI designed to be hooked up to Meshtastic automation. The idea is you connect your laptop running this software to a Meshtastic node, and people on the mesh can ask survival questions like "how to treat a burn" and get an answer back over radio.

What's in the Box

The project is fully open source. It includes everything you need to pull the source data (or bring your own), chunk it, embed it into a vector database, and package it all up with Ollama into a ~20GB Docker image. If shit hits the fan, you plug in a flash drive, install it onto a machine, and start asking it survival questions.

The knowledge base currently includes 70 public domain PDFs: US military field manuals, FEMA guides, CDC guidelines, and more. Each document is individually license-verified with provenance tracking.

github.com/bdkoeh/survivalRAG

What's Next

This was a fun project and I learned a ton about RAG systems and local models. I'd love it if someone wanted to contribute. Some things that would be cool:

If any of that sounds interesting, the repo is open.