Mituvinci commited on
Commit
915e799
·
1 Parent(s): 724cc79

Fix MIN_QUESTIONS=3 to be consistent with MAX_QUESTIONS=5

Browse files
Files changed (1) hide show
  1. src/graph/edges.py +6 -1
src/graph/edges.py CHANGED
@@ -2,7 +2,8 @@ from src.graph.state import StudyState
2
 
3
 
4
  MASTERY_THRESHOLD = 0.75
5
- MIN_QUESTIONS = 10
 
6
  MAX_REREAD_CYCLES = 3
7
 
8
 
@@ -11,6 +12,10 @@ def after_evaluate(state: StudyState) -> str:
11
  questions_asked = state["questions_asked"]
12
  weak_chunks = state.get("weak_chunks", [])
13
 
 
 
 
 
14
  # If score is below threshold and we haven't exceeded reread limit
15
  if score < MASTERY_THRESHOLD and len(weak_chunks) <= MAX_REREAD_CYCLES:
16
  return "reread"
 
2
 
3
 
4
  MASTERY_THRESHOLD = 0.75
5
+ MIN_QUESTIONS = 3
6
+ MAX_QUESTIONS = 5
7
  MAX_REREAD_CYCLES = 3
8
 
9
 
 
12
  questions_asked = state["questions_asked"]
13
  weak_chunks = state.get("weak_chunks", [])
14
 
15
+ # Hard cap — stop regardless
16
+ if questions_asked >= MAX_QUESTIONS:
17
+ return "summarize"
18
+
19
  # If score is below threshold and we haven't exceeded reread limit
20
  if score < MASTERY_THRESHOLD and len(weak_chunks) <= MAX_REREAD_CYCLES:
21
  return "reread"