You are building an LLM application that must solve multi-step tasks with higher reliability than a single prompt can provide. The team is considering Chain-of-Thought and Tree-of-Thought style reasoning, but it has to work in production with cost, latency, and safety constraints.
Explain your approach to implementing 'Chain-of-Thought' or 'Tree-of-Thought' reasoning in a production environment.