Check Deterministic State Machine idea - basically, on prod regulated / high stakes env. you don't want LLM to run almost anything directly.
You rather need exact reproducebale, tracable path of decisions. Either a hard-coded graph where LLM is a point of contact for the customer/user and parsing, function call etc. is all done deterministic way.
OR you use smth like JEV to decide about the next path in the chain (under the condition that JEV is trained for that path only and its only job is to do the best routing possible with close to 0 costs).