Mathematics is typically concerned with "proofs" [1], which similarly to code, often allow for strict validation. Thanks to reinforcement learning techniques, it is now possible to train LLMs to perform very well on code generation, and mathematical proof generation.

Law and medicine are fundamentally harder fields to obtain decent training data for, and LLM results are therefore expected to be less powerful. Also, making mistakes in these fields is costly, but perhaps you were alluding to that already.

[1] https://en.wikipedia.org/wiki/Mathematical_proof

Mathematician here. There is a lot of recent work on the Lean project -- when a proof can be translated into Lean code, then it can be strictly and formally validated.

https://lean-lang.org/

But otherwise, mathematical proofs are read and written by humans, and at the end of the day the relevant standard of proof is what other mathematicians will accept.

Occasionally, mathematicians don't agree. For a prominent example, you can read about Shinichi Mochizuki's claimed proof of the so-called ABC Conjecture:

https://en.wikipedia.org/wiki/Abc_conjecture#Claimed_proofs

For that particular example, it's now been proved that Mochizuki's proof is incomplete: https://zeli.app/en/story/48963019

I guess whether he will eventually fix those gaps and resolve the issues remains to be seen.

> Law and medicine are fundamentally harder fields to obtain decent training data for

I think this bubble has given a lot of people software brain and are trying to apply it to fields it is wholly inappropriate for, though. Law is about argumentation and rhetoric. It is about providing a persuasive argument. This is how it is taught. The actual legal code is a way to formalize parts of it, but increasingly I see people angrily insisting that the only thing that matters is the text.

As you might imagine, I find textualism a load of applesauce, but I don’t think the vast majority of people making this argument even understand textualism as jurisprudence. It seems to stem from Crypto bros and the whole “code is law” argument which is just codswallop.