File size: 627 Bytes
8a1fc38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
LangGraph State Definition
"""

from typing import TypedDict, Annotated, List

class MathAgentState(TypedDict):
    """Represents the state of the math orchestration pipeline."""
    
    # Input
    user_query: str
    uid: str
    session_id: str
    
    # Planner output
    question_type: str
    class_level: int
    
    # Retrievals (Running in parallel)
    rag_context: str
    history: str
    weak_topics: List[str]
    
    # Solver Output
    raw_solution: str
    
    # Verifier Feedback
    is_correct: bool
    verification_feedback: str
    retries: int
    
    # Formatter Output
    final_answer: str