Comment by elevation
5 hours ago
Yesterday I generated a for-home-use-only PHP app over the weekend with a popular cli LLM product. The app met all my requirements, but the generated code was mixed. It correctly used a prepared query to avoid SQL injection. But then, instead of an obvious:
"SELECT * FROM table WHERE id=1;"
it gave me:
$result = $db->query("SELECT * FROM table;");
for ($row in $result)
if ($["id"] == 1)
return $row;
With additional prompting I arrived at code I was comfortable deploying, but this kind of flaw cuts into the total time-savings.
No comments yet
Contribute on Hacker News ↗