请问HN:你们是如何审查和验证大型语言模型生成的代码的?
如今生成代码变得非常迅速,但你如何对所有代码进行审查和测试呢?
每次你请求模型审查某段代码时,它都会给出不同的“发现”。因此,你仍然需要在这些发现的噪音中筛选出实际的缺陷。
如果你尝试手动进行全面审查,那么理解代码所花费的时间可能比从头开始编写代码还要多。
至于测试,你可以让大型语言模型(LLM)编写测试,但你无法确定这些测试是否真正验证了预期的产品流程,还是仅仅为某段逻辑编写了通过/失败的测试。
我想知道你是否有任何工作流程、策略或技巧。
查看原文
It's become very fast to generate code nowadays, but how do you review and test all of it?<p>Every time you ask a model to review some piece of code, it comes back with different "findings". So, you still have to filter through the noise of their findings to get to actual defects.<p>And if you try to do the full review manually, then it might take more time to just understand the code than writing it yourself from the beginning.<p>As for testing, you can ask the LLM to write the tests, but you can't be sure if the tests actually assert the expected product flow or just write pass/fail tests for a piece of logic.<p>I would like to know if you have any workflows, strategies, or tricks.