Just to throw it out there, an alternative approach is to have the AI talk to a semantic layer. There are pros and cons to this and in practice you'd probably want an agent that can intelligently decide whether to call your semantic layer or go through some other process that may involve multiple queries, function calls, etc.
IMO a semantic layer makes it so easy to query that natural language querying is often not beneficial, even for business users. I take a hybrid approach of the semantic layer solving >95% of use cases and custom SQL as needed in backend processing.