Vidar

Vidar

How to measure AI code quality?

I’ve been trying to come up with a fairly real life representative way of evaluating code quality from AI, and by extension the functionality of skills and their setup, and the code checking utilities used.

Ideally there would be perfect real life scope code examples along with the prompts that should make them. And a variety for different problem spaces to make sure it is widely applicable. One could then setup a loop using the ideal prompts where

  1. The planning and implementing skills act according to the prompt.
  2. The review tools and review skill telling the plan and implementing skills what needs improvement in order to get closer to the code ideal.
  3. If/ when the planning and implementation skills get closer than the review tools can actively instruct then the review tools and skill should improve. Given the non-deterministic somewhat noisy nature of LLMs this cycle should gradually evolve towards the better.

Alas, for lack of real life scale ideal code examples with ideal prompts the best I have found so far is the Real Life Conduit which is a medium clone setup. It is just one data point, but it will give a certain objective feedback as it is fully external, made for testing purposes, and can tested online against their live API.

So that is the current plan. Give a short prompt without much technical guidance, and let Claude sort it out or fail horribly. To what extent will be some kind of metric I suppose? So I’m thinking: 1. Going blind 1 shot from the prompt and directly to test against the API. 2. Going blind 1 shot, but before testing against the API use code review tools and the review skills and have Claude ‘use tools and review skill and fix any and all issues’. And then test.

I think it is also interesting to repeat that with Claude on lower thinking modes. Given enough skills guidance, and or with automated code check and fix after, maybe a lower level thinking or lower level model will be make quality output? In that case good skills and review tools would be cost and token saving, which I would appreciate a lot.

Anyway, ideas for good functional metrics are welcome?

Most Liked

jdiago

jdiago

Code quality is code quality. Doesn’t matter who or what wrote it.

dimitarvp

dimitarvp

I have zero idea but – really good question.

I’d start with “less coding lines”. LLMs are master bullsh1tters and will spit out 1000 lines of code when I, given the time, can very likely write 250 and even have the code be more understandable and nicer to work with.

mudasobwa

mudasobwa

Creator of Cure

Validating the quality of the code, produced by the very sophisticated code completion tool with another code completion tool always looked silly to me. That’s why I extensively developed static code analysis and linter tools in the last several month.

Additional credo checks helped me to catch stuff several times → OeditusCredo v0.8.1 — Documentation

Literally last week I caught and broke the huge compile-connected mega-cycle (459 nodes) with Ragex.

Old good static analysis works with the code on the level, LLM could never ever achieve, that’s why.

Where Next?

Popular in AI / LLMs Top

mayel
You describe a function. An LLM hallucinates it. The BEAM compiles and runs it live in your runtime with no restart, no compile step, no ...
#ai
New
shreya_tech
Lately, it feels like every new repo is an “Autonomous Agent.” While the idea of an AI that “figures it out” is cool, I’m finding that fo...
New
samoloth
Hi, recently I’ve discovered Matt Pocock’s skills for AI agents. They look extremely reasonable, especially after hearing his explanation...
New
Cheezy
I am using Claude Remote Control for the first time this morning. AMAZING! I’m running one remote session on my iPad while running anothe...
New
Vidar
So in case others find them useful here are 3 of the skills I use. They work pretty well together. Avoid Claude starting agents to plan a...
New
asianfilm
For those who haven’t seen it, here is a research paper from August that found that LLMs perform twice as well with Elixir than with Pyth...
New
Cheezy
I spent the month of January building and refining a tool to help with Team / AI collaboration. Several friends have provided feedback an...
New
FlyingNoodle
Hi all I have been doing some pretty intensive research over the last few days around agents/vibe coding. I tried some commercial offeri...
New
AstonJ
Inspired by @jdiago’s post containing this slide: I thought it would be interesting discussing what independent languages like Elixir...
#ai
New
DaAnalyst
The new langauge/framework/library.. developers better start writing very exhaustive docs, ..and intent proving tests/examples, ..and int...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 47930 226
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

We're in Beta

About us Mission Statement