▲ | theshrike79 3 days ago | ||||||||||||||||
With mathematical things you can always write comprehensive and complete unit tests to check the AIs work. TDD (and exhaustive unit tests in general) are a good idea with LLMs anyway. Just either tell it not to touch test, or in Claude's case you can use Hooks to _actually_ prevent it from editing any test file. Then shove it at the problem and it'll iterate a solution until the tests pass. It's like the Excel formula solver, but for code :D | |||||||||||||||||
▲ | moregrist 3 days ago | parent | next [-] | ||||||||||||||||
You could, and hope that you understand the problem domain and numerical analysis enough to hit all the hard cases. And then you’d have expanded your codebase with lots of tests that are relevant to a linear algebra library and not to what you’re trying to do. Or you could use existing linear algebra libraries which are highly optimized, highly tested, and have a well-understood api that’s easier to review. And then get back to the legit hard stuff, like maybe worrying if your linear solver needs preconditioning and how to best to that. Or any of the many numerical problems people tend to face when doing this kind of work. I’m not sure why you’d give the llm a pass on reinventing the wheel here when you definitely wouldn’t with any other dev. | |||||||||||||||||
▲ | th0ma5 3 days ago | parent | prev [-] | ||||||||||||||||
I think we all understand this we just don't think it works. | |||||||||||||||||
|