Customizing Retrieval Actions

Is there a way to override the retrieval actions?

Actually, I don’t want to send the response of the retrieval action directly to the user, instead, I want to do some customization (like formatting the text, etc.) and then send the customized message to the user.

Is there any way to achieve this? I was wondering if I could override the retrieval actions like we override the default actions.