memphis-iis / mofacts

8 stars 1 forks source link

Adaptive Question Routing #1446

Closed JRustyHaner closed 4 months ago

JRustyHaner commented 6 months ago

We need a new spec to manipulate question logic so that we can create adaptive stimuli sets or orders

U#Q# - Question of a specific unit Q# - Question of the current unit U# - Specific Unit

Example Cases / Proposed Language

If Question 1 is answered wrong, participant must answer question 2. IF NOT Q1 THEN Q2

If Question 1 and 2 are answered correctly, participant must answer 3 and 4 IF NOT (Q1, Q2) THEN (Q3, Q4)

If Question 1 is answered correctly but not Question 2, participant must answer Question 5 IF NOT Q1 AND Q2 THEN Q5

If Question 4 is not answered correct, then Unit 3 IF NOT Q4 THEN U3

If Unit 1 Question 3 is not answered correctly, then Unit 4 IF NOT(U1Q3) THEN U4

This way, the question set is built as the participant goes along.

imrryr commented 6 months ago

fascinating. To make a spec we need a specific use case it seems @shelbik37 I would like to help if possible since this seems like something I might use.

JRustyHaner commented 6 months ago

@imrryr I don't see why not. The point of it is to allow for adaptive learning structures based off of correct answers. Of course, it could be easily expanded to say IF probability > .7 THEN U3 to move a participant to unit 3 if their current questions probability is above 70%.

JRustyHaner commented 6 months ago

1448 for the beginnings of the code by the way.

imrryr commented 6 months ago

OK, no. I meant to use it as you specified. A learning session can already pass control as needed, so sensitivity to p is not needed. I think I need to see how this is used to help, though, and I really think a couple of examples with more detail than above are needed. I think this is a really hard project actually. Do you plan to construct schedules dynamically? Or will the logic provide the current trial only like the learning session? Will this be a new unit type? I guess not, but if not, it has to play nice with other session types, and that means different things for learning, assessment and video types... I assume the video type is a version of the assessment type, so maybe logic should be an option only for these two unit types....

JRustyHaner commented 6 months ago

@imrryr I don't have any plans for that, but it could be a use case if someone wanted it. This isn't a new unit, it will just add the ability to create a schedule dynamically. The code in the branch only translates those IF THEN statements to javascript and returns an array of objects that show the output unit(s) and question(s). Example: IF NOT (Q1, Q2) THEN (U2Q4, U3Q5)

IF NOT (Q1, Q2) true: when evaluated as true for Q1 and Q2 will return [{unit:2 , question4},{unit:3, question 5}]. From there it can be added to a schedule, or selected in selectcard, or wherever it's called. false: returns false, does nothing.

It could be easily expanded (if needed) to: IF ResponseTime > 5 THEN U2Q3 true: when evaluated true where the response time is greater that 5, then it will return [{unit:2, question:3}]. false: just returns false, does nothing.

I could personally see use cases for that. Or even for probabilities. If a probability of correctness goes below .25, for example, queue this question it for a new schedule unit, which is a review or knowledge check.

shelbik37 commented 6 months ago

@imrryr, @MegaGeese, and @JRustyHaner

Phil, I was planning on making a separate meeting with Rusty and August to go over the TDF specs (and anything else) that needs to be done for this work but we could actually just do it in our typical Wed development meetings, since you might use this feature as well - as long as that's okay with you? I didn't want to take too much time in our weekly meeting, but it sounds like this will be really relevant/useful for you as well, so might indeed be worth doing together in development meetings. If that makes sense to everyone, then no need to schedule an additional meeting :)

imrryr commented 6 months ago

Yes, please, let's discuss this in Wednesday meetings. I want to make sure it is well integrated with current functionality. This will make code maintenance and use easier

JRustyHaner commented 6 months ago

@imrryr @MegaGeese @shelbik37

We are most of the way done with this, currently the new functionality:

For video units -Adaptive question sets within a video unit. -Adaptive question sets to build a new unit at a specified unit number

Since this is modular, it can work for non video units as well, pending implementation.

I need to talk with @MegaGeese on something. The new unit is successfully built in case 2, but the unit engine sees the stimuli but doesn't select them, saying the unit is finished.