{"record":{"id":"efbd7ed6f3994c3f","repo":"HKUDS/DeepTutor","slug":"two-or-more-choice-options-have-the-same-answer","errorCode":null,"errorMessage":"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.","messagePattern":"Two or more choice options have the same answer \\((.+?)\\), so the learner would be shown identical choices\\. Retry mastery_quiz with one distinct body per option\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"deeptutor/capabilities/mastery/tools.py","lineNumber":191,"sourceCode":"            raise ValueError(\n                f\"mastery_quiz.options cannot be used with question_type={question_type!r}; \"\n                \"omit options or use question_type='choice'.\"\n            )\n        return question_type, [], expected_answer\n\n    intended_labels = option_label_intent(options)\n    if intended_labels is not None and set(intended_labels) != canonical_labels(\n        len(intended_labels)\n    ):\n        raise ValueError(\n            f\"Choice option labels must run A, B, C… with one option each; got \"\n            f\"{intended_labels}. Retry mastery_quiz with one full body per label.\"\n        )\n\n    choice_options = parse_options(options)\n    duplicate = _duplicate_option_body(choice_options)\n    if duplicate:\n        raise ValueError(\n            f\"Two or more choice options have the same answer ({duplicate!r}), so the \"\n            \"learner would be shown identical choices. Retry mastery_quiz with one \"\n            \"distinct body per option.\"\n        )\n    if not has_option_bodies(choice_options):\n        raise ValueError(\n            \"Choice questions need full option bodies in mastery_quiz.options \"\n            \"(for example ['A: first answer', 'B: second answer']), not only \"\n            \"the labels A/B/C/D. Retry mastery_quiz with the exact option \"\n            \"descriptions you will show through ask_user.\"\n        )\n    normalized_bodies = {\" \".join(body.split()).casefold() for body in choice_options.values()}\n    if len(normalized_bodies) != len(choice_options):\n        raise ValueError(\n            \"Choice option bodies must be unique; retry mastery_quiz with \"\n            \"distinct answer text for every option.\"\n        )\n    resolved_expected = resolve_answer(expected_answer, choice_options)","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/HKUDS/DeepTutor/blob/3e82f130422a813cdd73c10b21a44e9325f5821a/deeptutor/capabilities/mastery/tools.py#L173-L209","documentation":"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.","triggerScenarios":"Thrown at deeptutor/capabilities/mastery/tools.py:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e82f130422a813cdd73c10b21a44e9325f5821a","analyzedAt":"2026-08-27T06:57:25.364Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}