MCPcopy Create free account
hub / github.com/Unakar/Logic-RL / format_example

Method format_example

eval_kk/kk_processor.py:154–170  ·  view source on GitHub ↗
(self, test_records, idx, model_name=None)

Source from the content-addressed store, hash-verified

152 self.no_linebreak = no_linebreak
153
154 def format_example(self, test_records, idx, model_name=None):
155
156 item = test_records[idx]
157
158 prompt = "### Question: "+item["quiz"] + "\n"
159 if self.cot:
160 if model_name in ["deepseek-ai/deepseek-math-7b-instruct", "AI-MO/NuminaMath-7B-CoT"]:
161 prompt += "Please reason step by step, and put your final answer within \\boxed{}."
162 else:
163 prompt += "### Answer: Let's think step by step. "
164 else:
165 if self.no_linebreak:
166 prompt += "### Answer:"
167 else:
168 prompt += "### Answer:\n"
169 answer = item["solution_text"]
170 return prompt, answer
171
172 def gen_test_prompt(self, ntrain, test_records, idx, model_name=None):
173 if self.cot:

Callers 1

gen_test_promptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected