Case study

When a machine
stops, the
clock starts.

When a machine throws an alarm, Marcel reads it, finds the fix in the control manuals — cited, never guessed — and sends it to the right person in seconds. It doesn't wait to be asked.

2,100+
manual pages
450+
alarm codes
3
control manuals
CONTROL PENDANT
ALMRUN
ALARM
SV0401
SERVO · V-READY OFF
MARCEL ▸on it
ROUTEOK
RETRIEVEOK
GROUNDOK
DISPATCHOK
sent toMaintenance Lead · Telegram
Instant, cited diagnosis for FANUC CNC alarmsSCROLL ↓
§ 01The hidden problem

The expensive part isn't the fix.
It's the search.

When an alarm fires, the machine is already down. What actually costs money is the gap between “it stopped” and “we know why” — the frantic manual-diving, the phone calls, the guesswork while the spindle sits idle.

The stopped spindle
$$$/hr

Unplanned CNC downtime is widely estimated in the hundreds of dollars per hour — and far more on a bottleneck machine. The clock runs from the moment it stops.

The pages to search
2,100+

Diagnosing an alarm the hard way means digging through 3 dense control manuals — user, operator, maintenance — for the one paragraph that matters.

The codes to know
450+

A single FANUC control exposes hundreds of distinct alarm codes. No technician carries them all in their head, and the newest hire carries none of them.

The expert who left
−1

The person who recognized every code on sight retired last year. Their judgment walked out the door; the machines didn't.

* Figures describe general industry conditions, not measured results from this system. Marcel's job is to shrink the middle step — time-to-diagnosis — not to replace a qualified technician.

§ 02The insight

An alarm code isn't a mystery.
It's an index.

Every code already points at a specific failure mode the manuals describe in detail. The information was never missing — it was buried, cross-referenced across three volumes, and written for a binder on a shelf, not for a bad night on the shop floor.

So treat the manuals as a retrieval problem, and build the whole system to refuse to answer beyond what they actually say. That constraint — grounded, cited, deterministic — is what makes the output something a maintenance tech can trust at 2 a.m.

P·01

Cited, or it didn't happen

Every factual line traces back to a specific manual page. A validator strips anything the evidence doesn't support before you ever see it.

P·02

Deterministic where it counts

A code is matched exactly, not approximately. SV0401 is never quietly rounded to something that merely looks similar.

P·03

Honest at the edges

If the manuals are silent on something, so is Marcel. “Not found in the manuals” beats a confident guess every time.

§ 03How it works

Six stages.
One rule: stay grounded.

A question flows through a fixed pipeline. The design goal throughout is trustworthiness over cleverness — deterministic where it can be, cited everywhere, honest when the evidence runs out.

Offline ingestextractnormalizechunkembed→ indexed corpus
  1. 1

    Route

    REGEX · NO LLM

    A deterministic router reads the query, classifies intent (alarm / parameter / procedure / topic) and extracts entities like SV0401 or PRM1815 — no model call, fully repeatable.

  2. 2

    Retrieve

    HYBRID

    Three tiers run and merge, hardest match wins. A precise code is never lost to fuzzy similarity.

    01exact-code
    deterministic lookup on the code index
    02lexical
    BM25 over sections & text
    03vector
    semantic search for paraphrases
  3. 3

    Evidence

    STABLE IDS

    The top matches become a compact evidence pack, each fragment pinned to a stable citation ID — [C1], [C2], … — so every downstream claim can point back to a page.

  4. 4

    Prompt

    INTENT TEMPLATE

    An intent-specific template dictates the answer's exact shape and demands a citation on every line. The model is boxed in on purpose.

  5. 5

    Generate

    TEMP 0

    A pluggable backend — a local model for dev, a hosted one for demos — writes the answer at temperature zero. Phrasing only; the facts already came from retrieval.

  6. 6

    Ground

    VALIDATOR

    A final pass deletes any factual sentence without a valid citation. The answer physically cannot drift beyond the evidence it was given.

The genuinely hard parts — how the corpus was built, how retrieval is tuned, what makes the citations reliable — are where the real work went. This shows the shape, not the recipe.

§ 04The live diagnosis

Enter a code.
Watch it resolve.

This runs the whole loop — route, retrieve, ground, cite, then push the fix to the right person — on demonstration data, right in your browser. Pick a code or type one in.

Sample codes

Demonstration data — original text, real code identifiers, page-only citations. The production system cites the actual FANUC manual corpus.

marcel ▸ diagnose ▸ dispatchIDLE
— — — —

Awaiting alarm code. Pick a sample or type one in.

§ 05The system behind it

A diagnosis is the
front door.

Behind the demo is a real system — a grounded diagnosis engine wrapped in an agent that watches for alarms and acts, not a chatbot bolted onto a PDF. Here's its shape, labeled honestly.

LIVEruns todayPROTOTYPEbuilt, not hardened

A working proof of concept, labeled honestly — because the gap between what runs and what's still rough is most of the engineering.

§ 06Who it's for

Built for the people
holding the wrench.

A

Machine shops

Running FANUC controls with a mixed-experience crew. Marcel turns any operator into a capable first responder the moment a code appears — no waiting for the one person who knows.

B

Maintenance teams

Where decades of hard-won judgment keep walking out the door at retirement. Marcel captures that ground truth as something the whole team can query, consistently, on the floor.

C

Machine-tool builders

Builders and integrators who want a knowledge layer that ships alongside the machine — turning their own service manuals into an assistant their customers actually use.

§ 07Reach out

If this made you
look twice, let's talk.

I'm open to conversations with machine-tool builders, shops, and teams building better tools for the floor. A short note is the best way in — I read every one.

marcelcnc.com