Generating goal-oriented explanations