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

Add pattern identification task. #71

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

jasonwei20
Copy link
Collaborator

@jasonwei20 jasonwei20 commented Mar 15, 2023

Eval details πŸ“‘

Eval name

Pattern identification

Eval description

Given eight examples of inputs and outputs, the model must figure out what the task is. Example:

Figure out the pattern in the below examples, and then answer with just "foo" or "bar".
(f, [o, z, a, n, g, e, j, f, i, c, l, u, b]) -> foo
(l, [v, u, f, b, m, y, j, h, n, c, d, a, p]) -> bar
(p, [c, e, s, h, q, o, a, t, k, d, n, l, z]) -> bar
(p, [c, h, m, z, d, v, k, l, j, e, x, p, n]) -> foo
(y, [e, u, v, z, c, q, s, a, f, o, l, p, d]) -> bar
(u, [x, e, n, t, v, o, g, c, d, y, r, j, l]) -> bar
(m, [l, n, k, e, h, i, c, v, r, j, a, y, o]) -> bar
(v, [j, g, q, t, x, y, m, z, b, h, p, u, r]) -> bar
(u, [d, a, x, i, h, v, e, z, r, c, n, y, o]) ->

The pattern here is to return foo if the target letter is in the list, and bar otherwise.
It's the same pattern for all examples.
Correct answer for this particular example is bar because u is not in the list.

What makes this a useful eval?

The biggest failure case of language models super far is reasoning.
Reasoning means that the language model is not relying on surface level correlations, and does true symbolic manipulations.
So far, a majority of existing tasks are phrased in natural language, so they don't test the ability for language models to actually reason.
The above task is easy for humans but language models still fail.
This task tests the ability for the model to do true pattern identification in-context.

GPT-4 beats gpt-3.5-turbo but is not enough. Here are the results from my run:

Random baseline: 50%
gpt-3.5-turbo: 48%
gpt-4: 64.8%

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:

  • 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.
  • Contains failures where a human can do the task, but either GPT-4 or GPT-3.5-Turbo could not.
  • 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.
  • Include at least 100 high quality examples (it is okay to only contribute 5-10 meaningful examples and have us test them with GPT-4 before adding all 100)

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

Unique eval value

See the section "What makes this a useful eval?"

Eval structure πŸ—οΈ

Your eval should

  • Check that your data is in evals/registry/data/{name}
  • Check that your yaml is registered at evals/registry/evals/{name}.jsonl
  • 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).

  • 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.

  • 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.

  • 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

  • I have filled out all required fields in the evals PR form
  • (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

Since we are using Git LFS, we are asking eval submitters to add in as many Eval Samples (at least 5) from their contribution here:

View evals in JSON

Eval

{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Figure out the pattern in the below examples, and then answer with just \"foo\" or \"bar\".\n(f, [o, z, a, n, g, e, j, f, i, c, l, u, b]) -> foo\n(l, [v, u, f, b, m, y, j, h, n, c, d, a, p]) -> bar\n(p, [c, e, s, h, q, o, a, t, k, d, n, l, z]) -> bar\n(p, [c, h, m, z, d, v, k, l, j, e, x, p, n]) -> foo\n(y, [e, u, v, z, c, q, s, a, f, o, l, p, d]) -> bar\n(u, [x, e, n, t, v, o, g, c, d, y, r, j, l]) -> bar\n(m, [l, n, k, e, h, i, c, v, r, j, a, y, o]) -> bar\n(v, [j, g, q, t, x, y, m, z, b, h, p, u, r]) -> bar\n(u, [d, a, x, i, h, v, e, z, r, c, n, y, o]) ->"}], "ideal": "bar"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Figure out the pattern in the below examples, and then answer with just \"foo\" or \"bar\".\n(h, [p, u, t, c, q, a, l, k, e, m, n, f, i]) -> bar\n(v, [f, y, p, c, a, s, w, v, i, g, b, o, u]) -> foo\n(z, [m, q, j, u, y, n, w, z, c, e, i, b, v]) -> foo\n(c, [q, g, e, r, k, m, s, c, j, n, h, a, d]) -> foo\n(c, [n, d, o, t, w, b, j, f, y, a, e, l, q]) -> bar\n(f, [p, l, q, x, i, f, y, e, v, d, a, u, m]) -> foo\n(n, [i, q, c, z, s, u, x, p, o, y, l, a, h]) -> bar\n(s, [f, l, z, i, d, s, v, h, q, a, b, n, o]) -> foo\n(c, [g, h, q, t, a, r, z, u, n, y, o, j, e]) ->"}], "ideal": "bar"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Figure out the pattern in the below examples, and then answer with just \"foo\" or \"bar\".\n(a, [h, b, p, l, m, e, f, y, r, n, z, t, d]) -> bar\n(n, [x, k, i, c, s, l, d, q, b, f, h, m, z]) -> bar\n(b, [m, c, o, j, w, k, y, r, x, a, l, d, e]) -> bar\n(s, [z, j, x, t, h, o, l, s, p, g, v, c, a]) -> foo\n(n, [a, h, r, l, u, z, k, v, m, j, d, p, i]) -> bar\n(h, [n, p, b, e, i, c, x, h, q, z, l, s, y]) -> foo\n(c, [s, d, q, e, u, m, c, z, b, n, w, y, p]) -> foo\n(i, [k, m, w, z, x, o, i, h, c, g, e, y, u]) -> foo\n(z, [a, y, f, w, n, k, i, e, g, u, d, b, r]) ->"}], "ideal": "bar"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Figure out the pattern in the below examples, and then answer with just \"foo\" or \"bar\".\n(s, [d, e, z, f, o, v, k, n, x, l, g, h, y]) -> bar\n(o, [i, d, c, f, v, j, t, b, g, k, e, s, l]) -> bar\n(h, [l, m, q, b, v, j, i, f, a, y, o, t, z]) -> bar\n(r, [h, d, o, y, e, w, a, b, z, v, g, n, p]) -> bar\n(l, [v, u, y, c, s, z, i, w, a, x, g, o, k]) -> bar\n(o, [z, e, c, k, d, b, o, u, f, n, m, h, a]) -> foo\n(m, [v, n, f, l, g, x, i, t, o, e, b, j, r]) -> bar\n(t, [h, u, j, p, n, r, w, b, c, i, m, y, g]) -> bar\n(d, [l, z, t, i, b, o, r, d, m, c, j, n, k]) ->"}], "ideal": "foo"}
{"input": [{"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Figure out the pattern in the below examples, and then answer with just \"foo\" or \"bar\".\n(g, [u, q, h, z, r, a, m, l, p, v, s, o, j]) -> bar\n(q, [k, m, i, f, a, z, t, h, v, x, b, y, s]) -> bar\n(q, [l, y, s, h, f, d, w, t, i, b, x, j, n]) -> bar\n(z, [m, l, f, x, h, s, k, y, a, u, e, j, d]) -> bar\n(z, [p, r, j, f, z, b, c, u, h, y, a, i, q]) -> foo\n(a, [k, t, g, e, z, f, v, b, a, w, q, m, s]) -> foo\n(q, [l, c, z, w, v, m, s, d, k, j, r, y, o]) -> bar\n(x, [n, u, p, y, k, f, r, l, h, w, m, e, s]) -> bar\n(t, [l, s, g, w, c, b, h, j, v, t, d, x, e]) ->"}], "ideal": "foo"}

Copy link
Contributor

@andrew-openai andrew-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move evals/registry/data/pattern_identification/samples.v0.jsonl to git-lfs (might need to git lfs install) then LGTM

@@ -4,18 +4,6 @@ This document walks through the end-to-end process for building an eval, which i

The steps in this process are building your dataset, registering a new eval with your dataset, and running your eval. Crucially, we assume that you are using an [existing eval template](eval-templates.md) out of the box (if that's not the case, see [this example of building a custom eval](custom-eval.md)). If you are interested in contributing your eval publically, we also include some criteria at the bottom for what we think makes an interesting eval.

We are looking for evals in the following categories:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not remove this list or maybe it's better in PULL_REQUEST_TEMPLATE.md

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oops, didn't mean to. Looks like I messed up the versioning.

@andrew-openai andrew-openai self-requested a review March 16, 2023 17:51
Copy link
Contributor

@andrew-openai andrew-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Will merge.

@andrew-openai andrew-openai merged commit 86401fc into openai:main Mar 16, 2023
Linmj-Judy pushed a commit to TablewareBox/evals that referenced this pull request Feb 27, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants