Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models that write multiple functions in return to misnamed prompts are treated unfairly #14

Open
the-crypt-keeper opened this issue Jun 8, 2023 · 0 comments

Comments

@the-crypt-keeper
Copy link
Owner

the-crypt-keeper commented Jun 8, 2023

Considering the following response from WizardLM 13b:


Sure! Here's an example JavaScript function fofx that takes in two numbers as arguments (x and banana) and returns their greatest common divisor using Euclid's algorithm:

function gcd(a, b) {
  if (b === 0) return a; // base case for when b is zero
  return gcd(b, a % b); // recursive call until b becomes zero
}

function fofx(x, banana) {
  const result = gcd(x, banana);
  console.log(`The GCD of ${x} and ${banana} is ${result}.`);
  return result;
}

With the current extract_function_info we'd get two functions output, but sandbox.py only ever looks at the first one so it would see gcd(a,b) as the entrypoint and fail 3 of the tests because both the function and arguments are named incorrectly - but this is clearly unfair since it did generate the correct function, and it did name the arguments correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant