diff --git a/helper/openai_interface.py b/helper/openai_interface.py index 3b332d3..de9dc1b 100644 --- a/helper/openai_interface.py +++ b/helper/openai_interface.py @@ -198,14 +198,18 @@ def calculate_section_grade_summary(section): messages = [ { "role": "user", - "content": "You are a IELTS test section grade evaluator. You will receive a IELTS test section name and the grade obtained in the section. You should offer a comment on this grade with also suggestions on how to possibly get a better grade.", + "content": "You are a IELTS test section grade evaluator. You will receive a IELTS test section name and the grade obtained in the section. You should offer a evaluation comment on this grade and separately suggestions on how to possibly get a better grade.", }, { "role": "user", "content": "Section: " + str(section['name']) + " Grade: " + str(section['grade']), }, {"role": "user", "content": "Speak in third person."}, - {"role": "user", "content": "Please save the evaluation and suggestions generated."} + {"role": "user", + "content": "Don't offer suggestions in the evaluation comment. Only in the suggestions section."}, + {"role": "user", + "content": "Your evaluation comment on the grade should enunciate the grade, be insightful, be speculative, be one paragraph long. "}, + {"role": "user", "content": "Please save the evaluation comment and suggestions generated."} ] if section['code'] == "level": @@ -213,6 +217,9 @@ def calculate_section_grade_summary(section): "role": "user", "content": "This section is comprised of multiple choice questions that measure the user's overall english level. These multiple choice questions are about knowledge on vocabulary, syntax, grammar rules, and contextual usage. The grade obtained measures the ability in these areas and english language overall." }] + elif section['code'] == "speaking": + messages[2:2] = [{"role": "user", + "content": "This section is s designed to assess the English language proficiency of individuals who want to study or work in English-speaking countries. The speaking section evaluates a candidate's ability to communicate effectively in spoken English."}] res = openai.ChatCompletion.create( model="gpt-3.5-turbo",