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

How to verify the string answer for MATH dataset? #21

Open
yuxiaooye opened this issue Jan 17, 2025 · 3 comments
Open

How to verify the string answer for MATH dataset? #21

yuxiaooye opened this issue Jan 17, 2025 · 3 comments

Comments

@yuxiaooye
Copy link
Contributor

Hi! Thanks for your awesome work!

I noticed that evaluate.py only has verify_float() for numerical answers. However, some ground truth in MATH dataset are strings like "p - q". Could you provide a verify function to handle these cases?

Thanks!

@RewindL
Copy link

RewindL commented Jan 21, 2025

I think the only way is to check whether p-q or $p$-$q$ exists in the output through re, or use a stronger LLM (might be slow and unstable). Hope there is a better way.

@yuxiaooye
Copy link
Contributor Author

I think the only way is to check whether p-q or p -$q$ exists in the output through re, or use a stronger LLM (might be slow and unstable). Hope there is a better way.

@RewindL I found the evaluation script from original repo of MATH dataset: https://github.com/hendrycks/math/blob/357963a7f5501a6c1708cf3f3fb0cdf525642761/modeling/evaluate_gpt3.py#L106
which works well!

@RewindL
Copy link

RewindL commented Jan 23, 2025

I think the only way is to check whether p-q or p -$q$ exists in the output through re, or use a stronger LLM (might be slow and unstable). Hope there is a better way.

@RewindL I found the evaluation script from original repo of MATH dataset: https://github.com/hendrycks/math/blob/357963a7f5501a6c1708cf3f3fb0cdf525642761/modeling/evaluate_gpt3.py#L106 which works well!

Wow, it is terrific. Thanks for sharing. I am recently verifying results on math too.

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

2 participants