MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / is_correct

Function is_correct

eval_general/eval_gsm8k_tgi.py:149–152  ·  view source on GitHub ↗
(completion, answer)

Source from the content-addressed store, hash-verified

147
148
149def is_correct(completion, answer):
150 gold = extract_answer_hf(answer)
151 assert gold != INVALID_ANS, "No ground truth answer found in the document."
152 return extract_answer(completion) == gold
153
154
155if __name__ == '__main__':

Callers 1

process_docFunction · 0.85

Calls 2

extract_answer_hfFunction · 0.85
extract_answerFunction · 0.85

Tested by

no test coverage detected