Just saw the new LlamaIndex agent and workflow classes. Everyone's talking about the improved results, but no one shows *how* it gets there. You're just supposed to trust it.
I built a simple visualizer to trace the actual steps. It logs:
* The module called (e.g., `RouterQueryEngine`, `SubQuestionQueryEngine`)
* The exact input to that step
* The output or decision it made
* The latency for each step
Example from a test run:
```
Step: SubQuestionQueryEngine
Input: "Compare load balancing in nginx and HAProxy"
Generated Sub-questions:
1. How does nginx handle load balancing?
2. How does HAProxy handle load balancing?
Time: 1.2s
---
Step: RouterQueryEngine
Input: "How does nginx handle load balancing?"
Selected Tool: VectorIndexTool (nginx_docs_index)
Time: 0.4s
```
Without this, you're blind. You can't:
* Identify which step is a bottleneck
* See if the router is making poor choices
* Reproduce or debug weird outputs
The code's on my GitHub. It's a wrapper that plugs into the callback manager. Try it before you trust any more benchmark claims.
Show me the methodology.