Live data from Hacker News

How well do agents use test/verification techniques?

danluu.com

71–80 of 84 posts

Re: How well do agents use test/verification techniques?

#71
post #48

Earlier quoted context omitted.

But what's the initial setup? Was it greenfields every time? And _how_ were the different testing frameworks used? What's the AGENTS.md there? So many things can influence these tests in positive/negative ways that are not included in the write up or results. Seems like a lot of effort without much in the way of actual helpful detail.

The setup is described in an earlier post linked in the second paragraph. Agents are given the zstd RFC and told to implement it, greenfield. Testing frameworks were used however the agents decided, which is to say, as mentioned repeatedly throughout the post, badly or not at all. Other factors that could conceivably affect the results can be assumed to be held constant, since the goal is to see what happens when you…

So basically "one-shot using testing methodology".

I don't think that's a very effective test of an agents ability.

Re: How well do agents use test/verification techniques?

#72
Wonderful data point!

It's been interesting investing into different classic verification & testing methods for gfql (CPU/GPU graph queries on dataframes) and Louie (agentic investigation harness) over the last couple of years with different model & harness generations. The ones below are fewer but more longitudinal efforts compared to the shallower ones Dan worked through, and seem largely consistent:

Overall, my takeaway on standard software has been LLMs favor smart, guided fuzzing, natural language specifications deployed as iterative parallel adverserial AI review (e.g., context-reset subagents) after the functional prototyping. For formal methods / static analysis, cheaper/faster/lighter ones, though for the next level of quality, I can see this changing. The concolic testing world's heuristic results carried through a lot for me vs most others, which is unsurprising as they went deep on engineering ROI curves for fuzzing large code bases and specializing for different bug classes.

Highlights:

- alloy for gfql fell on its face relative to fuzzing, even with guidance. This was disappointing as it was intended as a cheap experiment to justify doing more expensive formal methods.

- prompts & skills need tuning: auto-memory doesn't transfer across harnesses by default, and one-shot auto-authored skills evals badly. More about iterating. Manual version of iterating would be editing skills when we hit new/repeat classes of bugs, though not guaranteed faithfulness: this is what we do the most. Positive experiments automating here, but not enough to invest deeper when we have to do manual anyways.

- natural language specifications are now a thing. Our significant new features now come with a security.md, policy.md, concurrency.md, etc., and important for them to be close to the code and taught to the review skill. Coding and review agents then can triangulate between tests, specs, code, and their own skills & general knowledge. However, we find we prefer not to do localized invariants in method comments as that gets verbose and drifts, and instead, do those as tests. This gets a bit into the global cost question of better code gen iterations and/or better review phases.

- staging coding vs reviewing. Overtesting early kills progress, so we stage heavier quality engineering at the end, and architectural research at the beginning.

- Lessons from the concolic execution era: staging static LLM analysis early with dynamic LLM testing later. Test amplify findings by area, kind, etc to convergence.

- We love community suites. GFQL builds against known Cypher language standards correctness conformance and benchmark suites, and Louie tools often start with community agent evals/benchmarks before we add our own specializations.

I don't know how big and deep the experiment Dan ran was. Something like formal methods is generally a big & invasive investment, and the target of each kind is often a much higher quality rating for a narrow set of properties. This complicates benchmarking setup. Imagine building entire compilers, and experimenting with different combos of methods & having those methods come in at different times & places.

I expect the AI security vulnerability analysis world to have similar findings. We end up baking that into our review harness as well without changing our overall methods above.

Re: How well do agents use test/verification techniques?

#73
post #48

Earlier quoted context omitted.

The setup is described in an earlier post linked in the second paragraph. Agents are given the zstd RFC and told to implement it, greenfield. Testing frameworks were used however the agents decided, which is to say, as mentioned repeatedly throughout the post, badly or not at all. Other factors that could conceivably affect the results can be assumed to be held constant, since the goal is to see what happens when you…

So basically "one-shot using testing methodology". I don't think that's a very effective test of an agents ability.

It's intended as a "test to see how effective agents are when guided by someone with no expertise in testing who's maybe heard that you should apply certain techniques or use certain libraries." What do you think would be a more effective test for that purpose?

Re: How well do agents use test/verification techniques?

#74

Amazing work! But deeply frustrating on the lack of reproducibility and how far off this is from a proper SDLC. How can I inspect exactly how agents were prompted? How can I reproduce this setup and try out my own AI setup? Am I missing a link to a repo somewhere? These evals probably match how many people are using AI, but its not the full package of how we know software development needs to be done, and not how I d…

As someone who also spent a bunch of time benchmarking various techniques, this is as good as you can do without publishing a formal versioned benchmark suite that you want to maintain and run forever at immense cost to yourself. If you actually go to benchmark your own flow as you mentioned, you will quickly run into like a dozen problems that discourage you from publishing. - Are you sure that temperature and other…

I am really grateful that he’s publishing as well.

I am just asking for the bare minimum to actually understand what has been tested and for reproducibility of methods- the publication of the prompts. It would take a lot less time than all the guess work analysis write up and be a lot more useful.

Without the prompts the rest of your questions about reproducibility are moot.

Re: How well do agents use test/verification techniques?

#75

nice setup for this. did any single technique clearly stand out, or did it mostly come down to the base model?

The answer is mostly "do nothing, the model will figure it out", with a side of "ask the model to check its work". This matches my experience, where the job of the engineer is mostly copy pasting requirements, letting the model do the thinking, and then manually testing the results.

[flagged]

Re: How well do agents use test/verification techniques?

#77
I have dabbled with Verus in rust. I found that if you leave the agent to its own devices it will produce a spec that just restates the existing implementation. It took a lot of work to arrive at specs that were plausibly accurate and complete statements of what the code was supposed to do.

But once you got there, Claude had no trouble proving the code satisfied the spec, and I uncovered a few interesting bugs this way.

Re: How well do agents use test/verification techniques?

#78

If I understood correctly, the author had the agent perform manual mutation testing (write code, write passing tests, manually change the code to see some tests fail, then revert the change), rather than automated mutation testing. Why not use a mutation-testing framework and consider the build failed if a certain percentage of mutations are not killed? The article claims that the agents didn’t actually use TDD or mu…

I didn't understand this part in the article. It seems advantageous to have an AI do manual mutation testing because it can actually introduce realistic bugs, like raising an exception or returning a different, known error code. Instead of the quite limited approach offered by automated frameworks that mostly just change binary operators. The whole issue with manual mutation testing is that it's slow and has to be done by hand, but with AI it's not by hand any longer and if it takes a few minutes in the background, who cares.

Re: How well do agents use test/verification techniques?

#80

Earlier quoted context omitted.

Most developers are not good at testing. That's why the role of test engineer exists. I've seen in multiple projects things like assertTrue(true). I'm sure the agent is better in testing than average enterprise developer.

big tech is moving / has moved away from the role.

Unfortunately for the users, testing has been pushed to them. You can deploy whatever slop you want - nobody cares. More lines of code!
Post reply on HN