Problem
Generating tutoring questions with a single prompt is unpredictable: the model silently skips steps, and nothing about the run is inspectable or testable.
Approach
A LangGraph planner emits a structured JSON execution plan per request, then vision, solver and evaluator agents run against typed Pydantic state so every hop is deterministic and can be asserted on in tests.
Decisions
- Planner-first over reactive chaining — the plan is data, so it can be logged, diffed and replayed.
- Pydantic typed state at every node, which turns agent bugs into schema failures instead of silent bad output.
- A separate evaluator agent so quality is scored by a different context than the one that produced the answer.
Pipeline
- planneremits JSON execution plan
- visionparses diagrams and figures
- solverderives the worked solution
- evaluatorscores and gates the output
- specialised agents
- 4
- typed execution plans
- JSON
Stack
- LangGraph
- Python
- Pydantic
- LLM Evals