Do you need to file an issue?
Describe the bug
Guided Learning choice questions have an inconsistent data contract between
mastery_quiz, ask_user, deterministic grading, and the Question Bank.
This causes two user-visible failures:
- Some Question Bank entries display only
A, B, C, and D, without the
corresponding option text.
- A correct card selection can be graded as wrong when
mastery_quiz stores
an option-body fragment such as Step 6 as expected_answer, while
ask_user returns the option label C.
In an affected local database, notebook_entries.options_json contained:
{"A":"A","B":"B","C":"C","D":"D"}
The matching turn_events row still contained the complete descriptions in
the ask_user arguments. In two other affected entries, the stored expected
answers were Step 4 and Step 6, while the user's correct card response was
C; both were recorded as incorrect.
Steps to reproduce
- Run DeepTutor with the Docker image and configure a model.
- Create or open a Guided Learning / Mastery Path containing a memory or
procedure knowledge point.
- Continue until the tutor generates a multiple-choice question through
mastery_quiz and presents it through ask_user.
- Answer the interactive choice card.
- Open Learning Space → Question Bank.
- For turns where the model passed
options: ["A", "B", "C", "D"] to
mastery_quiz, observe that the Question Bank has lost the option bodies.
- For turns where
expected_answer is an option-body fragment instead of a
label, select the correct label and observe that it can be graded wrong.
Expected behavior
mastery_quiz.options should persist every complete option body.
- Bare label-only option arrays should be rejected and retried.
- Choice answers should be normalized to their stable labels before
deterministic grading and Question Bank persistence.
- The Question Bank should always render the same option text shown on the
original ask_user card.
Related module
Guided Learning
Configuration used
- Docker image:
ghcr.io/hkuds/deeptutor:latest
- Guided Learning with an attached knowledge base
- Interactive questions presented through
ask_user
Additional information
Likely affected code:
deeptutor/capabilities/mastery/tools.py
deeptutor/capabilities/mastery/prompts/en/system.md
deeptutor/capabilities/mastery/prompts/zh/system.md
A fix and regression tests are ready and will be submitted in a linked PR.
Do you need to file an issue?
Describe the bug
Guided Learning choice questions have an inconsistent data contract between
mastery_quiz,ask_user, deterministic grading, and the Question Bank.This causes two user-visible failures:
A,B,C, andD, without thecorresponding option text.
mastery_quizstoresan option-body fragment such as
Step 6asexpected_answer, whileask_userreturns the option labelC.In an affected local database,
notebook_entries.options_jsoncontained:{"A":"A","B":"B","C":"C","D":"D"}The matching
turn_eventsrow still contained the complete descriptions inthe
ask_userarguments. In two other affected entries, the stored expectedanswers were
Step 4andStep 6, while the user's correct card response wasC; both were recorded as incorrect.Steps to reproduce
procedure knowledge point.
mastery_quizand presents it throughask_user.options: ["A", "B", "C", "D"]tomastery_quiz, observe that the Question Bank has lost the option bodies.expected_answeris an option-body fragment instead of alabel, select the correct label and observe that it can be graded wrong.
Expected behavior
mastery_quiz.optionsshould persist every complete option body.deterministic grading and Question Bank persistence.
original
ask_usercard.Related module
Guided Learning
Configuration used
ghcr.io/hkuds/deeptutor:latestask_userAdditional information
Likely affected code:
deeptutor/capabilities/mastery/tools.pydeeptutor/capabilities/mastery/prompts/en/system.mddeeptutor/capabilities/mastery/prompts/zh/system.mdA fix and regression tests are ready and will be submitted in a linked PR.