Selected Past Work

Older projects, written up — work that predates lowlevelmagic.io but still says something about how I build. Live case studies for the recent stuff live at lowlevelmagic.io.

Ask the Caterpillar

Harm reduction by text message, before the bots could talk

2017 harm reductionchatbotruby on railspre-LLM

Years before “chatbot” meant a large language model, I built one that could tell you whether the thing in your hand was going to hurt you.

It was called Ask the Caterpillar — a harm-reduction bot that let anyone text a question about a substance and get back real information: dose ranges, duration, effects, toxicity, what not to combine it with. No login, no lecture, no narc energy. Just the data, sourced from the people who actually do this work — TripSit and PsychonautWiki — and handed back to you so you could make your own informed choice.

The premise was a social-work premise, not a tech one: people are going to use drugs. That isn’t the interesting question. The interesting question is whether they have to do it blind. Most “drug information” online back then was either a DARE pamphlet or a forum thread you had to dig through at 2am while already high. Caterpillar collapsed that into a text message.

How it worked

Under the hood it was a Rails app. I scraped and modeled substances from TripSit and PsychonautWiki into structured records — each compound with its dose tiers, onset and duration, common effects, and, crucially, its dangerous interactions.

The “AI” was RecastAI, an intent-and-entity classifier from the pre-LLM era. Nothing was generating prose. The bot’s whole job was categorization: figure out which substance you were asking about, figure out what kind of question it was (how much? how long? is it safe with X?), and route you to the right slice of the structured data. Intent in, structured answer out.

That feels almost quaint now — but the constraint was also a feature. It couldn’t hallucinate a dose. It could only tell you what the harm-reduction community had already documented and vetted.

I wired it up to basically every channel that existed — SMS via Twilio, plus Messenger, Telegram, Discord, Slack, Google Assistant, even KIK and Skype — because harm reduction means meeting people where they already are, not where it’s convenient for you. And I left an API endpoint open so other people could build their own bots on top of the same substance models. (Built alongside Mikolaj Torz, who deserves half the credit.)

Why I still think about it

Here’s the part that’s aged strangely.

Years later I write essays about how today’s LLMs withhold exactly this kind of information — how they’ll refuse to tell you whether two drugs are safe to combine unless you happen to claim the right professional identity, how RLHF safety training quietly encodes a paternalism that can get people killed. (Role-Based Reality is the long version of that argument.)

Caterpillar was the inverse philosophy, built before I had the vocabulary for it. It assumed you were an adult. It assumed information was safer than ignorance. It assumed the person texting at 2am deserved an answer, not a sermon.

The bots can talk now. Whether they’ll tell you the truth is a different question — and it turns out I’ve been asking it since before they could.

The code is still up on GitHub if you want to see how it was held together back then: a time capsule of the harm-reduction ethic, the pre-LLM NLP stack, and the stubborn faith that you could just give people good information and trust them with it.

I’d build it again. I might, actually.