DAG and Topological sort to reduce unnecessary reasoning by LLMs | Synapse