Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -836,16 +836,13 @@ def generate_question(subject, difficulty, question_type, subtopic=None, use_enh
|
|
836 |
difficulty_params = get_difficulty_parameters(difficulty)
|
837 |
problem_type_addition = get_problem_type_addition(question_type)
|
838 |
|
839 |
-
system_prompt = f"""
|
840 |
STRICT REQUIREMENTS:
|
841 |
-
1.
|
842 |
-
- A question where any part of the solution must resort to numerical methods is invalid.
|
843 |
-
- Begin the output with the text "Here is a test question that is a {question_type} question on {subject} covering {selected_topic}."
|
844 |
2. Difficulty Level Guidelines:
|
845 |
{difficulty_params['description'].upper()}
|
846 |
Follow these specific constraints:
|
847 |
{chr(10).join(f' - {c}' for c in difficulty_params['constraints'])}
|
848 |
-
|
849 |
{problem_type_addition}
|
850 |
3. Style Reference:
|
851 |
Question should be {difficulty_params['example_style']}
|
@@ -978,10 +975,10 @@ make sure the question is CLEAR about what regions you intend to be included in
|
|
978 |
message = anthropic.messages.create(
|
979 |
model=difficulty_params['model'],
|
980 |
max_tokens=4096,
|
981 |
-
temperature=0.
|
982 |
messages=[{
|
983 |
-
"role": "
|
984 |
-
"content": f"{system_prompt}
|
985 |
}]
|
986 |
)
|
987 |
|
|
|
836 |
difficulty_params = get_difficulty_parameters(difficulty)
|
837 |
problem_type_addition = get_problem_type_addition(question_type)
|
838 |
|
839 |
+
system_prompt = f"""Write exactly one {question_type} exam question on {subject} covering {selected_topic} that can be solved analytically, without numerical methods.
|
840 |
STRICT REQUIREMENTS:
|
841 |
+
1. Begin the output with the text "Here is a test question that is a {question_type} question on {subject} covering {selected_topic}."
|
|
|
|
|
842 |
2. Difficulty Level Guidelines:
|
843 |
{difficulty_params['description'].upper()}
|
844 |
Follow these specific constraints:
|
845 |
{chr(10).join(f' - {c}' for c in difficulty_params['constraints'])}
|
|
|
846 |
{problem_type_addition}
|
847 |
3. Style Reference:
|
848 |
Question should be {difficulty_params['example_style']}
|
|
|
975 |
message = anthropic.messages.create(
|
976 |
model=difficulty_params['model'],
|
977 |
max_tokens=4096,
|
978 |
+
temperature=0.9,
|
979 |
messages=[{
|
980 |
+
"role": "You are a mathematics professor",
|
981 |
+
"content": f"{system_prompt}"
|
982 |
}]
|
983 |
)
|
984 |
|