MechAudit

A domain-bounded CLI and benchmark that independently recomputes mechanics and flags failure modes in LLM-generated engineering calculations.

Close-up of a slide rule cursor
Illustrative photo, not project hardware: A slide rule cursor. MechAudit recomputes each engineering quantity independently before comparing it with the model's answer. Photo by Joybot, CC BY-SA 2.0, via Wikimedia Commons.

Result. Matched annotated failure modes on 17/17 committed cases across five models by independently recomputing mechanics under a six-category taxonomy.

MechAudit loads a structured benchmark case, independently recomputes supported mechanics quantities, extracts the model's reported work, and returns detected failure modes—then compares that set with the case annotation so verifier regressions fail CI. It is a domain-bounded checker, not a general proof checker or a benchmark of overall model capability.

CategoryAI / Software
Timeline2026
StatusComplete
EvidenceHash-verified benchmark
RoleVerifier design, failure taxonomy, independent recomputation checks, provenance-tracked benchmark capture, CLI, and CI gating
ToolsPython, pytest, LLM APIs
LinksRepositoryBenchmark results

problem

My contribution. Built the schema/unit loader, independent calculation and answer-extraction paths, domain checks, failure taxonomy, provenance-tracked capture harness, Markdown audit report, and CI gate.

LLMs produce plausible-looking mechanical-engineering calculations with unit slips, wrong governing formulas, invalid thin-wall assumptions, arithmetic errors, and correct answers reached by incorrect reasoning. A useful verifier must recompute the physics independently and be explicit about the narrow domain it actually covers.

constraints

  • Recompute supported quantities independently rather than trusting the model's arithmetic.
  • Treat every benchmark case as a hash-verified capture with recorded provenance (elicited versus organic).
  • Report only within the covered domain: thin-wall pressure vessels, axial stress, cantilever controls, and finite-width stress concentration.
  • Verifier regressions must fail CI against the committed annotation set.

design evolution

Iterations, issues, and fixes, recorded in the order they happened.

RevisionFailure modeDesign changeResult
Failure taxonomy“Wrong answer” is too coarse to test a verifier against.Defined FM-01 units, FM-02A/B formula and assumption, FM-03 arithmetic, FM-04 stress concentration, and FM-07 right-answer/wrong-reasoning.Each case annotates specific expected failure modes.
Independent recomputationTrusting the model's stated number only re-grades its own claim.Recompute mechanics from the inputs and compare against the model's extracted reported answer.Detected modes are computed by the checker, not read from the model.
Provenance and CI gateElicited and organic captures are different evidence classes.Hash-verified captures with recorded provenance and a detected-equals-expected gate in CI.17 of 17 committed cases match; 2 skipped.

results

17 matched
Benchmark cases
0
Failed cases
2
Skipped
5
Models covered
6
Failure families
Elicited captures
Evidence

Each committed case pairs an LLM calculation capture with an annotation of expected failure modes; CI passes only when MechAudit's independently computed detected modes equal that annotation.

The current domain covers thin-wall pressure vessels, axial stress, cantilever controls, and finite-width stress concentration across five models.

Scope note. Detected modes match annotations on committed elicited captures. This measures the verifier against a bounded benchmark, not overall model capability, and does not yet include organic “wild” failures captured during real engineering work.

lessons

  • A failure taxonomy makes verification a checkable detection task instead of a vague judgment.
  • Recomputing the physics independently is the only reliable way to catch a correct-looking wrong answer.
  • Elicited and organic captures are different evidence classes and must be labeled as such.

← All projects