evals icon indicating copy to clipboard operation
evals copied to clipboard

Evaluation: Counting number of characters in a random string (1% accuracy)

Open ctjlewis opened this issue 1 year ago • 3 comments

Tests the model's ability to estimate the length of random alphanumeric strings. Added examples for strings lengths 1 to 1000 chars.

Branched off of my original docs changes PR, merging should close #38.

Eval details 📑

Eval name

string-length

Description

(Foundational) Tests the model's ability to count individual characters in a random string, which most of the time will be strings it has not seen before.

What makes this a useful eval?

GPT's ability to count/recognize individual characters and map token [abc] -> [a] & [b] & [c] is relevant for tasks like suffixes/prefixes, rhyming pairs, etc.

Criteria for a good eval ✅

Below are some of the criteria we look for in a good eval. In general, we are seeking cases where the model does not do a good job despite being capable of generating a good response (note that there are some things large language models cannot do, so those would not make good evals).

Your eval should be:

  • [x] Thematically consistent: The eval should be thematically consistent. We'd like to see a number of prompts all demonstrating some particular failure mode. For example, we can create an eval on cases where the model fails to reason about the physical world.
  • [x] Contains failures where a human can do the task, but either GPT-4 or GPT-3.5-Turbo could not.
  • [x] Includes good signal around what is the right behavior. This means either a correct answer for Basic evals or the Fact Model-graded eval, or an exhaustive rubric for evaluating answers for the Criteria Model-graded eval.
  • [x] Include at least 100 high quality examples

If there is anything else that makes your eval worth including, please document it below.

Unique eval value

The error shows interesting banding patterns (from earlier investigation, with help from Will Guss):

image

image

image

Eval structure 🏗️

Your eval should

  • [x] Check that your data is in evals/registry/data/{name}
  • [x] Check that your yaml is registered at evals/registry/evals/{name}.jsonl
  • [x] Ensure you have the right to use the data you submit via this eval

(For now, we will only be approving evals that use one of the existing eval classes. You may still write custom eval classes for your own cases, and we may consider merging them in the future.)

Final checklist 👀

Submission agreement

By contributing to Evals, you are agreeing to make your evaluation logic and data under the same MIT license as this repository. You must have adequate rights to upload any data used in an Eval. OpenAI reserves the right to use this data in future service improvements to our product. Contributions to OpenAI Evals will be subject to our usual Usage Policies (https://platform.openai.com/docs/usage-policies).

  • [x] I agree that my submission will be made available under an MIT license and complies with OpenAI's usage policies.

Email address validation

If your submission is accepted, we will be granting GPT-4 access to a limited number of contributors. Access will be given to the email address associated with the merged pull request.

  • [x] I acknowledge that GPT-4 access will only be granted, if applicable, to the email address used for my merged pull request.

Limited availability acknowledgement

We know that you might be excited to contribute to OpenAI's mission, help improve our models, and gain access to GPT-4. However, due to the requirements mentioned above and high volume of submissions, we will not be able to accept all submissions and thus not grant everyone who opens a PR GPT-4 access. We know this is disappointing, but we hope to set the right expectation before you open this PR.

  • [x] I understand that opening a PR, even if it meets the requirements above, does not guarantee the PR will be merged nor GPT-4 access granted.

Submit eval

  • [x] I have filled out all required fields in the evals PR form
  • [x] (Ignore if not submitting code) I have run pip install pre-commit; pre-commit install and have verified that black, isort, and autoflake are running when I commit and push

Failure to fill out all required fields will result in the PR being closed.

Eval JSON data

Training samples generation: Source code
import fs from "fs";

const EXAMPLES_COUNT = 1000;

function random(length: number) {
  let result = '';
  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  const charactersLength = characters.length;
  let counter = 0;
  while (counter < length) {
    result += characters.charAt(Math.floor(Math.random() * charactersLength));
    counter += 1;
  }
  return result;
}

const examples: string[] = [];
for (let i = 1; i < EXAMPLES_COUNT + 1; i++) {
  const string = random(i);
  const example = `{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\\n${string}"}], "ideal": "${i}"}`;
  examples.push(example);  
}

fs.writeFileSync(
  "evals/registry/data/string_length/string_length.jsonl", 
  examples.join("\n")
);

Since we are using Git LFS, we are asking eval submitters to add in their first 100 JSONL eval lines.

View evals in JSON

Eval

{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ns"}], "ideal": "1"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nel"}], "ideal": "2"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nHe3"}], "ideal": "3"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nuhOi"}], "ideal": "4"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ntwmCg"}], "ideal": "5"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nyRhIEX"}], "ideal": "6"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nrxpX6iA"}], "ideal": "7"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nBq39WTdD"}], "ideal": "8"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nJdwlGAzAV"}], "ideal": "9"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nMHSpFrf4CW"}], "ideal": "10"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ncUvKrTRUzGK"}], "ideal": "11"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\niDYZyrO8kGkY"}], "ideal": "12"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\noWIkujs79ZN2t"}], "ideal": "13"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nxJ7aK9rtUx7yWA"}], "ideal": "14"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nBKbzkiUW0taTBjr"}], "ideal": "15"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nulZKtgKcrdDBhjGd"}], "ideal": "16"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nvzDwBF5SfZ2HFpysH"}], "ideal": "17"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n8NYtVhC3eiFYUPCsEc"}], "ideal": "18"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nqhvxlTJFx8kZ2aK09gm"}], "ideal": "19"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n07BK0OR60rdaq8cC42Qw"}], "ideal": "20"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n6iP8sj2MKQEqBWroQiUPC"}], "ideal": "21"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n2g4sptnnsKxnEAhKyerkkB"}], "ideal": "22"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nTtJWByvkrAiicCwUKwkYoo8"}], "ideal": "23"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nQbJQ6nEdOUQvSzZ1Endan5YS"}], "ideal": "24"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nugSKj29uKlW1C1jYQZ1tQOvn1"}], "ideal": "25"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ndk0fG6n4VKGNKOjLicRpmUThqa"}], "ideal": "26"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nOogErIbWN0CuhVAdLHOpxfYJM1t"}], "ideal": "27"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nNRuxmRjD3kv6RD117BIWl8hXDyE3"}], "ideal": "28"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nDjAldPr3VjbPgS34u5REhzm4EBHsq"}], "ideal": "29"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nXQcNDjJuh8KObnOVkMlIqudxL6g97l"}], "ideal": "30"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n5KrfPCDlHjelHwd9B1VC8h4AZxzcH3I"}], "ideal": "31"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nJ5tXjQNFlr7ZfhvsjNk2ndIYMqC9veFG"}], "ideal": "32"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nQ8mJ5MmrJUTaF2Skdf2SLkhr6WcG57mdG"}], "ideal": "33"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nCsa5BBfK7Q1j4t2hJR67KNaIQWL3XYJBUd"}], "ideal": "34"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nz5PBfuyYlPrNZjZdoSkiI93Le4kQO1PWBpy"}], "ideal": "35"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nC4YYJ8pylbyDmhA5SlipgTXSbKqm507pdkUM"}], "ideal": "36"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nGvBBMdYBvHDULvNP8bJcPJtLPfI7XMVpkZ5vs"}], "ideal": "37"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nSPKpT8nahFngF2DdMWz4rMB3XBO2qBinbvl8te"}], "ideal": "38"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nY8DC29rq5YvoAwjZ3Uvpsc3KnonijZNiJL4hMh4"}], "ideal": "39"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ndIe22hVUCC82tfMTGZTI75TazGeykqsxvhnzCGGc"}], "ideal": "40"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nkNa6MkiFbQwLDw8cHAwvjLcDmdqVQSm3GK0yxGs0n"}], "ideal": "41"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n6EmtatBuNuYHhBPwk8JeYPLKCxHa2ZaM5g3PqRawh8"}], "ideal": "42"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\njb7LCJicFzbiVllICMPPZ3NXq0he1OXXwmNX3M2pW2A"}], "ideal": "43"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n3qDEpCQSMOomKAfWZ2DWG3Uw1FfEkyAHLFGnYnVwoaos"}], "ideal": "44"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n7npSNiy6HR0wnM4TK72NnbPkMYcsVURFwFfctV1rjK3am"}], "ideal": "45"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n93iW31UjuZDmpZQ3zK4DwoHYElt59xF7OuCDwLAzSru9XM"}], "ideal": "46"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nmNSvsZ74yPkTFclDyhgWb8IrpPYK85gLPYdBbUHXPzOGWcR"}], "ideal": "47"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n44pHUvTpokV8RvRfSBPLcb6X8Ybf2WMAskwlPyCqphZdOFXs"}], "ideal": "48"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nHamuefVKopIkuWYDR2GtwESVEIaNwydoD8A4H10q6WqdxkVwj"}], "ideal": "49"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nNrGh0QSA82MyCHtgJZJhge8Y5VMQ1HPz5cZakFDz6zaG0m8khk"}], "ideal": "50"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nD7p8BvfRIA1IrqtGiEDA8jmZD2OeHcLRDCUjn4EE8hoWyvqKMP5"}], "ideal": "51"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n0n92hR0XAM35ydWKvNTaGk6RWY7mNizBV2b3BMldzAhFPqlJ7OcQ"}], "ideal": "52"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nU4AJ0TnMijynbDV4NpH53E5jgxqk6NvoDlM8o9QKfCQeeu30bAead"}], "ideal": "53"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nYLjzhCORauHAgcfaDRxQNV24SaGb6CDGy1Y10SiMGbFWg4JLlaNLDI"}], "ideal": "54"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\npJBELpNwNFuiSSIHbnC3nOZhtPIbsOMN1gwMwLjOnTSUAnIWKfrBDQ3"}], "ideal": "55"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n31cOoZWKnSNEDdcRQdV37Jslw3B7MAR0e8NAVWt7rO1UbXCXfiN2n4i8"}], "ideal": "56"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\njH5teWjwLwHFsWtEQ1SscbF4SxMQjrj6PD8wUBngL20Cj6QcnqJjEhxaj"}], "ideal": "57"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nvf9gVfvJmunV0ivZfrGRbZY8DI30qTZK2RvmE2Fuspz7RsQwcRSMMDG9Mf"}], "ideal": "58"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nKtHJxdBXqltVxiMM9jdaNRaR0viRGHQyb7DS9Z7UAfTPzPADZVJh60Gt4yp"}], "ideal": "59"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nKF3ivrpdyTghHVIJM3pXNTrtsgRjakL0PVi46iGiJs1vbLdl09GX3xA6Z9od"}], "ideal": "60"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nma6eW7hgyZ9ct0I09KZcnrWzZvesPObF0IRwpZlOzpG7hjrNeRKmv66DUpsuV"}], "ideal": "61"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nRN3Yh636tBCl5TAmlR3vR824HXyKR6mzOMttTIy2k5KOoWT6hYa1IwZu7WEXtX"}], "ideal": "62"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nA2quQIMszamu9kOaW0YRDjxnfweyRZGkJ2q8pfXIYC4fglGb76cCphrDSNRfQVN"}], "ideal": "63"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nqXTOq4VQZQM6an1AV1GZ8dljHaUHCh90mLcdEZXDRb4ZkJRRSGRcJX5Kr3qdMmfp"}], "ideal": "64"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n89DXfse9cvbrhRjIMQSaYalTRf7P4nqGgt0O5dMy4YZEmjKIszeymBv3VuE7XGl3S"}], "ideal": "65"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ntsa4JVXxWCy0KnVOCl3XIbSi5mBEC14aOv7L93pYgDNwVykACvBM1boQVW9hL4I1Yw"}], "ideal": "66"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nbJzrApCdxYywuiNeEZckVD1UpxDU4eFQgYQGJC3GSndbQrqLJNepk4JQUIqDQcLMzU8"}], "ideal": "67"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nLnUzvrJfhko67ijX5HHwjjKGEcHfGMVZl0BlKh6W5fGwEJyHHZGqaC5nyCBYRNHeaF5Q"}], "ideal": "68"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nJT18ztLKrSdy1S0YK1BQLQqiHzx73x8368wWIscTyBrVY7c3fUyxSvyfDesGGtJDiGbi9"}], "ideal": "69"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n3BqR7U0SGwwtyPFfbkw0AgsQvDV9AvGI4kVgJYPxW60d3jAeuLNzVJ2DVL6ctz1j2mzVSg"}], "ideal": "70"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nedMzmrmpC8Ptx7pvxoa0cw3APs1N72q9SQVxPwDing1iNZn4nmzxbxbM5DDPmtvAZNgX8Lp"}], "ideal": "71"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nvza7szVoOGdAWrSpbj2NKaAW7EyAsTaitRCmZ0Kg88WOwLJDJvIA36hfpDYtDVq9FOlNJKr3"}], "ideal": "72"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nvzEVBsexZ6CTvceGh8CUhwlyZk1QRgmkQBMsJi5z3FHnGzTaxssi19vLtIh1fRLTWHYDRBOI1"}], "ideal": "73"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ntfkXnrsafHeu9CeprTqmAjHNFlZ66uT6QoygK3aojxsNgrvMV2CuxYC8ClHWhnMQR5sNq0g5GX"}], "ideal": "74"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nrHF9g2NWjiOLkEQmjQGxX5DM7xcOF3iZCiBBsH0bSg8QiKELe00ncltsNHzjTCtgx4PNmLFFPXu"}], "ideal": "75"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ndMwYKZnNZPXbp2v5OUpPSKfv5QYcjzIUskp7UBdpAazaryciYJ5kUweCl8FXjiYYWzAgZ4OdB8oV"}], "ideal": "76"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nWfSU8lMnGC3k74vNbDqLydTm4hDaX9jYRFI1Jvt4P70Zk5zVzDqGYFTuwNNzrOPNCL6JQoJRRpcY6"}], "ideal": "77"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\njecKuUdHgtXpoZlJIRJRsQJjrFUWew26jeBEN5oGSlfStzXRiZLOiiadKgpFc3MikgH7O8rSVgrThj"}], "ideal": "78"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nwJCbE7JJDapPxevemmEUUGVzNAJuoXGUzNgEiXnPTIS1WaEGMMv5drSAYhiSgPrEl7qiSUSCVgdqtin"}], "ideal": "79"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nIRnazrotOrtLZsBszeGZGJHuVAh4XKiBgPl81rtYplNz6lz37UsYx0eyMnvTmFmC0BRTpHOtLo4RNhyy"}], "ideal": "80"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nmqaD615O7wO4Jyd8hwGPDfXdhUWelbdB8tSgy7an0FCBVfr03o3aDgPQb0pAo8y48SRh3mH8s8AEgof01"}], "ideal": "81"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n4kXSZblD7h9iz920LfzPWwUTXFa96aJa8LxavFfzkdZA2coPNdukx8wIymDdky46HBEO4iAHzC6KIITPf4"}], "ideal": "82"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nlhtR2gbibxrtvuphhSFJWMV81EXhsvownveNMgBMVkBCjzJid846De7Q0hQJ2HnUVEmTTxu3k82GIEjY04g"}], "ideal": "83"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nApDloJxSiJiR3Vg0cZ9ly3W7Xm3hLg0Eva372n4PY5crneBfutsiZ7VGxIDhtjnYhzYo8XbaoBALnQ5knjIa"}], "ideal": "84"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n3MXWFnNU9z4BBTrcU5CVIzjNtx5O0jc7oTgzgMYe4raTdidpzjk8V2tEXd03Gx51zp883JYvm05dHEwWVW5cF"}], "ideal": "85"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nnPTjB5k1OkEd7a87q2nryn1FkDSNPSZrXJBZDwvtetwyQjo3ZyPA2CbtjBnWvmnTZX5zwfF8TWiX6XPAxWImYc"}], "ideal": "86"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\n06bWxuqnUnpLM1gOsSnGXAha25F656twtNbVbe20qGtoSXKXQ1wsgFEiqAZfgA2Z2O6lejlXpzj9obVmfcBzEb7"}], "ideal": "87"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\niNnMglT4BWlSn1P3oIXSBrNKaFd0Pg8qiUfMgqNByA0QBlebsfD1ueRBTkT1OysIYoCJozoFhn6KF7iW2PEtfUQ4"}], "ideal": "88"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nln7JCwGfsuiwHLTqcRPOyxGAMjpWDL5MkfYsMtZGI1s3rQQ2JmB3U2jeNXqru18IurbPhrvLJa3ShPc7e78FovWxG"}], "ideal": "89"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nId2gyzoNO5klBqBm420li6otfBxQZPHUUu08bJwMyptW11Yh2MXLRQVrJEffzi0h7Xfvh3jGUV77U3G1lO085xKrMt"}], "ideal": "90"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ndLAOS7fqelQh0XmHy9HHHWsZQxlbzeHIUE4xFERK18jpglBnL5eWGJkOxFZSXTrjO8inLIA1RGgKNcAwikNLPtKVbQo"}], "ideal": "91"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\ni3zEsNwuuGnJJgwbZnlpo7wX4AlCDVZk0Qn7upJbUFqbOAjWGQcWfYZtDbIMAnexj1x9FKZ20MaR5ysL8KbznFz9Ffnw"}], "ideal": "92"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nWjkY2aDoxxSu17jrWQZLOhSSQShNU03AU1wLcgRXLyunyU6hH2CmmlDMtTf3uPnk2nH1DURG8u7LBTepfQMUvSr9S9NCI"}], "ideal": "93"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nQlRu8wsGPXRF2gveGdtYU46EZ4dkCZpKsjS8pCpUY06rY1vQ5Z4Pc4MNT9ffeugL60oNentogaVhaRJxh8BHTqMR4z1Hqm"}], "ideal": "94"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nRSSfD8OJkFWL1MLwMbRHlqJDRmLcIejp1CCBM24yxu6qWhfdCn4zT733RfwEqmQcmAnoYn2sajcxlNGhJHHjuioq2jzHeHu"}], "ideal": "95"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nbXOUFC2GBdrvnUJkHutvHqb145pJh9poTb79W33c5HFwYauQo3KxnGPaUnBPWevFs4356ETzd3RfyaeHsTSk9uROPB48717F"}], "ideal": "96"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nsydd1t08Sy28EZR8b72RIlxTfAKD0vNvC0dm2dHCpKWm8qCEUxc4vnOe1YNszGSgibSiNGnpDuSETaYYPyj3SJLPaNvuIzgOq"}], "ideal": "97"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nlgd1JpzKURg60TXViF6AYaPOcagHLdRYaKTOclz6UQGciIBXoiZSfJEaThoOm50gHwqwNfNrHYaB4gn7CWdYCmNCG5hw4mlaxp"}], "ideal": "98"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nMAQgaWwcWtfHtacj4YqgNSWAQumEOIkw3r214hIdr1LHrFpOnGiEPoXePxULrKuoQUdhsFPJLWEp9HExn5f1q8oDFeww1u6cxha"}], "ideal": "99"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "How many characters are in the string on the next line? Only write a number.\nDUsiANrS2HfepOC0m3eF7mkZ7UxibBqOlE5ZeAp6eLL7UM6ItKClwDesRk8RxnT6O5mat1S9SUKwEGfvOtDOCsbAADSXmR87yZRF"}], "ideal": "100"}

ctjlewis avatar Mar 14 '23 21:03 ctjlewis

cc @logankilpatrick @andrew-openai

ctjlewis avatar Mar 15 '23 07:03 ctjlewis

Should perform very poorly even for GPT-4, training sample ranges from n=1 to 1000:

$ oaieval gpt-3.5-turbo string-length --max_samples 100
[2023-03-15 02:16:14,355] [registry.py:145] Loading registry from /Users/lewis/Development/gptlabs/evals/evals/registry/evals
[2023-03-15 02:16:14,370] [registry.py:145] Loading registry from /Users/lewis/.evals/evals
[2023-03-15 02:16:15,251] [oaieval.py:178] Run started: 230315071615POGGVA2W
[2023-03-15 02:16:15,255] [eval.py:30] Evaluating 100 samples
[2023-03-15 02:16:15,286] [eval.py:136] Running in threaded mode with 10 threads!
 97%|███████████████████████████████████████████████████████████████████████████████████████████▏  | 97/100 [00:08<00:01,  2.76it/s][2023-03-15 02:16:25,406] [record.py:309] Logged 295 rows of events to /tmp/evallogs/230315071615POGGVA2W_gpt-3.5-turbo_string-length.jsonl: insert_time=15.776ms
100%|█████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:13<00:00,  7.69it/s]
[2023-03-15 02:16:28,332] [record.py:320] Final report: {'accuracy': 0.01}. Logged to /tmp/evallogs/230315071615POGGVA2W_gpt-3.5-turbo_string-length.jsonl
[2023-03-15 02:16:28,333] [oaieval.py:209] Final report:
[2023-03-15 02:16:28,333] [oaieval.py:211] accuracy: 0.01

ctjlewis avatar Mar 15 '23 07:03 ctjlewis

@andrew-openai This PR is being neglected given model performance with character counting for n > 100 or so.

ctjlewis avatar Mar 21 '23 20:03 ctjlewis

Huge improvement!

jleonard-r7 avatar Mar 28 '23 01:03 jleonard-r7

Thanks for opening this PR, Character-level reasoning and operations are a well-known failure mode of the model due to a common underlying issue in LLMs. In its current form, this eval does not seem to expose any new gaps in our understanding of model performance. We also know that this could be solved by giving the model a code interpreter. Model very well knows how to write code to solve this problem, and that code can be fed to the code interpreter to get the correct answer.

If you're still interested in writing an eval, we've noticed that these criteria make good evals. If you have any particular use case in mind for the model, can you come up with an eval that has some of these attributes?

  • Multi-step reasoning
  • Domain or Application specific
  • Open-Ended responses
  • Complex instructions
  • The eval seems obvious but tricks the model in a novel way

Closing this PR, please open another PR with the provided suggestions.

usama-openai avatar May 19 '23 21:05 usama-openai

@usama-openai It doesn't expose anything new, it just benchmarks the model's performance on this task.

Closing is a mistake but this repo is run very poorly so I'm not surprised.

ctjlewis avatar May 19 '23 23:05 ctjlewis