Skip to content

Commit e2c5dee

Browse files
committed
changed prompt to add which categories they need to improve upon
1 parent 258a562 commit e2c5dee

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

backend/Predict/ChatGPT_predict.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ def construct_prompt(course_data):
4545
prompt_lines.append(
4646
"Based on these details, predict the student's final grade. "
4747
"Output exactly in JSON format with two keys: 'grade' (a numeric value) "
48-
"and 'reasoning' (a short explanation). Do not include extra text."
48+
"and 'reasoning' (a short explanation that includes which categories "
49+
"the student is performing well in, which they are not, and specific "
50+
"actions they could take to improve their standing). Do not include extra text."
4951
)
5052

5153
return "\n".join(prompt_lines)
5254

5355
def get_chatgpt_prediction(prompt):
5456
"""Call the OpenAI API to get a prediction."""
5557
response = openai.ChatCompletion.create(
56-
model="gpt-3.5-turbo",
58+
model="gpt-4o mini",
5759
messages=[
5860
{"role": "system", "content": "You are a concise academic advisor."},
5961
{"role": "user", "content": prompt}

0 commit comments

Comments
 (0)