MCPcopy Create free account
hub / github.com/CodeGoat24/UniGenBench / build_system_prompt

Function build_system_prompt

eval/src/eval_common.py:201–225  ·  view source on GitHub ↗

Build the full system prompt for a single evaluation task.

(prompt, testpoint, test_desc, lang)

Source from the content-addressed store, hash-verified

199
200
201def build_system_prompt(prompt, testpoint, test_desc, lang):
202 """Build the full system prompt for a single evaluation task."""
203 config = LANG_CONFIGS[lang]
204 explanation_dict = config["explanation_dict"]
205
206 # Build checkpoint explanation
207 explanation = f"{config['checkpoint_header']}:\u300c"
208 for point in testpoint:
209 if point not in explanation_dict:
210 raise ValueError(f"Checkpoint '{point}' not found in {lang} explanation dict")
211 explanation += f"\n{point}: {explanation_dict[point]}"
212 explanation += "\n\u300d"
213
214 # Build checkpoint description
215 test_explanation = f"{config['checkpoint_desc_header']}:\u300c"
216 for idx, point in enumerate(testpoint):
217 test_explanation += f"\n{point}: {test_desc[idx]}"
218 test_explanation += "\n\u300d"
219
220 return config["system_prompt_template"].format(
221 prompt=prompt,
222 testpoint=testpoint,
223 explanation=explanation,
224 test_explanation=test_explanation,
225 )
226
227
228def parse_evaluation_response(text, testpoint):

Callers 2

call_evaluation_geminiFunction · 0.85
call_evaluation_vllmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected