3 ms·
Give the LLM access to `shellcheck` and have it iterate on the warnings. I think promising results have been shown when you allow LLMs to reflect on their answe
by spudlyo 3y ago
Give the LLM access to `shellcheck` and have it iterate on the warnings. I think promising results have been shown when you allow LLMs to reflect on their answers and give them access to tools.
- IshKebab 3y agoShellcheck can't check everything though. I think using LLMs on difficult to verify code like shell scripts and complex regexes is a pretty bad idea. I've found them useful as a "smart search engine", e.g. if I don't even know the magic terms to search for. Most of the time it gives me answers that are completely wrong, but are close enough that I know where to look to find the right answer. E.g. "Using the rapidcheck C++ test framework, how do you test a function that takes two vectors, one of which must be exactly 8 times as long as the other." It gets it wrong but it still helped. I definitely wouldn't want to use its output unquestioningly though.
- valine 3y agoDepends entirely on if the shell script is mission critical. I couldn't care less about the quality of my LLM shell scripts most of the time. My only success criteria is that is that it solves a problem. These are scripts I'm never going to touch again, things like batch converting files, or like one time I had it generate a script to titrate stable diffusion parameters. As long as I can skim the output and see that its correct I'm happy. You call it a bad idea, but it's saved me hours of work.