Dynamically planning, resulting in transformed tables that are used in the chain of reasoning steps help improve the…