chore: import upstream snapshot with attribution
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:21:23 +08:00
commit b957a53def
5423 changed files with 863745 additions and 0 deletions
@@ -0,0 +1,32 @@
# Copyright (c) Microsoft. All rights reserved.
def formatted_system_message(subject: str):
"""Return a formatted system message."""
return f"""
You are an expert in {subject}. You answer multiple choice questions on this topic.
"""
def formatted_question(question: str, answer_a: str, answer_b: str, answer_c: str, answer_d: str):
"""Return a formatted question."""
return f"""
Question: {question}
Which of the following answers is correct?
A. {answer_a}
B. {answer_b}
C. {answer_c}
D. {answer_d}
State ONLY the letter corresponding to the correct answer without any additional text.
"""
def expected_answer_to_letter(answer: str):
"""Return the letter corresponding to the expected answer.
The dataset contains numbers as answers, this function converts them to letters.
"""
return ["A", "B", "C", "D"][int(answer)]