Improve generated level tests quality.
This commit is contained in:
@@ -670,7 +670,9 @@ def gen_write_blanks_form_exercise_listening_monologue(text: str, quantity: int,
|
||||
|
||||
def gen_multiple_choice_level(quantity: int, start_id=1):
|
||||
gen_multiple_choice_for_text = "Generate " + str(
|
||||
quantity) + " multiple choice questions of 4 options for an english level exam"
|
||||
quantity) + " multiple choice questions of 4 options for an english level exam, 7 easy questions, 8 intermediate " \
|
||||
"questions and 10 advanced questions. Ensure that the questions cover a range of topics such as " \
|
||||
"verb tense, subject-verb agreement, pronoun usage, sentence structure, and punctuation."
|
||||
token_count = count_tokens(gen_multiple_choice_for_text)["n_tokens"] - 300
|
||||
mc_questions = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, gen_multiple_choice_for_text, token_count,
|
||||
None,
|
||||
@@ -698,7 +700,7 @@ def gen_multiple_choice_level(quantity: int, start_id=1):
|
||||
"\"prompt\": \"Which of the following is a conjunction?\", " \
|
||||
"\"solution\": \"A\", \"variant\": \"text\"}]}. " \
|
||||
"\nThe questions: '" + '13' + split_mc_questions[1] + "'"
|
||||
token_count = count_tokens(parse_mc_questions, model_name="gpt-3.5-turbo-instruct")["n_tokens"]
|
||||
token_count = count_tokens(parse_mc_questions, model_name=GPT_3_5_TURBO_INSTRUCT)["n_tokens"]
|
||||
question_2 = make_openai_instruct_call(GPT_3_5_TURBO_INSTRUCT, parse_mc_questions, token_count,
|
||||
["questions"],
|
||||
GEN_QUESTION_TEMPERATURE)
|
||||
|
||||
Reference in New Issue
Block a user