I built a soap chemistry AI after someone said "tallow maybe?"

Community Article Published June 14, 2026

I was asking in a soap making community what people do when they can't find an oil for a recipe. Someone asked about palm oil. The answer from the community? "Tallow maybe?"

That one response told me everything I needed to know. Home soap makers are guessing. SoapCalc and Soapmaking Friend have been the only options for years. Both are form-based tools - dropdowns, number fields, ten steps before you get an answer. Neither explains anything. No substitutions. No help when your batch fails.

So I built Soap Lab.

The track

This is a Chapter One: Backyard AI submission.

The person I built it for is a home soap maker - someone who already makes cold process soap at home and relies on existing calculators for every batch. The problem is specific and real: these tools give numbers, never explanations. When something goes wrong or an oil needs substituting, there's nowhere to turn except forum posts from 2014.

Soap Lab was built to solve that exact problem for that exact person. The "tallow maybe?" response wasn't a hypothetical, it came from a real community member answering a real question. That's the gap this app fills.

What it does

Soap Lab takes plain English input and gives you real soap chemistry back. Type your recipe conversationally and get a verified lye calculation, quality scores with visual progress bars, a cure timeline, and a plain English explanation of what your recipe will actually be like.

There are five modes:

  • Recipe — lye calculation from verified SAP values, quality scores, AI explanation
  • Substitute — "I can't find palm oil" returns the three closest oils by fatty acid profile
  • Goal — "I want a gentle bar for dry skin" returns a full recipe with reasoning
  • Diagnose — "my soap came out greasy" returns a diagnosis and fix
  • Pantry — "I only have coconut oil and olive oil" returns the best recipe from what you have

On top of that: a superfat slider that recalculates lye live, a vegan filter, water hardness recommendations with sodium citrate amounts, and an agentic recipe optimiser that runs up to three improvement iterations and shows a before/after score comparison.

The architecture decision that mattered most

The lye calculation is deterministic Python — not AI. SAP values sourced from the HSCG professional standard, verified against known recipes, 33 tests passing. The model never touches the numbers. It only explains them.

The saponification reaction looks like this:

NaOH required=oil weight×SAP value×(1superfat%100)\text{NaOH required} = \text{oil weight} \times \text{SAP value} \times (1 - \frac{\text{superfat\%}}{100})

That separation matters for a safety-critical tool. The AI explanation panel is visually separated from the calculation panel precisely because they deserve different levels of trust. This is the right architecture for any domain where hallucination has real consequences.

The model

Qwen2.5-3B-Instruct via Featherless AI. Three billion parameters. It reasons well about soap chemistry because the hard chemistry is already done by the time it gets involved — it's explaining a result, not calculating one. That's the right job for a small model.

The superfat percentage directly affects how much lye is needed. At s=5% s = 5\% superfat, the multiplier applied to the raw SAP calculation is 10.05=0.95 1 - 0.05 = 0.95 , leaving 5% of oils unsaponified for skin conditioning.

What I learned

Small models can do real domain reasoning if you give them the right context. The key is being honest about what the model should and shouldn't do. Qwen2.5-3B doesn't know your lye amount — your Python code does. The model knows how to explain why a high cleansing score makes your bar feel drying. Those are different jobs and keeping them separate is what makes the app trustworthy.

Soap Lab isn't trying to replace Soapmaking Friend for experienced makers who want recipe storage and inventory tracking. It's the on-ramp for beginners who find those tools intimidating — the person who just wants to type "I want a gentle bar for dry skin" and get a sensible answer.

The other thing I learned: the soap making community is remarkably engaged. Within hours of asking a simple question I had real feedback about substitutions, failures, and what they actually wish their tools could do.

Build for a real person with a real problem and the product almost writes itself.

Agent traces

The full Codex session traces are published at tammy357/soap-lab-traces for anyone who wants to see how the agentic optimiser was built.

Try it

build-small-hackathon/soap-lab

Built for the HuggingFace Build Small Hackathon, June 2026.

Community

Sign up or log in to comment