MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / reward_fn

Function reward_fn

examples/analysis.py:183–187  ·  view source on GitHub ↗
(answer: str = None, ground_truth: Any = None)

Source from the content-addressed store, hash-verified

181 return args
182
183async def reward_fn(answer: str = None, ground_truth: Any = None):
184 _, answer = parse_agent_result(answer)
185 score = 1.0 if answer == ground_truth else 0.0
186 print(f'answer: {answer}, ground_truth: {ground_truth}')
187 return score
188
189def parse_agent_result(agent_result: Any) -> Tuple[str, Any]:
190 """

Callers

nothing calls this directly

Calls 2

printFunction · 0.85
parse_agent_resultFunction · 0.70

Tested by

no test coverage detected