4 ms·
Did you give Claude a way to test/verify/benchmark said algorithm compared to other solutions? If not, how can it not hallucinate when you didn't give it any c
by theshrike79 8mo ago
Did you give Claude a way to test/verify/benchmark said algorithm compared to other solutions?
If not, how can it not hallucinate when you didn't give it any constraints?
- rerdavies 8mo agoYou can just tell it that it's doing it wrong (and why). Of course, you have to know that it did it wrong.
- theshrike79 8mo agoThe point is that if you know the algorithm will produce X as the output if the input is Y, give that as a tool to Claude And if you know that the previous algorithm completes in Z milliseconds, tell Claude that too and give it a tool (a command it can run) to benchmark its implementation. This way you don't need to tell it what it did wrong, it'll check itself.
- kccqzy 8mo agoIt was the other way around. Claude gave me an algorithm. I found it fishy. So I specifically constructed a counterexample in response to Claude’s algorithm. Of course when I gave that to Claude, Claude changed the algorithm. But if I didn’t have enough experience and CS fundamentals to find it fishy in the first place, why would I construct a counterexample?
- rerdavies 8mo agoThe prompt would be <select code>, "Use a std::unordered_map<>" to make this code run faster." Review the code. Done.