GPT-4 prompt optimization for large number of functions to reduce costs

I am building a gpt-4 chatbot that helps the user complete a process, using functions for each step of the process, I have a large number of ~20 different functions in the prompt plus the chat history which keeps growing at every step and therefore usage costs are growing exponentially. Can you suggest any best practices or techniques to handle such scenario without breaking the bank?