mirror of
https://github.com/open-thought/reasoning-gym.git
synced 2026-04-22 16:49:06 +00:00
Constrain reward
This commit is contained in:
parent
1d0cad46f2
commit
eb708e88b3
1 changed files with 2 additions and 2 deletions
|
|
@ -127,10 +127,10 @@ int main() {{
|
|||
if entry["answer"] in answer.splitlines():
|
||||
# We can be quite confident that the correct answer was given
|
||||
# It was likely just given alongside an explanation
|
||||
return 0.9 * len(answer) / len(entry["answer"])
|
||||
return max(0.9 * len(answer) / len(entry["answer"]), 0.1)
|
||||
if entry["answer"] in answer:
|
||||
# Since answers are English words, some risk of the response coincidentally containing the answer
|
||||
return 0.5 * len(answer) / len(entry["answer"])
|
||||
return max(0.5 * len(answer) / len(entry["answer"]), 0.1)
|
||||
return 0.01
|
||||
else:
|
||||
return 1.0 # Yay
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue