HKUDS/DeepTutor · error · ValueError
Two or more choice options have the same answer ({duplicate!
Error message
Two or more choice options have the same answer ({duplicate!r}), so the learner would be shown identical choices. Retry mastery_quiz with one distinct body per option. What it means
Error "Two or more choice options have the same answer ({duplicate!r}), so the learner would be shown identical choices. Retry mastery_quiz with one distinct body per option." thrown in HKUDS/DeepTutor.
Source
Thrown at deeptutor/capabilities/mastery/tools.py:191
raise ValueError(
f"mastery_quiz.options cannot be used with question_type={question_type!r}; "
"omit options or use question_type='choice'."
)
return question_type, [], expected_answer
intended_labels = option_label_intent(options)
if intended_labels is not None and set(intended_labels) != canonical_labels(
len(intended_labels)
):
raise ValueError(
f"Choice option labels must run A, B, C… with one option each; got "
f"{intended_labels}. Retry mastery_quiz with one full body per label."
)
choice_options = parse_options(options)
duplicate = _duplicate_option_body(choice_options)
if duplicate:
raise ValueError(
f"Two or more choice options have the same answer ({duplicate!r}), so the "
"learner would be shown identical choices. Retry mastery_quiz with one "
"distinct body per option."
)
if not has_option_bodies(choice_options):
raise ValueError(
"Choice questions need full option bodies in mastery_quiz.options "
"(for example ['A: first answer', 'B: second answer']), not only "
"the labels A/B/C/D. Retry mastery_quiz with the exact option "
"descriptions you will show through ask_user."
)
normalized_bodies = {" ".join(body.split()).casefold() for body in choice_options.values()}
if len(normalized_bodies) != len(choice_options):
raise ValueError(
"Choice option bodies must be unique; retry mastery_quiz with "
"distinct answer text for every option."
)
resolved_expected = resolve_answer(expected_answer, choice_options)View on GitHub (pinned to 3e82f13042)
When it happens
Trigger: Thrown at deeptutor/capabilities/mastery/tools.py:191 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HKUDS/DeepTutor@3e82f13042 (2026-08-27).
Data as JSON: /api/errors/efbd7ed6f3994c3f.
Report an issue: GitHub.